/* Vesper web: Vesper Float's tokens (Sources/VesperFloat/Grok.swift `G`, Theme.swift) at phone size.
   Float's Mac sizes are scaled for touch: body 13.5 -> 16, title 15 -> 17, small 12.5 -> 14, pills 28 -> 40 tall.
   Colour only as status dots. One ease: cubic-bezier(.32,.72,0,1). No shadows, 1px inner lines. */
@property --a { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

:root, [data-theme="light"] {
  --ground: #F4F4F6; --surface: #FFFFFF; --inset: #F0F0F3; --inset2: #E7E7EB;
  --line: rgba(0,0,0,.07); --line2: rgba(0,0,0,.12);
  --text: #141416; --muted: #6E6E76; --faint: #A0A0A8;
  --primary-bg: #141416; --primary-fg: #FFFFFF; --secondary-bg: #EDEDF0; --secondary-fg: #141416;
  --ring: #141416; --stamp: #F0F0F3; --scrim: rgba(20,20,22,.28);
  --live: #34C77B; --hold: #F2A93B; --problem: #F2555A;
  --island: #0A0A0B; --island-text: #F2F2F4; --island-sub: #9A9AA2; --orb: #2A2A2F;
  --ease: cubic-bezier(.32,.72,0,1);
  --spring: cubic-bezier(.34,1.32,.5,1);        /* response .5, damping ~.78 */
  --font: -apple-system, "SF Pro Text", "SF Pro Display", system-ui, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --ground: #17171A; --surface: #222226; --inset: #2C2C31; --inset2: #34343A;
  --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.12);
  --text: #F2F2F4; --muted: #9A9AA2; --faint: #6C6C74;
  --primary-bg: #F2F2F4; --primary-fg: #141416; --secondary-bg: #34343A; --secondary-fg: #F2F2F4;
  --ring: #FFFFFF; --stamp: #2C2C31; --scrim: rgba(0,0,0,.45);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #17171A; --surface: #222226; --inset: #2C2C31; --inset2: #34343A;
    --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.12);
    --text: #F2F2F4; --muted: #9A9AA2; --faint: #6C6C74;
    --primary-bg: #F2F2F4; --primary-fg: #141416; --secondary-bg: #34343A; --secondary-fg: #F2F2F4;
    --ring: #FFFFFF; --stamp: #2C2C31; --scrim: rgba(0,0,0,.45);
    color-scheme: dark;
  }
}

/* ---------- the app frame ---------- */
.v-app { position: relative; height: 100%; overflow: hidden; overflow: clip; background: var(--ground); color: var(--text);
  font: 16px/1.38 var(--font); letter-spacing: -.01em; -webkit-font-smoothing: antialiased; font-feature-settings: "tnum" 0; }
:where(.v-app) * { box-sizing: border-box; }
:where(.v-app) button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.v-app .ic { flex: none; display: block; }
.v-num { font-variant-numeric: tabular-nums; }

.v-stage { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--ground);
  transition: transform .5s var(--ease), border-radius .5s var(--ease); will-change: transform; }
.v-top { flex: none; height: 52px; display: flex; align-items: center; gap: 4px; padding: 0 10px; margin-top: var(--safe-top, 54px); }
.v-top .v-ttl { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-ib { width: 44px; height: 44px; border-radius: 22px; display: grid; place-items: center; color: var(--text); transition: transform .12s, opacity .12s, background .2s; }
.v-ib:active, .v-press:active { transform: scale(.97); opacity: .7; }
.v-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 4px 16px 16px; scrollbar-width: none; }
.v-scroll::-webkit-scrollbar { display: none; }

