/* B6 Plates for business. The personal wallet's stage, type and plates, with one plate per vault.
   The plates carry the colour. Lists, approvals, rules and forms stay flat and quiet. */
@font-face { font-family: "Funnel Display"; src: url("../fonts/funnel-display-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Funnel Sans"; src: url("../fonts/funnel-sans-latin-wght-normal.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../fonts/fragment-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --f-display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --f-text: "Funnel Sans", ui-sans-serif, system-ui, sans-serif;
  --f-mono: "Fragment Mono", ui-monospace, monospace;
  --strip: 56px; --plate-h: 188px; --r-plate: 22px; --n: 5;
  --spring: cubic-bezier(.2, 1.2, .3, 1);
  --soft: cubic-bezier(.2, .8, .2, 1);
  --gx: .35; --gy: .3;

  /* the personal wallet's anodized plates, plus one steel tone for a fifth vault */
  --usd-a: oklch(88% 0.012 245); --usd-b: oklch(71% 0.018 250); --usd-ink: oklch(22% 0.02 255); --usd-line: oklch(30% 0.03 255 / .30); --usd-edge: oklch(100% 0 0 / .7);
  --btc-a: oklch(73% 0.125 60); --btc-b: oklch(54% 0.12 44); --btc-ink: oklch(19% 0.04 50); --btc-line: oklch(26% 0.06 45 / .34); --btc-edge: oklch(92% 0.08 80 / .6);
  --eth-a: oklch(53% 0.135 283); --eth-b: oklch(35% 0.125 280); --eth-ink: oklch(97% 0.015 285); --eth-line: oklch(86% 0.07 285 / .30); --eth-edge: oklch(85% 0.08 285 / .45);
  --sol-a: oklch(62% 0.09 192); --sol-b: oklch(43% 0.078 202); --sol-ink: oklch(98% 0.015 190); --sol-line: oklch(92% 0.05 185 / .30); --sol-edge: oklch(90% 0.06 190 / .45);
  --stl-a: oklch(64% 0.07 243); --stl-b: oklch(44% 0.068 250); --stl-ink: oklch(98% 0.012 245); --stl-line: oklch(93% 0.04 240 / .28); --stl-edge: oklch(90% 0.05 240 / .45);
}
:root, [data-theme="dark"] {
  color-scheme: dark;
  --stage: oklch(18.5% 0.006 255); --stage-2: oklch(15.5% 0.006 255);
  --raise: oklch(24% 0.008 255); --raise-2: oklch(29.5% 0.009 255);
  --ink: oklch(95.5% 0.004 90); --ink-2: oklch(82% 0.006 250); --muted: oklch(68% 0.01 250);
  --rule: oklch(31% 0.008 255); --inv: oklch(18% 0.006 255);
  --safe: oklch(80% 0.12 165); --safe-wash: oklch(32% 0.05 165);
  --warn: oklch(80% 0.13 75); --warn-wash: oklch(33% 0.05 75); --danger: oklch(72% 0.17 28); --danger-wash: oklch(31% 0.08 28);
  --frost: oklch(86% 0.045 225); --frost-ink: oklch(22% 0.04 240);
  --focus: oklch(82% 0.11 230);
  --plate-shadow: 0 -10px 26px -8px rgb(0 0 0 / .55), 0 22px 32px -20px rgb(0 0 0 / .7);
  --sheet-shadow: 0 -24px 60px rgb(0 0 0 / .5);
  --pop-shadow: 0 20px 50px -10px rgb(0 0 0 / .45);
}
[data-theme="light"] {
  color-scheme: light;
  --stage: oklch(95.2% 0.004 240); --stage-2: oklch(92.5% 0.005 240);
  --raise: oklch(99.2% 0.002 240); --raise-2: oklch(90.5% 0.006 240);
  --ink: oklch(21% 0.012 255); --ink-2: oklch(34% 0.012 255); --muted: oklch(47% 0.012 255);
  --rule: oklch(87.5% 0.006 240); --inv: oklch(98% 0.003 240);
  --safe: oklch(46% 0.1 165); --safe-wash: oklch(91% 0.045 165);
  --warn: oklch(48% 0.12 70); --warn-wash: oklch(93% 0.05 80); --danger: oklch(50% 0.18 28); --danger-wash: oklch(92% 0.04 28);
  --frost: oklch(80% 0.06 228); --frost-ink: oklch(22% 0.04 240);
  --focus: oklch(50% 0.16 255);
  --plate-shadow: 0 -6px 18px -8px rgb(30 40 60 / .28), 0 18px 28px -18px rgb(30 40 60 / .38);
  --sheet-shadow: 0 -24px 60px rgb(30 40 60 / .18);
  --pop-shadow: 0 20px 50px -14px rgb(30 40 60 / .28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--stage); color: var(--ink); font: 400 16px/1.45 var(--f-text); -webkit-font-smoothing: antialiased; transition: background-color .5s; overscroll-behavior-y: none; }
h1, h2, h3, p, dl, dd, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }
.view:focus { outline: none; }
.mono { font-family: var(--f-mono); letter-spacing: 0; }
.muted { color: var(--muted); }
.num { font-family: var(--f-display); font-variant-numeric: tabular-nums; }
.ic { width: 24px; height: 24px; flex: none; }
.mark { width: 20px; height: 20px; flex: none; }
.dec { font-size: .56em; color: var(--muted); font-weight: 500; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--inv); padding: 10px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }

/* ---------- frame ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 520px; margin: 0 auto; padding-bottom: calc(84px + env(safe-area-inset-bottom)); }
.top { display: flex; align-items: center; justify-content: space-between; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 12px 0 14px; }
.topnav, .cmdk-btn { display: none; }
.top-right { display: flex; align-items: center; gap: 4px; }
.body { display: flex; flex-direction: column; padding: 0 16px; flex: 1; }
.rack { display: none; }
.app[data-rack="stack"] .rack, .app[data-rack="lifted"] .rack { display: block; }
.view.enter { animation: view-in .22s var(--soft); }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
:root { view-transition-name: none; }
.view { view-transition-name: b6-view; }
::view-transition-group(b6-view) { animation: none; }
::view-transition-old(b6-view) { animation: vt-out .12s ease-out both; height: 100%; width: 100%; object-fit: none; object-position: left top; }
::view-transition-new(b6-view) { animation: view-in .22s var(--soft) both; height: 100%; width: 100%; object-fit: none; object-position: left top; }
@keyframes vt-out { to { opacity: 0; } }

.iconbtn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); transition: background-color .15s, transform .15s; }
@media (hover: hover) { .iconbtn:hover { background: var(--raise); } }
.iconbtn[data-pressed] { transform: scale(.9); background: var(--raise-2); }
.iconbtn.sm { width: 32px; height: 32px; flex: none; }
.iconbtn.sm .ic { width: 16px; height: 16px; }
.avatar { font: 600 13px var(--f-display); background: var(--raise); color: var(--ink); width: 36px; height: 36px; margin-left: 4px; }
[data-theme="dark"] .i-moon, [data-theme="light"] .i-sun { display: none; }

.ws-wrap, .menu-wrap { position: relative; }
.ws { display: flex; align-items: center; gap: 9px; height: 44px; padding: 0 10px 0 6px; border-radius: 14px; font: 600 17px var(--f-display); white-space: nowrap; transition: background-color .15s, transform .15s; }
@media (hover: hover) { .ws:hover { background: var(--raise); } }
.ws[data-pressed] { transform: scale(.96); }
.ws .ic { width: 16px; height: 16px; color: var(--muted); }
.menu { position: absolute; left: 0; top: 50px; z-index: 40; width: 286px; background: var(--raise); border: 1px solid var(--rule); border-radius: 18px; padding: 6px; box-shadow: var(--pop-shadow); animation: pop .22s var(--spring); transform-origin: 20px 0; }
.menu.right { left: auto; right: 0; transform-origin: 90% 0; width: 248px; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } }
.ws-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 12px; min-height: 56px; }
@media (hover: hover) { .ws-item:hover, .menu-item:hover { background: var(--raise-2); } }
.ws-item > span:nth-child(2) { flex: 1; display: grid; }
.ws-item b { font-weight: 600; }
.ws-item small { color: var(--muted); font-size: 13px; }
.ws-item .ic { width: 18px; height: 18px; color: var(--safe); }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 10px; border-radius: 12px; font-weight: 500; text-align: left; }
.menu-item .ic { width: 20px; height: 20px; color: var(--muted); }
.menu-sep { height: 1px; background: var(--rule); margin: 6px 10px; }
.menu-item.danger, .menu-item.danger .ic { color: var(--danger); }

.tabs { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 30; display: flex; gap: 2px; padding: 5px; border-radius: 28px;
  background: color-mix(in oklch, var(--raise) 82%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--rule); box-shadow: 0 14px 34px -12px rgb(0 0 0 / .5); }
.tabs a { position: relative; display: flex; align-items: center; gap: 8px; height: 46px; padding: 0 14px; border-radius: 23px; font: 500 14px var(--f-text); color: var(--muted); transition: background-color .2s, color .2s, transform .15s; }
.tabs a .ic { width: 22px; height: 22px; }
.tabs a span { display: none; }
.tabs a[aria-current] { background: var(--ink); color: var(--inv); padding: 0 16px 0 13px; }
.tabs a[aria-current] span { display: inline; }
.tabs a[data-pressed] { transform: scale(.94); }
.tabs .pip { position: absolute; top: 8px; left: 30px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--warn); color: var(--inv); font: 700 10px/16px var(--f-display); text-align: center; box-shadow: 0 0 0 2px var(--raise); }
.tabs a[aria-current] .pip { box-shadow: 0 0 0 2px var(--ink); }

.frozen-bar { display: flex; align-items: center; gap: 10px; margin: 0 16px 10px; padding: 10px 14px; border-radius: 14px; background: var(--frost); color: var(--frost-ink); font-size: 14px; font-weight: 500; animation: view-in .3s var(--soft); }
.frozen-bar .ic { width: 20px; height: 20px; }
.frozen-bar span { flex: 1; }
.frozen-bar a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; white-space: nowrap; }

/* ---------- the rack and its plates ---------- */
.rack-head { min-height: 104px; display: flex; align-items: center; }
.total { display: grid; gap: 2px; padding: 4px 4px 14px; }
.total-label { font-size: 14px; color: var(--muted); }
.total-fig { font: 500 40px/1.05 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.total-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }
.rack-back { display: none; align-items: center; gap: 4px; height: 44px; padding: 0 12px 0 4px; margin-left: -4px; border-radius: 14px; font: 600 17px var(--f-display); }
.rack-back .ic { width: 22px; height: 22px; }
.rack[data-lifted] .rack-head { min-height: 52px; }
.rack[data-lifted] .total { display: none; }
.rack[data-lifted] .rack-back { display: inline-flex; }
.rack-note { display: none; }

.stack { position: relative; height: calc(var(--strip) * (var(--n) - 1) + var(--plate-h)); transition: height .5s var(--soft); }
.rack[data-lifted] .stack { height: var(--plate-h); }
.plate { position: absolute; left: 0; right: 0; top: calc(var(--i) * var(--strip)); height: var(--plate-h); z-index: calc(var(--i) + 1); display: block; text-align: left; border-radius: var(--r-plate);
  transform: translateY(var(--dy, 0px)); transition: transform .6s var(--spring), opacity .3s; touch-action: none; user-select: none; -webkit-user-select: none; }
.plate.is-dragging { transition: none; }
.rack[data-lifted] .plate:not(.is-lifted) { transform: translateY(calc(var(--plate-h) * 1.5 + var(--i) * 26px)) scale(.94); opacity: 0; pointer-events: none; transition: transform .5s var(--soft), opacity .28s; }
.plate.is-lifted { transform: translateY(calc(var(--i) * var(--strip) * -1 + var(--dy, 0px))); z-index: 9; }
.rack.is-entering .plate { animation: drop .8s var(--spring) backwards; animation-delay: calc(var(--i) * 60ms + 60ms); }
@keyframes drop { from { opacity: 0; transform: translateY(-70px) scale(.96); } }

.plate-operating { --p-a: var(--usd-a); --p-b: var(--usd-b); --p-ink: var(--usd-ink); --p-line: var(--usd-line); --p-edge: var(--usd-edge); }
.plate-reserve { --p-a: var(--btc-a); --p-b: var(--btc-b); --p-ink: var(--btc-ink); --p-line: var(--btc-line); --p-edge: var(--btc-edge); }
.plate-payroll { --p-a: var(--eth-a); --p-b: var(--eth-b); --p-ink: var(--eth-ink); --p-line: var(--eth-line); --p-edge: var(--eth-edge); }
.plate-collections { --p-a: var(--sol-a); --p-b: var(--sol-b); --p-ink: var(--sol-ink); --p-line: var(--sol-line); --p-edge: var(--sol-edge); }
.plate-payouts { --p-a: var(--stl-a); --p-b: var(--stl-b); --p-ink: var(--stl-ink); --p-line: var(--stl-line); --p-edge: var(--stl-edge); }

.plate-body { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; color: var(--p-ink); display: flex; flex-direction: column; justify-content: space-between; padding: 0 20px 18px;
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / .035) 0 1px, transparent 1px 3px),
    linear-gradient(172deg, var(--p-a), var(--p-b));
  box-shadow: inset 0 1.5px 0 var(--p-edge), inset 0 0 0 1px rgb(255 255 255 / .07), inset 0 -1.5px 0 rgb(0 0 0 / .28), var(--plate-shadow);
  transition: transform .25s var(--soft), filter .7s; transform-origin: 50% 60%; }
.plate[data-pressed] .plate-body { transform: scale(.985); }
.engr { position: absolute; inset: 0; color: var(--p-line); opacity: .8; pointer-events: none; filter: drop-shadow(0 .7px 0 rgb(255 255 255 / .22)); }
.engr svg { width: 100%; height: 100%; display: block; }
.sheen { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: overlay; opacity: .7; transition: opacity .3s;
  background:
    radial-gradient(70% 120% at calc(var(--px, .3) * 100%) calc(var(--py, 0) * 100%), rgb(255 255 255 / .55), transparent 62%),
    linear-gradient(112deg, transparent calc(var(--gx) * 100% - 28%), rgb(255 255 255 / .28) calc(var(--gx) * 100%), transparent calc(var(--gx) * 100% + 28%)); }