/* ---------- type ---------- */
.v-h1 { font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -.03em; margin: 6px 0 2px; }
.v-sub { font-size: 15px; color: var(--muted); }
.v-sec { display: flex; align-items: baseline; justify-content: space-between; margin: 22px 2px 10px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.v-sec small { font-size: 14px; font-weight: 400; color: var(--muted); }
.v-muted { color: var(--muted); } .v-faint { color: var(--faint); }

/* ---------- cards (gCard) ---------- */
.v-card { background: var(--surface); border-radius: 20px; padding: 16px; box-shadow: inset 0 0 0 1px var(--line); position: relative; }
.v-card + .v-card { margin-top: 10px; }
.v-head { display: flex; align-items: center; gap: 11px; }
.v-tile { width: 36px; height: 36px; border-radius: 11px; background: var(--inset); display: grid; place-items: center; flex: none; color: var(--text); --stamp: var(--inset); }
.v-tile img { width: 20px; height: 20px; object-fit: contain; }
.v-head .t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.2; }
.v-head .s { font-size: 14px; color: var(--muted); line-height: 1.25; }
.v-head .grow { flex: 1; min-width: 0; }
.v-insetbox { margin-top: 12px; background: var(--inset); border-radius: 13px; padding: 11px 13px; font-size: 16px; line-height: 1.42; white-space: pre-wrap; outline: none; }
.v-insetbox[contenteditable="true"]:focus { box-shadow: inset 0 0 0 1.5px var(--ring); }
.v-facts { margin-top: 6px; }
.v-fact { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; }
.v-fact + .v-fact { box-shadow: inset 0 1px 0 var(--line); }
.v-fact span:first-child { color: var(--muted); }
.v-fact span:last-child { font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.v-warn { display: flex; gap: 9px; align-items: baseline; margin-top: 8px; font-size: 14px; color: var(--muted); }
.v-row { display: flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 44px; }
.v-row .sp { flex: 1; }

/* ---------- buttons (GButton, LogoButton) ---------- */
.v-btn { height: 40px; padding: 0 16px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 15px; font-weight: 500; white-space: nowrap; transition: transform .12s, opacity .12s; }
.v-btn img { width: 15px; height: 15px; }
.v-btn.primary { background: var(--primary-bg); color: var(--primary-fg); }
.v-btn.secondary { background: var(--secondary-bg); color: var(--secondary-fg); }
.v-btn.text { padding: 0 6px; color: var(--muted); }
.v-btn:active { transform: scale(.97); opacity: .7; }
.v-iconbtn { width: 40px; height: 40px; border-radius: 20px; background: var(--secondary-bg); display: grid; place-items: center; }

/* ---------- status dot (GDot) ---------- */
.v-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--live)); flex: none; position: relative; display: inline-block; }
.v-dot::before { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: var(--c, var(--live)); opacity: .18; }
.v-dot.breathe::before { animation: v-breathe 1.2s ease-in-out infinite alternate; }
@keyframes v-breathe { to { inset: -5px; opacity: .06; } }

/* ---------- liquid send (27 -> 26 -> 18) ---------- */
.v-liquid { position: relative; height: 40px; border-radius: 20px; background: var(--primary-bg); color: var(--primary-fg); overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; flex: none; cursor: pointer;
  transition: width .5s var(--spring), height .4s var(--spring), background .2s; font-size: 15px; font-weight: 500; }
.v-liquid .lbl { display: flex; align-items: center; gap: 7px; padding: 0 16px; white-space: nowrap; position: relative; z-index: 2; }
.v-liquid .lbl img { width: 15px; height: 15px; }
.v-liquid .fill { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--primary-bg); border-radius: 20px; z-index: 1; }
.v-liquid .ink { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--primary-fg); z-index: 3; clip-path: inset(0 100% 0 0); }
.v-liquid.sending { background: var(--secondary-bg); color: var(--secondary-fg); cursor: default; }
.v-liquid.sending .fill { width: 100%; transition: width 1.2s cubic-bezier(.45,0,.25,1) .2s; }
.v-liquid.sending .ink { clip-path: inset(0 0 0 0); transition: clip-path 1.2s cubic-bezier(.45,0,.25,1) .2s; }
.v-liquid.done { width: 44px !important; height: 44px; background: var(--primary-bg); }
.v-liquid.done .lbl, .v-liquid.done .ink { opacity: 0; }
.v-liquid .tick { position: absolute; inset: 0; display: grid; place-items: center; z-index: 4; opacity: 0; }
.v-liquid .tick path { stroke: var(--primary-fg); stroke-dasharray: 22; stroke-dashoffset: 22; }
.v-liquid.done .tick { opacity: 1; }
.v-liquid.done .tick path { stroke-dashoffset: 0; transition: stroke-dashoffset .3s ease-out .22s; }

.v-seal { position: absolute; top: 14px; right: 16px; width: 62px; height: 62px; border-radius: 50%; background: var(--primary-bg); color: var(--primary-fg);
  display: grid; place-items: center; transform: rotate(-12deg) scale(0); pointer-events: none; z-index: 5; }
.v-seal::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--primary-fg) 35%, transparent); }
.v-seal.on { animation: v-seal .6s var(--spring) forwards; }
@keyframes v-seal { 0% { transform: rotate(-12deg) scale(1.5); opacity: 0; } 30% { transform: rotate(-12deg) scale(.9); opacity: 1; } 100% { transform: rotate(-12deg) scale(1); opacity: 1; } }

.v-fold { overflow: hidden; transition: height .5s cubic-bezier(.34,1.18,.5,1), opacity .3s; }
.v-receipt { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px; background: var(--surface); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; font-weight: 500; }
.v-receipt .m { margin-left: auto; font-size: 14px; font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.v-receipt .ck path { stroke-dasharray: 22; stroke-dashoffset: 22; animation: v-draw .36s ease-out .3s forwards; }
.v-receipt.still .ck path { animation: none; stroke-dashoffset: 0; }
@keyframes v-draw { to { stroke-dashoffset: 0; } }
.v-undo { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; background: var(--surface); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); }
.v-undo .sp { flex: 1; }

/* ---------- arrive: a new line rises 6 pt and fades in ---------- */
.v-arrive { animation: v-arrive .5s var(--ease) both; }
@keyframes v-arrive { from { opacity: 0; transform: translateY(6px); } }

/* ---------- approval sheet sliding up over the composer ---------- */
.v-dock { position: absolute; left: 10px; right: 10px; bottom: calc(var(--composer-h, 120px) + 4px); z-index: 20; transform: translateY(calc(100% + var(--composer-h, 120px) + 40px));
  transition: transform .62s cubic-bezier(.3,1.25,.45,1); }
.v-dock.up { transform: none; }
.v-dock .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--inset2); margin: -6px auto 10px; }

/* ---------- glow V (working) and the pill ---------- */
.v-orb { width: 26px; height: 26px; border-radius: 50%; background: var(--orb); display: grid; place-items: center; color: var(--island-text); flex: none; }
.v-glow { color: #fff; animation: v-glow 1.1s ease-in-out infinite alternate; }
@keyframes v-glow { from { filter: drop-shadow(0 0 1.5px rgba(255,255,255,.55)); opacity: .82; } to { filter: drop-shadow(0 0 4.5px rgba(255,255,255,1)); opacity: 1; } }
.v-pill { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 16px 0 7px; border-radius: 20px; background: var(--island); color: var(--island-sub); font-size: 15px; max-width: 100%; }
.v-pill.working::after { content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--a), transparent 0 58%, rgba(255,255,255,.95) 82%, transparent 97%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: v-spin 2.04s linear infinite; }
.v-pill.needs::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.9); animation: v-ringb 1.2s ease-in-out infinite alternate; pointer-events: none; }
@keyframes v-spin { to { --a: 360deg; } }
@keyframes v-ringb { from { opacity: .25; } to { opacity: 1; } }

/* MorphText: letters roll up with a blur, 22 ms apart */
.v-morph { display: inline-flex; white-space: pre; overflow: hidden; }
.v-morph i { font-style: normal; display: inline-block; animation: v-letter .34s var(--ease) both; }
@keyframes v-letter { from { opacity: 0; transform: translateY(7px); filter: blur(3px); } }