.plate:hover .sheen, .plate[data-pressed] .sheen { opacity: 1; }
.plate-top { position: relative; height: var(--strip); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; }
.plate-name { display: flex; align-items: center; gap: 10px; min-width: 0; font: 600 17px var(--f-display); letter-spacing: -0.005em; white-space: nowrap; }
.plate-label { font: 500 12px/1 var(--f-text); padding: 4px 7px; border-radius: 7px; box-shadow: inset 0 0 0 1px color-mix(in oklch, currentColor 38%, transparent); opacity: .86; }
.plate-val { font: 600 17px var(--f-display); font-variant-numeric: tabular-nums; transform-origin: 100% 50%; transition: transform .5s var(--spring); white-space: nowrap; }
.plate-low { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.plate-native { font: 500 15px/1.3 var(--f-text); opacity: .86; max-width: 20ch; text-wrap: balance; }
.plate-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; opacity: .7; white-space: nowrap; }
.plate-foot .mark { width: 16px; height: 16px; }
.plate-name, .plate-val, .plate-native, .plate-foot { text-shadow: 0 1px 0 rgb(255 255 255 / .16); }
.plate-payroll :is(.plate-name, .plate-val, .plate-native, .plate-foot), .plate-collections :is(.plate-name, .plate-val, .plate-native, .plate-foot), .plate-payouts :is(.plate-name, .plate-val, .plate-native, .plate-foot) { text-shadow: 0 -1px 0 rgb(0 0 0 / .22); }
.plate.is-front .plate-val, .plate.is-lifted .plate-val { transform: scale(1.24); }

/* frozen: a plate loses its colour under a film of frost. One vault, or all of them when payments are stopped. */
.plate.is-frozen .plate-body, :root[data-stopped] .plate-body { filter: saturate(.16) brightness(1.06) contrast(.92); }
.plate.is-frozen .plate-body::after, :root[data-stopped] .plate-body::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(120% 80% at 0% 0%, rgb(226 242 255 / .55), transparent 55%), radial-gradient(90% 70% at 100% 100%, rgb(214 234 252 / .42), transparent 60%), repeating-linear-gradient(63deg, rgb(255 255 255 / .09) 0 2px, transparent 2px 9px), repeating-linear-gradient(-31deg, rgb(255 255 255 / .07) 0 1px, transparent 1px 13px);
  animation: frost .9s var(--soft); }
@keyframes frost { from { opacity: 0; } }
:root[data-stopped][data-theme="dark"] { --stage: oklch(19.5% 0.018 240); }
:root[data-stopped][data-theme="light"] { --stage: oklch(94% 0.016 232); }
:root[data-stopped] [data-live], [data-live][aria-disabled="true"] { opacity: .45; }

/* ---------- shared pieces ---------- */
.desk-title, .asset-head { display: none; }
.page-title { font: 600 30px/1.1 var(--f-display); letter-spacing: -0.015em; padding: 8px 4px 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 8px 4px 14px; }
.page-head .page-title { padding: 0; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 62ch; }
.page-head .btn { flex: none; }
.actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; margin: 18px 0 6px; }
.act { display: flex; align-items: center; justify-content: center; gap: 8px; height: 52px; border-radius: 18px; background: var(--raise); font: 600 15px var(--f-display); white-space: nowrap; transition: transform .18s var(--spring), background-color .15s; }
.act .ic { width: 20px; height: 20px; }
.act .long { display: none; }
.act:first-child { background: var(--ink); color: var(--inv); }
.act[data-pressed] { transform: scale(.95); }
@media (hover: hover) { .act:hover:not(:first-child) { background: var(--raise-2); } }

.list-sec { margin-top: 22px; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px 2px; min-height: 40px; }
.sec-head h2 { font: 600 15px var(--f-display); color: var(--muted); }
.sec-head a, .linkish { font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 0 0 0 12px; line-height: 40px; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; white-space: nowrap; }
.sec-head > span { white-space: nowrap; }
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { position: relative; isolation: isolate; display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 4px; text-align: left; width: 100%; transition: transform .18s var(--spring); }
.row + .row { border-top: 1px solid var(--rule); }
.row::after { content: ""; position: absolute; inset: 3px -8px; border-radius: 14px; background: var(--raise); opacity: 0; z-index: -1; transition: opacity .15s; }
@media (hover: hover) { a.row:hover::after, button.row:hover::after { opacity: .7; } }
.row[data-pressed] { transform: scale(.985); }
.row[data-pressed]::after, .row[aria-current]::after { opacity: 1; }
.card-rows .row::after { background: var(--raise-2); inset: 3px -6px; }
.row-ic, .av { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.row-ic { background: var(--raise); color: var(--ink-2); }
.card-rows .row-ic, .panel .row-ic { background: var(--raise-2); }
.row-ic .ic { width: 20px; height: 20px; }
.row-ic.sm { width: 28px; height: 28px; }
.row-ic.sm .ic { width: 15px; height: 15px; }
.av { background: oklch(52% 0.09 var(--hue)); color: oklch(98% 0.01 var(--hue)); font: 600 13px var(--f-display); }
.av.sq { border-radius: 12px; }
.av.sm { width: 28px; height: 28px; font-size: 10px; }
.av.is-off { background: var(--raise-2); color: var(--muted); }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -4px; }
.avs .av { box-shadow: 0 0 0 2px var(--stage); }
.panel .avs .av, .card .avs .av { box-shadow: 0 0 0 2px var(--raise); }
.row-main { flex: 1; min-width: 0; display: grid; }
.row-who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-sub { font-size: 14px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row > .ic { width: 18px; height: 18px; color: var(--muted); }
.amt { font: 600 16px var(--f-display); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.amt small { font: 500 12px var(--f-text); color: var(--muted); margin-left: 4px; }
.amt.in { color: var(--safe); }
.amt.in small { color: inherit; opacity: .8; }
.empty { color: var(--muted); padding: 20px 4px; font-size: 15px; }
.card { background: var(--raise); border-radius: 20px; padding: 4px 16px; }
.card-rows { background: var(--raise); border-radius: 20px; padding: 2px 12px; }
.card-rows.second { margin-top: 14px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.ok { background: var(--safe); } .dot.cold { background: var(--frost); } .dot.warn { background: var(--warn); } .dot.danger { background: var(--danger); }
.state { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); white-space: nowrap; }
.state.ok { color: var(--safe); } .state.warn { color: var(--warn); } .state.danger { color: var(--danger); } .state.cold { color: var(--frost); }
[data-theme="light"] .state.cold { color: oklch(48% 0.09 235); }
.state .ic { width: 16px; height: 16px; }
.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border-radius: 8px; font: 500 13px var(--f-text); color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); white-space: nowrap; }
.tag.safe { color: var(--safe); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--safe) 40%, transparent); }
.tag.warn { color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--warn) 45%, transparent); }
.tag.danger { color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--danger) 45%, transparent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.flag { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); white-space: nowrap; }
.flag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.flag.warn::before { background: var(--warn); } .flag.danger::before { background: var(--danger); }
.flag.danger { color: var(--danger); }
.swatch { width: 12px; height: 12px; border-radius: 4px; flex: none; background: linear-gradient(172deg, var(--p-a), var(--p-b)); box-shadow: inset 0 1px 0 var(--p-edge); }

.kv { display: grid; }
.kv > div { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; align-items: baseline; }
.kv > div + div { border-top: 1px solid var(--rule); }
.kv dt { color: var(--muted); flex: none; }
.kv dd { text-align: right; font-weight: 500; min-width: 0; }
.kv dd small { display: block; font-size: 13px; color: var(--muted); font-weight: 400; }
.kv .wrap { word-break: break-all; font-size: 12px; line-height: 1.5; max-width: 26ch; }
.kv dd.to { display: flex; align-items: center; gap: 10px; text-align: left; }
.kv dd.to .av { width: 32px; height: 32px; font-size: 11px; }
.kv dd.to > span { display: grid; gap: 2px; min-width: 0; }
.kv dd.to b { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.kv dd .tag { vertical-align: 1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 20px; border-radius: 16px; background: var(--ink); color: var(--inv); font: 600 16px var(--f-display); white-space: nowrap; transition: transform .18s var(--spring), opacity .2s, background-color .2s; }
.btn .ic { width: 20px; height: 20px; }
.btn[data-pressed] { transform: scale(.96); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .32; cursor: default; }
.btn.quiet { background: var(--raise); color: var(--ink); }
@media (hover: hover) { .btn.quiet:hover { background: var(--raise-2); } }
.btn.block { display: flex; width: 100%; margin-top: 10px; }
.btn.big { height: 58px; border-radius: 20px; font-size: 17px; }
.btn.sm { height: 40px; padding: 0 14px; border-radius: 13px; font-size: 14px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.is-copied { background: var(--safe); color: var(--inv); }
.btn .mk-load { margin-right: 2px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.textlink { display: block; text-align: center; padding: 16px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
.lead { font-size: 17px; line-height: 1.45; color: var(--ink-2); margin: 6px 4px 18px; }
.center { text-align: center; }
.foot-note { font-size: 14px; color: var(--muted); margin: 14px 4px 0; line-height: 1.45; }
.chip { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 10px; font: 600 13px var(--f-display); color: var(--p-ink); background: linear-gradient(172deg, var(--p-a), var(--p-b)); box-shadow: inset 0 1px 0 var(--p-edge); font-variant-numeric: tabular-nums; white-space: nowrap; }
.seg { display: flex; gap: 2px; padding: 4px; border-radius: 16px; background: var(--raise); margin: 0 0 16px; }
.seg > * { flex: 1; height: 40px; padding: 0 12px; border-radius: 12px; display: grid; place-items: center; font: 600 14px var(--f-display); color: var(--muted); transition: background-color .2s, color .2s, transform .15s; white-space: nowrap; }
.seg > [aria-pressed="true"], .seg > [aria-current] { background: var(--ink); color: var(--inv); }
.seg > [data-pressed] { transform: scale(.95); }
.seg.inline { display: inline-flex; margin: 0; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg.inline::-webkit-scrollbar { display: none; }
.seg.inline > * { flex: none; height: 36px; padding: 0 14px; border-radius: 11px; }
.panel .seg, .sheet .seg, .card .seg { background: var(--raise-2); }

.vh { display: flex; align-items: center; gap: 4px; height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); margin: 0 -8px 8px; }
.vh h1 { font: 600 19px var(--f-display); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vh-right { padding-right: 8px; }

/* the weight meter: one segment per unit of signer weight needed */
.meter { display: inline-flex; align-items: center; gap: 8px; font: 500 13px var(--f-text); color: var(--muted); white-space: nowrap; }
.meter-bar { display: inline-flex; gap: 3px; }
.meter-bar i { width: 12px; height: 5px; border-radius: 3px; background: var(--rule); transition: background-color .3s; }
.meter-bar i.on { background: var(--ink); }
.meter.full .meter-bar i.on { background: var(--safe); }
.meter.full { color: var(--safe); }

/* approvals written as sentences */
.ask { align-items: flex-start; padding: 14px 4px; gap: 14px; }
.ask .av { margin-top: 2px; }
.ask-main { flex: 1; min-width: 0; display: grid; gap: 6px; }
.ask-line { font-size: 16px; line-height: 1.4; color: var(--ink-2); text-wrap: pretty; }
.ask-line b { font-weight: 600; color: var(--ink); }
.ask-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 14px; color: var(--muted); }
.ask-side { display: grid; justify-items: end; gap: 6px; flex: none; padding-top: 2px; font-size: 13px; color: var(--muted); }

/* progress bars for budgets and limits */
.bar { height: 6px; border-radius: 3px; background: var(--raise-2); overflow: hidden; }
.panel .bar, .card .bar, .card-rows .bar { background: var(--stage); }
.bar i { display: block; height: 100%; width: calc(var(--v) * 100%); border-radius: 3px; background: var(--ink); transition: width .5s var(--soft); }
.bar.spent i { background: var(--warn); }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-top: 14px; }
.field > span:first-child:not(.input), .field-label { font-size: 14px; color: var(--muted); padding: 0 4px; }
.try { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 4px 2px; font-size: 14px; color: var(--muted); }
.chipbtn { height: 36px; padding: 0 12px; border-radius: 12px; border: 1px dashed var(--rule); color: var(--ink-2); font-size: 14px; transition: transform .15s, background-color .15s; }
@media (hover: hover) { .chipbtn:hover { background: var(--raise); } }
.chipbtn[data-pressed] { transform: scale(.95); }
.input { display: flex; align-items: center; gap: 8px; min-height: 52px; background: var(--raise); border-radius: 16px; padding: 0 6px 0 16px; border: 1px solid transparent; transition: border-color .2s; }
.input:focus-within { border-color: var(--focus); }
.input input, .input select { flex: 1; min-width: 0; height: 50px; border: 0; background: none; outline: none; }
.input input::placeholder { color: var(--muted); }
.input .ic { width: 20px; height: 20px; color: var(--muted); }
.sheet .input, .panel .input, .card .input { background: var(--raise-2); }
.pick { display: flex; gap: 8px; flex-wrap: wrap; }
.pick button { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px 0 12px; border-radius: 13px; background: var(--raise); font: 600 14px var(--f-display); color: var(--ink-2); transition: transform .15s, background-color .15s, box-shadow .15s; white-space: nowrap; }
.pick button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.pick button[data-pressed] { transform: scale(.96); }
.amount-in { display: flex; align-items: baseline; gap: 10px; padding: 6px 4px 0; }
.amount-in input { flex: 0 1 auto; field-sizing: content; min-width: 2ch; max-width: 100%; border: 0; background: none; outline: none; padding: 0; font: 500 52px/1.1 var(--f-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; caret-color: var(--focus); }
.amount-in input::placeholder { color: var(--rule); }
.amount-in span { font: 600 20px var(--f-display); color: var(--muted); flex: none; }
@supports not (field-sizing: content) { .amount-in input { flex: 1; min-width: 0; width: 100%; } }
.amount-sub { padding: 2px 4px 0; font-size: 14px; color: var(--muted); }
.amount-sub.is-over { color: var(--danger); }
.verdict { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; padding: 14px 16px; border-radius: 18px; background: var(--raise); }
.verdict .ic { width: 20px; height: 20px; margin-top: 1px; color: var(--muted); }
.verdict.warn .ic { color: var(--warn); } .verdict.danger .ic { color: var(--danger); } .verdict.ok .ic { color: var(--safe); }
.verdict p { flex: 1; color: var(--ink-2); font-size: 15px; line-height: 1.45; }
.verdict b { color: var(--ink); font-weight: 600; }
.verdict .meter { margin-top: 6px; display: flex; }
.to-list { margin-top: 6px; }
.to-picked { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 8px 8px 12px; border-radius: 16px; background: var(--raise); }
.to-picked .row-main { gap: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: 14px 0 8px; }
.check-grid span { display: grid; gap: 2px; padding: 8px 0 10px; border-radius: 12px; background: var(--stage); text-align: center; font-size: 15px; }
.check-grid small { font: 400 11px var(--f-text); color: var(--muted); }
.groups { display: grid; grid-template-columns: repeat(5, max-content); gap: 4px 12px; font-size: 14px; line-height: 1.5; }

/* ---------- review, sign, sending, sent ---------- */
.review-plate { position: relative; top: auto; height: 104px; --strip: 104px; margin: 6px 0 16px; touch-action: auto;
  transform: perspective(800px) rotateY(calc(var(--lean, 0) * 16deg)) rotateX(calc(var(--lean, 0) * 5deg)) translateX(calc(var(--lean, 0) * 8px)); transition: none; }
.review-plate .plate-body { padding-bottom: 0; }
.review-plate .plate-name, .review-plate .plate-val { font-size: 20px; }
.review-plate .sheen { opacity: 1; }
.review-kv { margin-bottom: 20px; }
.sign-phone { margin-top: 20px; }
.sign-desk { display: none; }
.slide { position: relative; height: 68px; border-radius: 34px; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  background-image: radial-gradient(circle at center, var(--rule) 1.5px, transparent 2px); background-size: 12.5% 100%; background-position: 6.25% 0; background-color: var(--raise); }
.panel .slide, .sheet .slide { background-color: var(--raise-2); background-image: radial-gradient(circle at center, color-mix(in oklch, var(--muted) 40%, transparent) 1.5px, transparent 2px); }
.slide-fill { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--x, 0px) + 66px); border-radius: 34px; background: linear-gradient(90deg, var(--usd-b), var(--usd-a)); opacity: calc(.25 + var(--p) * .75); }
.slide-label { position: absolute; inset: 0; display: grid; place-items: center; padding-left: 52px; padding-right: 12px; font: 600 15px var(--f-display); color: var(--ink-2); opacity: calc(1 - var(--p) * 2.2); pointer-events: none; white-space: nowrap; }
.slide-thumb { position: absolute; left: 4px; top: 4px; width: 60px; height: 60px; border-radius: 50%; background: var(--ink); color: var(--inv); display: grid; place-items: center; transform: translateX(var(--x, 0px)); box-shadow: 0 4px 14px rgb(0 0 0 / .35); touch-action: none; cursor: grab; }
.slide.is-held .slide-thumb { cursor: grabbing; scale: 1.06; }
.slide.is-done .slide-thumb { background: var(--safe); }
.settling { position: fixed; inset: 0; z-index: 85; background: var(--stage); opacity: 0; transition: opacity .25s; }
.settling.on { opacity: 1; }
.settling p { position: absolute; left: 0; right: 0; top: calc(50% + min(52vw, 260px)); text-align: center; font: 600 19px var(--f-display); color: var(--ink-2); }
.settling-field, .open-field { position: absolute; inset: 0; -webkit-mask: radial-gradient(circle closest-side at center, #000 38%, transparent 96%); mask: radial-gradient(circle closest-side at center, #000 38%, transparent 96%); }
.mk-field { color: var(--ink); }
.mk-load { width: 15px; height: 15px; }

.done { min-height: calc(100dvh - 40px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px 4px; }
.done-mark { position: relative; width: 230px; height: 230px; margin-bottom: 2px; }
.done-check { position: absolute; inset: auto 38px 38px auto; width: 38px; height: 38px; border-radius: 50%; background: var(--safe); color: var(--inv); display: grid; place-items: center; box-shadow: 0 0 0 4px var(--stage); animation: pop-in .5s var(--spring) backwards .55s; }
.done-check.wait { background: var(--warn); }
.done-check .ic { width: 20px; height: 20px; stroke-width: 2.4; }
@keyframes pop-in { from { transform: scale(.3); opacity: 0; } }
.done h1 { font: 600 28px/1.15 var(--f-display); letter-spacing: -0.015em; max-width: 18ch; text-wrap: balance; }
.done p { color: var(--muted); margin: 10px 0 26px; max-width: 40ch; }
.done .btn { max-width: 380px; }

/* ---------- freeze and stop ---------- */
.freeze-stage { display: grid; place-items: center; height: 290px; }
.freeze-orb { position: relative; width: 208px; height: 208px; border-radius: 50%; display: grid; place-items: center; background: var(--raise); color: var(--ink); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .3s var(--spring), background-color .4s, color .4s;
  box-shadow: inset 0 1.5px 0 rgb(255 255 255 / .12), 0 18px 40px -16px rgb(0 0 0 / .5); }
.freeze-orb .mk-field { position: absolute; inset: 30px; width: calc(100% - 60px); height: calc(100% - 60px); }
.freeze-orb[data-holding] { transform: scale(.94); color: var(--frost); }
.orb-fill { position: absolute; inset: -10px; border-radius: 50%; background: conic-gradient(var(--frost) calc(var(--p, 0) * 360deg), transparent 0); -webkit-mask: radial-gradient(circle, transparent 108px, #000 109px); mask: radial-gradient(circle, transparent 108px, #000 109px); }
.freeze-stage.is-frozen .freeze-orb { color: var(--frost); }
[data-theme="light"] .freeze-stage.is-frozen .freeze-orb, [data-theme="light"] .freeze-orb[data-holding] { color: oklch(52% 0.1 235); }

/* ---------- sheets, hand-off, Face ID, opening ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; }
.scrim { position: absolute; inset: 0; background: rgb(0 0 0 / .5); opacity: 0; transition: opacity .3s; }
.sheet { position: relative; width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; background: var(--raise); border-radius: 28px 28px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--sheet-shadow); transform: translateY(105%); transition: transform .5s var(--spring); outline: none; }
.sheet-wrap.on .scrim { opacity: 1; }
.sheet-wrap.on .sheet { transform: translateY(var(--drag, 0px)); }
.grab { width: 100%; height: 26px; margin-bottom: 6px; touch-action: none; cursor: grab; display: grid; place-items: center; }
.grab::after { content: ""; width: 40px; height: 5px; border-radius: 3px; background: var(--rule); }
.sheet h2 { font: 600 22px/1.2 var(--f-display); margin-bottom: 6px; text-wrap: balance; }
.sheet h2 + p { color: var(--ink-2); }
.sheet .kv { margin: 10px 0 6px; }
.sheet .kv > div { padding: 11px 0; }
.sheet .btn.quiet, .panel .btn.quiet, .card .btn.quiet { background: var(--raise-2); }
.sheet-amt { font: 500 44px/1.1 var(--f-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; margin: 2px 0 6px; }
.sheet-amt small { font: 600 18px var(--f-display); color: var(--muted); letter-spacing: 0; margin-left: 6px; }

.fid { position: fixed; inset: 0; z-index: 88; display: grid; place-content: center; justify-items: center; gap: 14px; background: color-mix(in oklch, var(--stage) 70%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); opacity: 0; transition: opacity .2s; }
.fid.on { opacity: 1; }
.fid-box { position: relative; width: 104px; height: 104px; border-radius: 30px; background: var(--raise); display: grid; place-items: center; box-shadow: 0 20px 50px -12px rgb(0 0 0 / .55); transform: scale(.8); transition: transform .4s var(--spring), background-color .25s; overflow: hidden; }
.fid.on .fid-box { transform: scale(1); }
.fid-box > span { grid-area: 1 / 1; display: grid; transition: opacity .2s, transform .35s var(--spring); }
.fid-box .ic { width: 60px; height: 60px; stroke-width: 1.3; }
.fid-box::after { content: ""; position: absolute; left: 0; right: 0; height: 40%; top: -40%; background: linear-gradient(to bottom, transparent, color-mix(in oklch, var(--ink) 22%, transparent)); animation: scan .64s ease-in-out; }
@keyframes scan { to { top: 100%; } }
.fid-check { opacity: 0; transform: scale(.4); color: var(--inv); }
.fid.ok .fid-box { background: var(--safe); }
.fid.ok .fid-glyph { opacity: 0; }
.fid.ok .fid-check { opacity: 1; transform: scale(1); }
.fid p { font: 600 16px var(--f-display); color: var(--ink-2); }

.open { position: fixed; inset: 0; z-index: 90; background: var(--stage); transition: opacity .45s; outline: none; }
.open.out { opacity: 0; pointer-events: none; }
.open-low { position: absolute; left: 0; right: 0; bottom: calc(12% + env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 20px; }
.open-lockup { height: 36px; width: auto; opacity: 0; transform: translateY(8px); transition: opacity .7s .45s, transform .9s .45s var(--soft); }
.open.on .open-lockup { opacity: 1; transform: none; }
.open-fid { display: grid; grid-template-columns: 22px auto; align-items: center; gap: 8px; height: 24px; color: var(--muted); font: 500 15px var(--f-text); opacity: 0; transition: opacity .5s .7s; }
.open.on .open-fid { opacity: 1; }
.open-fid .open-glyph, .open-fid .open-ok { grid-area: 1 / 1; display: grid; place-items: center; transition: opacity .25s, transform .4s var(--spring); }
.open-fid .ic { width: 22px; height: 22px; stroke-width: 1.5; }
.open-fid .open-ok { opacity: 0; transform: scale(.4); color: var(--safe); }
.open.ok .open-fid .open-glyph { opacity: 0; transform: scale(.6); }
.open.ok .open-fid .open-ok { opacity: 1; transform: none; }
.open-skip { position: absolute; right: 16px; top: calc(12px + env(safe-area-inset-top)); height: 44px; padding: 0 14px; color: var(--muted); font-size: 15px; }

.toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 95; translate: -50% 20px; width: max-content; max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 16px; background: var(--ink); color: var(--inv); font-size: 15px; font-weight: 500; text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, translate .4s var(--spring); }
.toast.on { opacity: 1; translate: -50% 0; }

/* the stand-in phone, used on desktop only */
.handoff { display: grid; grid-template-columns: 1fr 240px; gap: 40px; align-items: center; }
.handoff-copy p { color: var(--ink-2); margin: 8px 0 12px; }
.handoff .kv { margin: 0 0 14px; }
.waiting { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.phone { position: relative; height: 420px; border-radius: 40px; background: var(--stage); border: 2px solid var(--rule); box-shadow: 0 0 0 6px var(--stage-2), 0 30px 60px -20px rgb(0 0 0 / .6); padding: 44px 18px 18px; display: flex; flex-direction: column; align-items: center; text-align: center; overflow: hidden; }
.phone-island { position: absolute; top: 12px; left: 50%; translate: -50% 0; width: 70px; height: 20px; border-radius: 10px; background: #000; }
.phone-mark { width: 132px; height: 132px; margin: 4px 0 8px; }
.phone-title { font: 600 18px/1.2 var(--f-display); text-wrap: balance; }
.phone-detail { color: var(--muted); font-size: 14px; margin-top: 4px; text-wrap: balance; }
.holdbtn { position: relative; margin-top: auto; width: 100%; height: 54px; border-radius: 18px; background: var(--raise-2); overflow: hidden; font: 600 15px var(--f-display); touch-action: none; user-select: none; -webkit-user-select: none; transition: transform .2s var(--spring); }
.holdbtn[data-holding] { transform: scale(.97); }
.hold-fill { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); }
.hold-label { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; mix-blend-mode: difference; color: #fff; }
.hold-label .ic { width: 20px; height: 20px; }
.holdbtn.is-done .hold-fill { background: var(--safe); transform: none; }
.holdbtn.is-done .hold-label { mix-blend-mode: normal; color: var(--inv); }
.standin-note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }

/* ---------- command menu ---------- */
.cmdk-wrap { position: fixed; inset: 0; z-index: 80; display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; }
.cmdk-wrap .scrim { opacity: 1; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.cmdk { position: relative; width: 100%; max-width: 580px; background: var(--raise); border: 1px solid var(--rule); border-radius: 22px; box-shadow: var(--pop-shadow); overflow: hidden; animation: pop .22s var(--spring); }
.cmdk-in { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 18px; border-bottom: 1px solid var(--rule); }
.cmdk-in .ic { width: 20px; height: 20px; color: var(--muted); }
.cmdk-in input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; outline: none; font-size: 17px; }
.cmdk-in input::placeholder { color: var(--muted); }
.kbd { font: 500 12px var(--f-text); color: var(--muted); padding: 2px 6px; border-radius: 6px; box-shadow: inset 0 0 0 1px var(--rule); white-space: nowrap; }
.cmdk-list { max-height: min(52vh, 420px); overflow-y: auto; padding: 6px; }
.cmdk-group { font: 600 13px var(--f-display); color: var(--muted); padding: 10px 12px 4px; }
.cmdk-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 0 12px; border-radius: 12px; text-align: left; font-weight: 500; }
.cmdk-item .ic { width: 20px; height: 20px; color: var(--muted); }
.cmdk-item span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmdk-item small { color: var(--muted); font-size: 13px; font-weight: 400; white-space: nowrap; }
.cmdk-item[aria-selected="true"] { background: var(--raise-2); }
.cmdk-item .swatch { margin: 0 4px; }

/* ---------- tables ---------- */
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 10px; }
.tools .input { flex: 1; min-width: 200px; min-height: 44px; border-radius: 14px; }
.tools .input input { height: 42px; }
.select { position: relative; display: inline-flex; align-items: center; height: 44px; border-radius: 14px; background: var(--raise); }
.select select { appearance: none; -webkit-appearance: none; height: 100%; border: 0; background: none; outline: none; padding: 0 36px 0 14px; font: 600 14px var(--f-display); cursor: pointer; border-radius: 14px; }
.select select:focus-visible { outline: 2px solid var(--focus); }
.select .ic { position: absolute; right: 12px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.tbl { display: grid; }
.tr { position: relative; isolation: isolate; display: grid; grid-template-columns: var(--cols); align-items: center; gap: 0 16px; min-height: 60px; padding: 8px 4px; text-align: left; width: 100%; }
.tr + .tr { border-top: 1px solid var(--rule); }
.tr.th { display: none; }
.tr::after { content: ""; position: absolute; inset: 3px -8px; border-radius: 14px; background: var(--raise); opacity: 0; z-index: -1; transition: opacity .15s; }
@media (hover: hover) { a.tr:hover::after, button.tr:hover::after { opacity: .7; } }
.tr[aria-current]::after, .tr[data-pressed]::after { opacity: 1; }
.td { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15px; }
.td.r { text-align: right; }
.td.who { display: flex; align-items: center; gap: 12px; overflow: visible; }
.td.who .row-main { gap: 0; }
.td.sub { color: var(--muted); }
.td.vlt { display: flex; align-items: center; gap: 8px; }
.day-head { font: 600 15px var(--f-display); color: var(--muted); padding: 18px 4px 4px; }

/* column templates: on a phone every table is a name and one figure */
.tbl { --cols: minmax(0, 1fr) auto; }
.tbl-audit { --cols: minmax(0, 1fr); }
.tbl-audit .tr { gap: 4px 16px; padding: 12px 4px; }
.td.what { display: grid; white-space: normal; gap: 2px; }
.td.what b { font-weight: 600; }
.tr-total { min-height: 52px; }
.tr-total b { font-size: 16px; }
.td b { font-weight: 600; }

/* ---------- split: a list beside the thing it selects ---------- */
.split-detail[data-empty] { display: none; }
.panel { background: var(--raise); border-radius: 24px; padding: 20px; }
.panel-head { display: grid; gap: 4px; margin-bottom: 12px; }
.panel-head h2 { font: 600 20px/1.25 var(--f-display); text-wrap: balance; }
.panel-amt { font: 500 40px/1.1 var(--f-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.panel-amt small { font: 600 17px var(--f-display); color: var(--muted); letter-spacing: 0; margin-left: 6px; }
.panel h3, .sub-head { font: 600 15px var(--f-display); color: var(--muted); margin: 18px 0 2px; }
.signers { display: grid; }
.signer { display: flex; align-items: center; gap: 12px; min-height: 52px; }
.signer + .signer { border-top: 1px solid var(--rule); }
.signer .row-main { gap: 0; }
.signer .row-who { font-size: 15px; }
.signer .row-sub { font-size: 13px; }
.detail-foot { margin-top: 18px; }
.detail-foot .sign-phone, .detail-foot .sign-desk { margin-top: 0; }
.detail-foot .btn.block:first-child { margin-top: 0; }
.note-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--raise-2); font-size: 14px; color: var(--ink-2); margin-top: 12px; line-height: 1.45; }
.note-line .ic { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.note-line.warn .ic { color: var(--warn); } .note-line.danger .ic { color: var(--danger); } .note-line.cold .ic { color: var(--frost); } .note-line.ok .ic { color: var(--safe); }

/* ---------- vault page ---------- */
.vault-purpose { color: var(--muted); margin: 0 4px; }
.hold-row { min-height: 54px; }
.hold-row .row-who { font-weight: 500; }
.rule-text { font-size: 17px; line-height: 1.5; color: var(--ink); padding: 6px 4px 12px; text-wrap: pretty; }
.who-signs { display: flex; align-items: center; gap: 12px; padding: 0 4px; font-size: 14px; color: var(--muted); flex-wrap: wrap; }
.quiet-row { margin-top: 26px; }

/* ---------- rules ---------- */
.rule { padding: 18px 4px; }
.rule + .rule { border-top: 1px solid var(--rule); }
.rule-name { display: flex; align-items: center; justify-content: space-between; gap: 12px; font: 600 15px var(--f-display); color: var(--muted); margin-bottom: 6px; }
.rule-sentence { font: 500 21px/1.55 var(--f-display); letter-spacing: -0.005em; text-wrap: pretty; }
.rule-sentence { color: var(--muted); }
.tok { display: inline; padding: 0 2px; margin: 0 -2px; border-radius: 6px; font: inherit; font-weight: 600; color: var(--ink); text-decoration: underline dotted color-mix(in oklch, var(--muted) 70%, transparent); text-decoration-thickness: 1.5px; text-underline-offset: 6px; transition: background-color .15s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
@media (hover: hover) { .tok:hover { background: var(--raise); } }
.tok.changed { text-decoration-color: var(--warn); }
.pending { display: grid; gap: 10px; padding: 16px; border-radius: 20px; background: var(--raise); margin-bottom: 8px; }
.pending-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pending b { font-weight: 600; }
.pending p { color: var(--ink-2); }
.pending .muted { color: var(--muted); font-size: 14px; }
.pending .btn.quiet { background: var(--raise-2); }
.try-out { display: grid; gap: 12px; }
.try-form { display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; padding: 12px 4px; font-size: 15px; color: var(--ink-2); }
.checks li + li { border-top: 1px solid var(--rule); }
.checks .ic { width: 18px; height: 18px; color: var(--safe); margin-top: 2px; }
.checks b { display: block; color: var(--ink); font-weight: 600; }

/* ---------- batch ---------- */
.drop { display: grid; justify-items: center; gap: 12px; padding: 44px 20px; border-radius: 24px; border: 1.5px dashed var(--rule); text-align: center; transition: border-color .2s, background-color .2s; }
.drop.is-over { border-color: var(--focus); background: var(--raise); }
.drop .row-ic { width: 52px; height: 52px; }
.drop h2 { font: 600 20px var(--f-display); }
.drop p { color: var(--muted); max-width: 44ch; }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 12px; padding: 8px 4px 18px; }
.stat { display: grid; gap: 2px; min-width: 0; }
.stat span { font-size: 14px; color: var(--muted); }
.stat b { font: 600 22px/1.2 var(--f-display); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.stat small { font-size: 13px; color: var(--muted); }
.issue { display: grid; gap: 10px; padding: 14px 4px; }
.issue + .issue { border-top: 1px solid var(--rule); }
.issue-top { display: flex; align-items: flex-start; gap: 12px; }
.issue-top .row-ic { color: var(--warn); }
.issue.is-done .issue-top .row-ic { color: var(--safe); }
.issue .btn-row { padding-left: 52px; }
.issue .row-who, .issue .row-sub { white-space: normal; overflow: visible; }
.vlist { position: relative; height: min(440px, 56dvh); overflow-y: auto; border-radius: 16px; overscroll-behavior: contain; margin-top: 4px; }
.vlist-pad { position: relative; }
.vrow { position: absolute; left: 0; right: 0; height: 48px; display: grid; grid-template-columns: 56px minmax(0, 1fr) 108px; align-items: center; gap: 0 12px; padding: 0 4px; border-top: 1px solid var(--rule); font-size: 15px; }
.vrow .n { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.vrow .sup { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; }
.vrow .ad, .vrow .nw { display: none; }
.vrow.is-flag .sup { color: var(--warn); }
.vrow.is-skip { color: var(--muted); }
.vrow.is-skip .amt { text-decoration: line-through; color: var(--muted); }
.sticky-go { position: sticky; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 5; margin-top: 16px; padding: 12px; border-radius: 22px; background: var(--raise); box-shadow: var(--pop-shadow); border: 1px solid var(--rule); display: grid; gap: 10px; }
.sticky-go p { font-size: 14px; color: var(--muted); padding: 0 4px; }
.sticky-go .btn { width: 100%; margin: 0; }

/* ---------- switches, team ---------- */
.sw-row { cursor: pointer; min-height: 68px; }
.sw { appearance: none; -webkit-appearance: none; width: 52px; height: 32px; border-radius: 16px; background: var(--raise-2); position: relative; flex: none; cursor: pointer; transition: background-color .25s; margin: 0; }
.sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 26px; height: 26px; border-radius: 50%; background: oklch(98% 0 0); box-shadow: 0 2px 6px rgb(0 0 0 / .3); transition: transform .3s var(--spring); }
.sw:checked { background: var(--safe); }
.sw:checked::after { transform: translateX(20px); }
.weight { display: inline-flex; gap: 3px; align-items: center; }
.weight i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.weight i.off { background: var(--rule); }

/* ---------- phone-only chrome rules ---------- */
@media (max-width: 1023.98px) {
  .to-picked { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 12px; }
  .to-picked > .av, .to-picked > .row-ic, .to-picked > .btn { grid-row: 1 / span 2; align-self: center; }
  .to-picked > .row-main { grid-column: 2; grid-row: 1; }
  .to-picked:not(.is-new) > .row-main .row-sub { display: none; }
  .to-picked.is-new > .av, .to-picked.is-new > .row-ic, .to-picked.is-new > .btn { grid-row: 1 / span 2; }
  .to-picked > .tag { grid-column: 2; grid-row: 2; justify-self: start; }
  .only-desk, .hide-phone { display: none !important; }
  .app[data-flow] .top, .app[data-flow] .tabs, .app:has(.view > .vh) .top { display: none; }
  .app[data-flow] { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .app[data-flow] .sticky-go { bottom: calc(12px + env(safe-area-inset-bottom)); }
  .app[data-rack="desk"] .rack { display: none; }
  .app[data-view="home"] .recent .row:nth-child(n+4) { display: none; }
  .only-phone-hide { display: none; }
  .split-list[data-has-detail] { display: none; }
}
@media (max-width: 1023.98px) and (max-height: 760px) {
  :root { --strip: 50px; --plate-h: 166px; }
  .rack-head { min-height: 88px; } .total-fig { font-size: 36px; }
}
@media (max-width: 380px) { .total-fig { font-size: 36px; } }

/* ---------- desktop: the rack stands on the left ---------- */
@media (min-width: 1024px) {
  :root { --strip: 80px; --plate-h: 228px; --r-plate: 26px; }
  .only-phone { display: none !important; }
  .app { max-width: none; padding-bottom: 0; }
  .top { position: sticky; top: 0; z-index: 30; height: 68px; padding: 0 32px; background: color-mix(in oklch, var(--stage) 86%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--rule); }
  .ws-wrap { flex: 1; }
  .topnav { display: flex; gap: 4px; }
  .topnav a, .topnav button { height: 40px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; gap: 8px; font: 600 15px var(--f-display); color: var(--muted); transition: background-color .15s, color .15s; }
  .topnav a:hover, .topnav button:hover { color: var(--ink); }
  .topnav [aria-current] { background: var(--raise); color: var(--ink); }
  .topnav .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn); color: var(--inv); font: 700 12px/20px var(--f-display); text-align: center; }
  .topnav button .ic { width: 14px; height: 14px; }
  .top-right { flex: 1; justify-content: flex-end; }
  .cmdk-btn { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 10px 0 12px; margin-right: 6px; border-radius: 12px; background: var(--raise); color: var(--muted); font-size: 14px; transition: color .15s; }
  .cmdk-btn:hover { color: var(--ink); }
  .cmdk-btn .ic { width: 18px; height: 18px; }
  .tabs { display: none; }
  .frozen-bar { max-width: 1116px; margin: 16px auto 0; width: calc(100% - 64px); }
  .body { flex-direction: row; align-items: flex-start; gap: 80px; max-width: 1180px; width: 100%; margin: 0 auto; padding: 44px 32px 80px; }
  .rack { display: block; width: 408px; flex: none; position: sticky; top: 112px; }
  .app[data-rack="none"] .rack { display: none; }
  .rack[data-lifted] .rack-head { min-height: 104px; }
  .rack[data-lifted] .total { display: grid; }
  .rack[data-lifted] .rack-back { display: none; }
  .rack[data-lifted] .stack { height: calc(var(--strip) * (var(--n) - 1) + var(--plate-h)); }
  .rack-note { display: block; margin-top: 18px; padding: 0 4px; font-size: 14px; color: var(--muted); }
  .rack-note a { color: var(--ink-2); font-weight: 500; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 4px; }
  .plate { touch-action: auto; }
  .plate, .plate.is-lifted, .rack[data-lifted] .plate:not(.is-lifted) { transform: translateY(calc((var(--slot, var(--i)) - var(--i)) * var(--strip))); z-index: calc(var(--slot, var(--i)) + 1); opacity: 1; pointer-events: auto; transition: transform .65s var(--spring); }
  .plate:not(.is-front):hover { transform: translateY(calc((var(--slot, var(--i)) - var(--i)) * var(--strip) - 8px)); }
  .plate:hover .plate-body { transform: perspective(900px) rotateX(calc((var(--py, .5) - .5) * -5deg)) rotateY(calc((var(--px, .5) - .5) * 5deg)); }
  .plate.is-lifted:not(.is-front) .plate-val { transform: none; }
  .plate-name, .plate-val { font-size: 18px; }
  .plate.is-front .plate-val { transform: scale(1.3); }
  .total-fig { font-size: 46px; }
  .view { flex: 1; min-width: 0; padding-top: 6px; }
  .app[data-rack="stack"] .view, .app[data-rack="lifted"] .view, .app[data-rack="desk"] .view { max-width: 620px; }
  .app[data-narrow] .view { max-width: 620px; margin: 0 auto; }
  .desk-title { display: block; font: 600 34px/1.1 var(--f-display); letter-spacing: -0.02em; margin-bottom: 8px; }
  .asset-head { display: block; margin-bottom: 4px; }
  .asset-head h1 { display: flex; align-items: center; gap: 10px; font: 600 20px var(--f-display); color: var(--muted); }
  .asset-fig { font: 500 56px/1.1 var(--f-display); letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
  .page-title { font-size: 34px; padding-top: 0; }
  .page-head { padding: 0 4px 22px; }
  .actions { margin-top: 20px; grid-auto-columns: minmax(0, 190px); justify-content: start; }
  .act { height: 50px; }
  .act .long { display: inline; } .act .short { display: none; }
  .vh { height: 48px; margin-bottom: 14px; }
  .vh h1 { font-size: 24px; }
  .sign-phone, .review-plate { display: none; }
  .sign-desk { display: block; margin-top: 20px; }
  .done { min-height: 560px; }
  .settling { background: color-mix(in oklch, var(--stage) 88%, transparent); backdrop-filter: blur(12px); }
  .sheet-wrap { align-items: center; }
  .sheet { border-radius: 28px; max-width: 480px; padding: 22px 24px 24px; transform: translateY(30px) scale(.96); opacity: 0; transition: transform .4s var(--spring), opacity .2s; }
  .sheet-wrap.on .sheet { transform: none; opacity: 1; }
  .sheet-wrap.modal .sheet { max-width: 760px; padding: 36px 40px; }
  .grab { display: none; }
  .toast { bottom: 36px; }
  .tr.th { display: grid; min-height: 40px; font: 600 13px var(--f-display); color: var(--muted); }
  .tr.th .td { font-size: 13px; }
  .tr { min-height: 58px; }
  .tbl-vaults { --cols: minmax(0, 1.5fr) minmax(0, 1fr) 150px 180px; }
  .tbl-activity { --cols: minmax(0, 1.7fr) minmax(0, 1fr) minmax(0, 1fr) 110px 170px; }
  .tbl-cps { --cols: minmax(0, 1.6fr) 150px 120px 150px 170px; }
  .tbl-team { --cols: minmax(0, 1.6fr) 110px minmax(0, 1fr) 130px; }
  .tbl-inv { --cols: minmax(0, 1fr) auto 140px; }
  .tbl-audit { --cols: 110px 220px minmax(0, 1fr); }
  .tbl-audit .tr { padding: 8px 4px; }
  .split { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 56px; align-items: start; }
  .split-detail, .split-detail[data-empty] { display: flex; flex-direction: column; position: sticky; top: 100px; max-height: calc(100dvh - 124px); padding: 0; overflow: hidden; }
  .detail-body { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 20px 16px; overscroll-behavior: contain; }
  .detail-foot { flex: none; margin: 0; padding: 14px 20px 18px; border-top: 1px solid var(--rule); }
  .detail-foot .foot-note { margin: 10px 0 0; }
  .split-detail .kv > div { padding: 11px 0; }
  .split-detail .signer { min-height: 46px; }
  .split-list[data-has-detail] { display: block; }
  .stats { grid-template-columns: repeat(4, 1fr); padding-bottom: 24px; }
  .stat b { font-size: 26px; }
  .vrow { grid-template-columns: 64px minmax(0, 1.2fr) 96px minmax(0, 1.4fr) 120px; }
  .vrow .ad, .vrow .nw { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
  .sticky-go { bottom: 20px; grid-template-columns: 1fr auto; align-items: center; padding: 12px 12px 12px 20px; }
  .sticky-go .btn { width: auto; }
  .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
  .rule-sentence { font-size: 24px; }
  .freeze-wrap { max-width: 520px; margin: 0 auto; }
  .more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
  .more-grid .card-rows.second { margin-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(b6-view), ::view-transition-new(b6-view) { animation: none; }
}