/* ---------- composer ---------- */
/* The composer floats: no band behind it, content scrolls underneath the chips and the box. */
.v-composer { position: absolute; left: 0; right: 0; bottom: 0; padding: 6px 10px calc(var(--safe-bottom, 30px) + 2px); background: none; z-index: 21; pointer-events: none; }
.v-composer > * { pointer-events: auto; }
.v-stage > .v-scroll { padding-bottom: calc(var(--composer-h, 140px) + 16px); }
.v-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 6px 8px; margin: 0 -10px; padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px; scrollbar-width: none;
  -webkit-mask: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent); mask: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent); }
.v-chips::-webkit-scrollbar { display: none; }
.v-chip { flex: none; height: 36px; padding: 0 15px 0 12px; border-radius: 18px; line-height: 1; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); display: inline-flex; align-items: center; gap: 7px; font-size: 15px; white-space: nowrap; transition: transform .12s, opacity .12s; }
.v-chip .ic { color: var(--muted); }
.v-chip:active { transform: scale(.97); opacity: .7; }
.v-box { display: flex; align-items: flex-end; gap: 4px; padding: 5px; border-radius: 26px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line2); min-height: 52px; position: relative; transition: border-radius .3s var(--ease); }
.v-box .in { flex: 1; min-width: 0; padding: 10px 4px 10px 2px; font-size: 17px; outline: none; border: 0; background: transparent; color: var(--text); resize: none; line-height: 1.3; max-height: 120px; font-family: var(--font); }
.v-box .in::placeholder { color: var(--faint); }
.v-box .b { width: 42px; height: 42px; border-radius: 21px; display: grid; place-items: center; color: var(--muted); flex: none; transition: transform .12s, background .2s; }
.v-box .b:active { transform: scale(.94); }
.v-box .send { background: var(--primary-bg); color: var(--primary-fg); }
.v-box .send[disabled] { background: var(--inset2); color: var(--faint); }
.v-box.listening { background: var(--island); box-shadow: none; }
.v-box.listening .in, .v-box.listening .b:not(.mic) { opacity: 0; pointer-events: none; }
.v-box.listening .mic { background: #fff; color: #141416; transform: scale(1.12); }
.v-wave { position: absolute; left: 18px; right: 60px; top: 0; bottom: 0; display: none; align-items: center; gap: 3px; color: var(--island-text); font-size: 15px; }
.v-box.listening .v-wave { display: flex; }
.v-wave b { width: 3px; border-radius: 2px; background: var(--island-text); height: 6px; animation: v-bar .9s ease-in-out infinite; }
@keyframes v-bar { 50% { height: 22px; } }
.v-wave span { margin-left: auto; color: var(--island-sub); }

/* slash menu grows from the composer's top edge, never over the input */
.v-menu { position: absolute; left: 10px; right: 10px; bottom: calc(100% - 6px); background: var(--surface); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line2); padding: 6px;
  transform-origin: 30px 100%; transform: scale(.92) translateY(8px); opacity: 0; pointer-events: none; transition: transform .38s var(--spring), opacity .2s; }
.v-menu.on { transform: none; opacity: 1; pointer-events: auto; }
.v-menu button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 10px; border-radius: 13px; text-align: left; }
.v-menu button:active, .v-menu button.sel { background: var(--inset); }
.v-menu .k { font-size: 16px; font-weight: 500; }
.v-menu .d { font-size: 14px; color: var(--muted); }

/* ---------- drawer (sidebar) ---------- */
.v-drawer { position: absolute; inset: 0 auto 0 0; width: 312px; background: var(--ground); z-index: 30; transform: translateX(-100%); transition: transform .5s var(--ease); display: flex; flex-direction: column; box-shadow: inset -1px 0 0 var(--line); }
.v-scrim { position: absolute; inset: 0; background: var(--scrim); z-index: 29; opacity: 0; pointer-events: none; transition: opacity .4s var(--ease); }
.v-app.open .v-drawer { transform: none; }
.v-app.open .v-scrim { opacity: 1; pointer-events: auto; }
.v-app.open .v-stage { transform: translateX(60px); }
.v-search { margin: calc(var(--safe-top, 54px) + 6px) 14px 6px; height: 42px; border-radius: 21px; background: var(--inset); display: flex; align-items: center; gap: 8px; padding: 0 14px; color: var(--muted); font-size: 16px; }
.v-nav { padding: 4px 8px; }
.v-navi { display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 10px; border-radius: 14px; font-size: 16px; text-align: left; }
.v-navi.on { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.v-navi .ic { color: var(--muted); }
.v-navi.on .ic { color: var(--text); }
.v-navi .n { margin-left: auto; font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.v-group { padding: 14px 18px 4px; font-size: 13px; color: var(--muted); }
.v-sess { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 44px; padding: 6px 10px; border-radius: 14px; text-align: left; }
.v-sess:active { background: var(--inset); }
.v-sess .t { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; min-width: 0; }
.v-sess .src { width: 18px; height: 18px; display: grid; place-items: center; flex: none; color: var(--muted); }
.v-sess .src img { width: 15px; height: 15px; }
.v-me { margin-top: auto; display: flex; align-items: center; gap: 11px; padding: 10px 18px calc(var(--safe-bottom, 30px) + 4px); box-shadow: inset 0 1px 0 var(--line); }
.v-av { width: 34px; height: 34px; border-radius: 10px; background: var(--primary-bg); color: var(--primary-fg); display: grid; place-items: center; font-size: 15px; font-weight: 600; }

/* ---------- list rows ---------- */
.v-list { background: var(--surface); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); padding: 2px 0; }
.v-li { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 14px; position: relative; }
.v-li + .v-li::before { content: ""; position: absolute; top: 0; left: 52px; right: 0; height: 1px; background: var(--line); }
.v-li .grow { flex: 1; min-width: 0; }
.v-li .t { font-size: 16px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-li .s { font-size: 14px; color: var(--muted); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-li .m { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.v-li .chev { color: var(--faint); }
.v-li .lead { width: 26px; display: grid; place-items: center; color: var(--muted); flex: none; }
.v-li .lead img { width: 18px; height: 18px; }

/* ---------- chat ---------- */
.v-msg { margin: 12px 0; font-size: 16px; line-height: 1.45; }
.v-msg.me { margin-left: 56px; display: flex; justify-content: flex-end; }
.v-msg.me > div { background: var(--inset2); padding: 10px 14px; border-radius: 20px 20px 6px 20px; }
.v-msg.ves { display: flex; gap: 10px; }
.v-msg.ves .who { width: 26px; height: 26px; border-radius: 50%; background: var(--island); color: var(--island-text); display: grid; place-items: center; flex: none; margin-top: 1px; }
.v-quote { background: var(--surface); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); padding: 12px 14px; margin: 8px 0 0 36px; font-size: 15px; }
.v-quote .h { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.v-quote .h img { width: 15px; height: 15px; }

/* ---------- glance tiles ---------- */
.v-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.v-tilecard { background: var(--surface); border-radius: 20px; box-shadow: inset 0 0 0 1px var(--line); padding: 14px; min-height: 104px; display: flex; flex-direction: column; gap: 6px; text-align: left; transition: transform .12s, opacity .12s; }
.v-tilecard:active { transform: scale(.97); opacity: .7; }
.v-tilecard .top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 14px; }
.v-tilecard .big { font-size: 26px; font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-top: auto; line-height: 1; }
.v-tilecard .sm { font-size: 14px; color: var(--muted); }
.v-hscroll { display: flex; gap: 10px; overflow-x: auto; margin: 0 -16px; padding: 0 16px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.v-hscroll::-webkit-scrollbar { display: none; }
.v-hscroll > * { scroll-snap-align: start; flex: none; width: 168px; }

/* segmented (LiquidSegments) */
.v-seg { position: relative; display: flex; background: var(--inset); border-radius: 20px; padding: 3px; height: 40px; }
.v-seg button { flex: 1; position: relative; z-index: 1; font-size: 15px; color: var(--muted); border-radius: 17px; transition: color .25s; }
.v-seg button.on { color: var(--text); font-weight: 500; }
.v-seg .knob { position: absolute; top: 3px; bottom: 3px; left: 3px; border-radius: 17px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); transition: transform .45s var(--spring), width .45s var(--spring); }

/* the island header (direction D) */
.v-island { background: var(--island); color: var(--island-text); border-radius: 26px; padding: 14px; }
.v-island .row { display: flex; align-items: center; gap: 10px; }
.v-island .t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.v-island .s { font-size: 14px; color: var(--island-sub); }

/* deck: cards stacked, the top one whole (Float 17) */
.v-deck { position: relative; }
.v-deck .behind { position: absolute; left: 12px; right: 12px; bottom: -8px; height: 30px; background: var(--surface); border-radius: 18px; box-shadow: inset 0 0 0 1px var(--line); opacity: .7; z-index: 0; }
.v-deck .behind.b2 { left: 24px; right: 24px; bottom: -15px; opacity: .45; }
.v-deck .v-card, .v-deck .v-fold { position: relative; z-index: 1; }

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

/* ---------- app-only pieces ---------- */
.v-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 16px var(--font); }
.v-search input::placeholder { color: var(--muted); }
.v-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.v-stats button { text-align: left; }
.v-stats .t { font-size: 17px; font-weight: 600; letter-spacing: -.02em; color: var(--island-text); }
.v-stats .s { font-size: 14px; color: var(--island-sub); }
.v-island .v-pill { max-width: 100%; }
.v-island .v-pill .v-morph { overflow: hidden; text-overflow: ellipsis; }
.v-md p { margin: 0 0 8px; } .v-md p:last-child { margin-bottom: 0; }
.v-md ul { margin: 4px 0 8px; padding-left: 20px; } .v-md li { margin: 2px 0; }
.v-md code { font: 14px ui-monospace, "SF Mono", monospace; background: var(--inset); padding: 1px 5px; border-radius: 6px; }
.v-md a, .v-msg a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--faint); }
.v-msg.ves > div { min-width: 0; overflow-wrap: anywhere; }
.v-msg.me .via img { width: 13px; height: 13px; vertical-align: -1px; margin-right: 6px; }
.v-note { display: flex; align-items: center; gap: 9px; margin: 10px 0 10px 36px; color: var(--muted); font-size: 14px; }
.v-empty { padding: 60px 6px 0; color: var(--text); }

/* toast: drops from the top like Float's notice */
.v-toast { position: absolute; left: 12px; right: 12px; top: calc(var(--safe-top, 54px) + 6px); z-index: 50; display: flex; align-items: center; gap: 11px; padding: 10px 14px 10px 10px;
  border-radius: 24px; background: var(--island); color: var(--island-text); text-align: left; transform: translateY(-140%) scale(.96); opacity: 0;
  transition: transform .55s cubic-bezier(.3,1.3,.45,1), opacity .25s; }
.v-toast.on { transform: none; opacity: 1; }
.v-toast .tx { display: flex; flex-direction: column; min-width: 0; }
.v-toast b { font-size: 15px; font-weight: 600; }
.v-toast span:not(.v-orb) { font-size: 14px; color: var(--island-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* sheet: slides up from the bottom */
.v-sheet { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.v-sheet-scrim { position: absolute; inset: 0; background: var(--scrim); opacity: 0; transition: opacity .4s var(--ease); }
.v-sheet-body { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88%; overflow-y: auto; background: var(--ground); border-radius: 28px 28px 0 0;
  padding: 12px 18px calc(var(--safe-bottom, 30px) + 14px); box-shadow: inset 0 1px 0 var(--line); transform: translateY(100%); transition: transform .55s cubic-bezier(.3,1.15,.45,1); }
.v-sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--inset2); margin: 0 auto 14px; }
.v-sheet.on { pointer-events: auto; }
.v-sheet.on .v-sheet-scrim { opacity: 1; }
.v-sheet.on .v-sheet-body { transform: none; }

/* sign-in */
.v-login { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; padding: 0 28px calc(var(--safe-bottom, 30px) + 40px); }
.v-login-icon { width: 76px; height: 76px; border-radius: 18px; }
.v-wide { width: 100%; height: 50px; border-radius: 25px; font-size: 17px; }
.v-or { text-align: center; color: var(--muted); font-size: 14px; margin: 18px 0 12px; }
.v-pass { display: flex; gap: 8px; padding: 5px; border-radius: 28px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line2); }
.v-pass input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: 17px var(--font); padding: 0 14px; letter-spacing: .1em; }
.v-pass .v-btn { height: 44px; border-radius: 22px; }
.v-err { min-height: 22px; margin-top: 10px; color: var(--muted); font-size: 14px; }
.shake { animation: v-shake .42s cubic-bezier(.36,.07,.19,.97); }
@keyframes v-shake { 20%, 60% { transform: translateX(-7px); } 40%, 80% { transform: translateX(7px); } }

/* ---------- tasks ---------- */
.v-stat { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px 0 9px; border-radius: 13px; background: var(--inset); color: var(--muted); font-size: 13px; white-space: nowrap; flex: none; }
.v-stat .v-orb { width: 16px; height: 16px; }
.v-taskbar { display: flex; align-items: center; gap: 8px; padding: 0 16px 8px; }
.v-taskbar .spend { margin-left: auto; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; height: 26px; padding: 0 10px; border-radius: 13px; }
.v-taskbar .spend:active { background: var(--inset); }
.v-sess .v-stat { height: 22px; padding: 0 8px 0 7px; font-size: 12px; }

/* intake questions */
.v-q .qq { font-size: 16px; font-weight: 500; margin: 16px 0 8px; letter-spacing: -.01em; }
.v-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.v-opt { height: 38px; padding: 0 15px; border-radius: 19px; background: var(--inset); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; transition: background .2s, box-shadow .2s, transform .12s; }
.v-opt.on { background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--ring); font-weight: 500; }
.v-opt:active { transform: scale(.97); }
.v-opt .rec { font-size: 12px; color: var(--muted); font-weight: 400; }
.v-answered { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin-top: 12px; font-size: 15px; }
.v-answered span:nth-child(odd) { color: var(--muted); }

/* deliverables */
.v-sum { margin-top: 10px; font-size: 15px; line-height: 1.45; }
.v-sum div + div { color: var(--muted); }
.v-link { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 13px; background: var(--inset); font-size: 14px; color: var(--muted); overflow: hidden; }
.v-link span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v-reviewed { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 14px; color: var(--muted); }

/* paused island */
.v-pill.paused { background: #151517; color: var(--island-text); }
.v-pill.paused .v-orb { background: var(--hold); color: #141416; }
.v-box.busy .v-wave b { animation-duration: 2s; opacity: .5; }

/* read-only Slack thread footer */
.v-readonly { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 10px calc(var(--safe-bottom, 30px) + 4px); padding: 14px 16px; border-radius: 20px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--muted); font-size: 15px; }
.v-readonly img { width: 18px; height: 18px; }
.v-code { font: 13px ui-monospace, "SF Mono", monospace; background: var(--inset); border-radius: 10px; padding: 10px 12px; word-break: break-all; margin-top: 8px; }
.v-steps { margin: 10px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.5; }
.v-steps li { margin: 4px 0; }

/* The input row sits on its own band of ground; the chips above it float with nothing behind them. */
.v-box::before { content: ""; position: absolute; left: -10px; right: -10px; top: -10px; bottom: calc(-1 * (var(--safe-bottom, 30px) + 2px)); z-index: -1;
  background: linear-gradient(to bottom, transparent, var(--ground) 10px); pointer-events: none; }
.v-box.listening::before { background: linear-gradient(to bottom, transparent, var(--ground) 10px); }
