/* The voices on the pixel grid (pixel-grid.js): orange for you and sky for the Steward in light mode (the owner's pick,
   30 Nov 2026), drawn like a physical panel there: solid unlit dots, light bleeding two dots out around lit ones (wide bleed). Dark mode
   keeps the brand's canopy and sky, glowing. In both, where the two voices meet they add up like light, toward white
   (CSS's screen blend). High contrast keeps the theme's own colours. */
:root { --voice-blend: screen; --voice-from: middle; } /* both themes: the voices add up like light, toward white, where they
   meet, and the wave grows from the middle up and down (the owner's pick) */
:root[data-scheme="light"] { --voice-you: #f07a2a; --voice-them: #2f7bd8; --voice-off: #e9e5de; --voice-bleed: .32; --voice-reach: 2; --voice-bloom: 0; --voice-round: 1; }
:root[data-contrast="more"][data-scheme="light"] { --voice-you: var(--canopy); --voice-them: var(--sky); }

/* Ask the Steward from any page (steward-ask.js). Desktop: a one-line field in the header's top-right corner (the
   header keeps room for it), opening on focus into a box over the content: the words, @/# suggestions, "This page",
   round buttons, a grip to make it taller. Phone: a row of its own between the content and the bar, so it covers
   nothing; while the keyboard is up the bar steps aside (body.sk-kb) and the box sits on the keyboard. Flat: hairlines;
   the open box is the one floating thing, with --elev-2 like the other popovers. Loaded after frame.css. */
.sk[hidden] { display: none !important; }
.shell { --sk-w: clamp(200px, 22vw, 280px); }
.sk { grid-row: 1; grid-column: 2; justify-self: end; align-self: center; position: relative; z-index: var(--z-popover); width: var(--sk-w); height: 32px; margin: 0 12px 0 0; }
.shell:has(> .sk:not([hidden])) .topbar { padding-right: calc(var(--sk-w) + 24px); }
.sk-box { position: absolute; top: 0; right: 0; width: 100%; min-height: 32px; box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "ic t acts"; align-items: center; column-gap: 8px; padding: 0 3px 0 10px; border: 1px solid var(--chrome-line); border-radius: 16px;
  background: none; color: var(--chrome-fg-2); transition: width var(--dur-2) var(--ease-emph), background-color var(--dur-1) var(--ease-out); }
.sk-box:hover { background: var(--chrome-hover); }
.sk-ic { grid-area: ic; display: grid; place-items: center; }
.sk-ic svg { width: 16px; height: 16px; }
.sk-in { grid-area: t; min-width: 0; min-height: 20px; max-height: 20px; margin: 5px 0; overflow: hidden; outline: none; cursor: text;
  color: var(--chrome-fg); font: 13.5px/20px var(--sans); white-space: nowrap; word-break: break-word; }
.sk-in:empty::before { content: attr(data-placeholder); color: var(--chrome-fg-2); pointer-events: none; }
.sk-in:focus-visible, .sk-in:focus { outline: none !important; } /* the open box is the focus: its edge and its lift */
.sk-in .ask-chip { white-space: nowrap; }
.sk-foot { grid-area: foot; display: none; align-items: center; gap: 10px; min-width: 0; }
.sk-hint { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-ctx { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px 0 7px; border: 1px solid var(--line-2); border-radius: 12px; background: none;
  color: var(--text-2); font: 12px var(--sans); cursor: pointer; }
.sk-ctx svg { width: 13px; height: 13px; }
.sk-ctx[aria-pressed="true"] { border-color: color-mix(in srgb, var(--canopy) 45%, transparent); color: var(--canopy-2); }
.sk-ctx[hidden] { display: none; }
.sk-acts { grid-area: acts; display: flex; align-items: center; gap: 2px; }
/* the buttons: round, icon only, their names in aria-label and title */
.sk-b { width: 28px; height: 28px; padding: 0; display: inline-grid; place-items: center; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.sk-b svg { width: 16px; height: 16px; }
.sk-b:hover { background: var(--chrome-active); color: var(--chrome-fg); }
.sk-b:disabled { opacity: .45; cursor: not-allowed; }
.sk-b:focus-visible, .sk-ctx:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: 1px; }
.sk-send { display: none; background: var(--canopy-fill); color: var(--on-fill); }
.sk-send:hover { background: var(--canopy-fill-2); color: var(--on-fill); }
.sk-send:disabled { cursor: progress; }
.sk-send svg { width: 15px; height: 15px; }
.sk-talk { display: none; }
.sk-grip { display: none; }
/* suggestions for @ and # */
.sk-pick { grid-area: pick; max-height: 260px; overflow-y: auto; margin: 0 -8px 0 -12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sk-pick[hidden] { display: none; }
.sk-pick-h { padding: 8px 14px 4px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); }
.sk-pick-it { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 4px 14px; cursor: pointer; border-left: 2px solid transparent; }
.sk-pick-it.on { background: var(--ink-3); border-left-color: var(--canopy); }
.sk-pick-it > svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.sk-pick-it span { display: flex; flex-direction: column; min-width: 0; }
.sk-pick-it b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-pick-it small { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sk-pick-none { padding: 6px 14px 10px; font-size: 13px; color: var(--text-3); }

/* open: focused (or recording), wider, on the popovers' surface; the field grows with what's typed */
.sk:focus-within .sk-box { width: min(480px, calc(100vw - var(--side-w) - 32px)); grid-template-areas: "ic t t" "pick pick pick" "foot foot acts"; row-gap: 8px; align-items: start;
  padding: 8px 8px 8px 12px; border-color: var(--line-2); border-radius: 12px; background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2); }
.sk:focus-within .sk-ic { height: 20px; margin-top: 1px; color: var(--text-2); }
.sk:focus-within .sk-in { margin: 1px 0; max-height: 160px; overflow-y: auto; white-space: pre-wrap; color: var(--text); }
.sk:focus-within .sk-in:empty::before { color: var(--text-3); }
.sk:focus-within .sk-foot { display: flex; align-self: center; }
.sk:focus-within .sk-send, .sk:focus-within .sk-talk { display: inline-grid; }
.sk:focus-within .sk-b { width: 32px; height: 32px; color: var(--text-2); }
.sk:focus-within .sk-b:hover { background: var(--ink-3); color: var(--text); }
.sk:focus-within .sk-send, .sk:focus-within .sk-send:hover { color: var(--on-fill); }
.sk:focus-within .sk-grip { display: block; position: absolute; left: 50%; bottom: 2px; width: 32px; height: 10px; margin-left: -16px; cursor: ns-resize; touch-action: none; }
.sk-grip::after { content: ""; position: absolute; left: 6px; right: 6px; top: 4px; height: 2px; border-radius: 1px; background: var(--line-2); }
.sk-grip:hover::after { background: var(--text-3); }
/* recording: the bar (bindMic) in the open box's place */
.sk.vm-on { width: auto; height: auto; }
.sk.vm-on > .vm-rec { min-width: 380px; min-height: 32px; box-sizing: border-box; padding: 4px 4px 4px 12px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2); }
.sk.vm-on > .vm-rec .btn { height: 26px; border-radius: 13px; }
body.chrome-compact .sk, body.chrome-hidden .sk { display: none !important; }
body.chrome-compact .shell .topbar, body.chrome-hidden .shell .topbar { padding-right: 12px; }
:root[data-motion="reduced"] .sk-box { transition: none; }

@media (max-width: 780px) {
  /* behind the composer and the call: the page's own colour at the top, blending into the bar's at the bottom, so the
     page seems to carry on behind them instead of ending at a band (the owner's ask) */
  .shell { --sk-row: linear-gradient(to bottom, var(--content-bg), var(--chrome-bg)); }
  .shell, .shell[data-side="open"] { grid-template-rows: var(--header-h) minmax(0, 1fr) auto auto; }
  .mnav { grid-row: 4; }
  .shell:has(> .sk:not([hidden])) .topbar { padding-right: 6px; }
  .sk { grid-row: 3; grid-column: 1; justify-self: stretch; width: auto; height: auto; z-index: auto; margin: 0;
    padding: 6px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left)); background: var(--sk-row); }
  .sk-box, .sk:focus-within .sk-box { position: static; width: auto; min-height: 40px; grid-template-areas: "foot foot foot" "ic t acts"; align-items: end; row-gap: 0;
    padding: 0 4px 0 12px; border: 1px solid var(--chrome-line); border-radius: 20px; background: var(--content-bg); color: var(--text-2); box-shadow: none; }
  .sk:focus-within .sk-box { row-gap: 2px; padding-top: 6px; border-radius: 16px; }
  .sk-box:hover { background: var(--content-bg); }
  .sk-ic, .sk:focus-within .sk-ic { height: 38px; margin: 0; }
  /* 16 px: iOS doesn't zoom in */
  .sk-in, .sk:focus-within .sk-in { margin: 9px 0; font-size: 16px; line-height: 20px; white-space: pre-wrap; max-height: 120px; overflow-y: auto; color: var(--text); }
  .sk-in:empty::before { color: var(--text-3); }
  .sk:focus-within .sk-hint { display: none; }
  .sk-acts { height: 38px; gap: 0; }
  .sk-b, .sk:focus-within .sk-b { width: 34px; height: 34px; color: var(--text-2); }
  .sk-b svg { width: 19px; height: 19px; }
  .sk-b:hover { background: none; }
  /* a messenger's buttons: Talk and the mic while it is empty, Send once something is typed */
  .sk-talk, .sk:focus-within .sk-talk { display: inline-grid; }
  .sk-send, .sk:focus-within .sk-send { display: none; }
  .sk.has-text .sk-send { display: inline-grid; }
  .sk.has-text :is(.vm-mic, .sk-talk) { display: none; }
  .sk:focus-within .sk-grip { top: 0; bottom: auto; }
  .sk-pick { position: absolute; left: 0; right: 0; bottom: 100%; margin: 0; max-height: min(320px, 45dvh); background: var(--pop-bg); border-top: 1px solid var(--line-2); border-bottom: 0; z-index: var(--z-popover); }
  .sk { position: relative; }
  .sk.vm-on > .vm-rec { min-width: 0; min-height: 40px; border-radius: 20px; box-shadow: none; padding: 4px 4px 4px 14px; }
  /* a page with its own message box at the bottom (a chat, an agent's conversation) keeps only that one */
  .shell:has(#view :is(.cv-compose, .tc-compose, #composer:not(.hide))) > .sk:not(.talking) { display: none !important; }
  /* the keyboard is up: the bar steps aside, so the box sits on the keyboard */
  body.sk-kb .mnav { display: none; }
  body.chrome-hidden .shell { grid-template-rows: minmax(0, 1fr); }
}

/* ---------- Talk: the call (voice.js) ----------
   A card over the page: above the phone bar, bottom right on a desktop. Light and dark from the theme's tokens.
   Concentric: the dock is 44 px with 36 px round buttons, so 4 px all round, radius 22; the card adds 8 px of padding
   around it, so its radius is 30. The voice line sits between the two buttons with the same 4 px breathing room. */
.sk.talking .sk-talk { color: var(--canopy-2); }
.vx-call { position: fixed; z-index: var(--z-sheet); right: 16px; bottom: 16px; width: min(360px, calc(100vw - 32px)); }
.vx { display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 30px; background: var(--pop-bg); color: var(--text);
  box-shadow: var(--elev-2); animation: vx-in var(--dur-3, .28s) var(--ease-emph, cubic-bezier(.2, .8, .2, 1)); }
.vx:focus, .vx:focus-visible { outline: none !important; }
@keyframes vx-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
/* spacing (the owner's pick of the recommended): the card's 8 px padding is the frame; text sits a step further in,
   16 px from the sides and the top (header 32 px tall), the round buttons half a step, 12 px, concentric with the 30 px
   corner, since a circle follows a curve and text needs a little more room */
.vx-h { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 0 8px; font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.vx-h b { color: var(--text); font-size: 13.5px; font-weight: 600; }
.vx-st { color: var(--text-2); }
.vx-where { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.vx-where:not(:empty)::before { content: "· "; }
.vx-t { margin-left: auto; font: 12px var(--mono); font-variant-numeric: tabular-nums; }
.vx-hsq:empty { display: none; }
.vx-win { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; height: 108px; overflow: hidden; padding: 0 8px 4px;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 48%); mask-image: linear-gradient(to bottom, transparent 0, #000 48%); }
.vx-ln { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.vx-ln.you, .vx-ln.quiet { color: var(--text-3); }
.vx-ln.tool { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.vx-go { display: flex; padding: 0 8px 4px; }
.vx-go[hidden] { display: none; }
.vx-set { height: 30px; padding: 0 14px; border: 0; border-radius: 15px; background: var(--canopy-fill); color: var(--on-fill); font: 600 13px var(--sans); cursor: pointer; }
.vx-set:hover { background: var(--canopy-fill-2); }
/* the 5 × 5 square of pixels: what it is doing (thinking, searching, writing, a tool) */
.vx-sq { flex: none; display: grid; grid-template-columns: repeat(5, 2px); gap: 1px; width: 14px; height: 14px; }
.vx-sq i { width: 2px; height: 2px; border-radius: .5px; background: var(--sky); opacity: .12; }
.vx-sq[data-kind="write"] i { background: var(--text-2); }
.vx-sq[data-kind="tool"] i { background: var(--canopy); }
/* the dock */
/* the dock: the pixel grid fills it edge to edge; the round buttons sit on it, each in a ring of the card's colour */
.vx-dock { position: relative; display: flex; align-items: center; justify-content: space-between; height: 44px; padding: 4px; border-radius: 22px; isolation: isolate; }
.vx-b { position: relative; z-index: var(--z-raise); flex: none; width: 36px; height: 36px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 4px var(--pop-bg); }
.vx-b svg { width: 18px; height: 18px; }
.vx-end { background: #e5484d; color: #fff; }
.vx-end:hover { background: #d63c41; }
.vx-b:focus-visible, .vx-set:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: 2px; }
/* the grid is as tall as the buttons (36 px) and level with them: its bottom on theirs, its top on theirs */
.vx-line { position: absolute; inset: 4px 0; z-index: 0; border-radius: 18px; overflow: hidden; }
.vx-line canvas { display: block; width: 100%; height: 100%; }
.vx-hint { position: absolute; inset: 0; z-index: var(--z-raise); display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .25s ease; }
.vx-hint > span { padding: 3px 10px; border-radius: 12px; font-size: 12.5px; background: var(--pop-bg); color: var(--text); box-shadow: 0 0 0 3px var(--pop-bg); }
.vx[data-state="listening"] .vx-hint { opacity: 1; }
.vx[data-state="listening"] .vx-line canvas { opacity: .35; }
:root[data-motion="reduced"] .vx { animation: none; }
@media (prefers-reduced-motion: reduce) { .vx { animation: none; } .vx-hint { transition: none; } }
@media (max-width: 780px) {
  /* on a phone the call takes the composer's place, above the bar, full width less the gutter */
  .sk.talking { display: none !important; }
  .shell > .vx-call { position: static; grid-row: 3; grid-column: 1; width: auto; z-index: auto;
    padding: 6px max(8px, env(safe-area-inset-right)) 6px max(8px, env(safe-area-inset-left)); background: var(--sk-row); }
  .vx { box-shadow: var(--elev-2); } /* floats on the gradient as on a desktop */
  .vx-win { height: 120px; }
  .vx-ln { font-size: 15px; }
  .vx-h { font-size: 13px; } .vx-h b { font-size: 14.5px; }
}

/* ---------- a voice message: hold the mic, slide up to lock, slide left to cancel (voice-note.js) ---------- */
.vn-wrap { grid-area: t; display: none; min-width: 0; }
.sk.vn-on .vn-wrap { display: block; }
.sk.vn-on :is(.sk-ic, .sk-in, .sk-foot, .sk-pick, .sk-grip, .sk-talk, .sk-send) { display: none !important; }
.sk.vn-on .sk-box { grid-template-areas: "t t acts"; width: min(440px, calc(100vw - var(--side-w) - 32px)); min-height: 40px; align-items: center; padding: 0 6px; border-color: var(--line-2); background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2); }
.sk.vn-locked .vm-mic { display: none !important; }
.sk.vn-locked .sk-box { grid-template-areas: "t t t"; } /* locked: the bar spans the box, Send on its right edge */
.sk.vn-locked .sk-acts { display: none; }
.vn { display: flex; align-items: center; gap: 8px; height: 38px; }
.vn-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); animation: cp-run 1.2s ease-in-out infinite; }
.vn-time { flex: none; min-width: 34px; font: 500 12.5px var(--mono); font-variant-numeric: tabular-nums; color: var(--text); }
.vn-grid { flex: 1; min-width: 40px; height: 20px; }
.vn-grid canvas { display: block; width: 100%; height: 100%; }
.vn-slide { flex: none; font-size: 12px; color: var(--text-3); white-space: nowrap; transition: color .15s ease, transform .15s ease; }
.sk.vn-cancel .vn-slide { color: var(--bad); transform: translateX(-4px); }
.sk.vn-locked .vn-slide { display: none; }
.vn-b { display: none; flex: none; width: 28px; height: 28px; padding: 0; place-items: center; border: 0; border-radius: 50%; cursor: pointer; }
.vn-b svg { width: 15px; height: 15px; }
.sk.vn-locked .vn-b { display: inline-grid; }
.vn-bin { background: color-mix(in srgb, var(--text) 8%, var(--vn-bg)); color: var(--text-2); }
.vn-bin:hover { color: var(--bad); }
.vn-send { background: var(--canopy-fill); color: var(--on-fill); }
.vn-send:hover { background: var(--canopy-fill-2); }
.vn-b:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: 2px; }
.vn-lock { display: none; }
.sk.vn-on .vm-mic { background: var(--bad); color: #fff; }
:root[data-motion="reduced"] .vn-dot { animation: none; }
@media (max-width: 780px) {
  .sk.vn-on .sk-box { width: auto; min-height: 46px; padding: 0 6px; box-shadow: none; border-color: var(--chrome-line); background: var(--content-bg); }
  .vn { height: 44px; gap: 10px; }
  .sk.vn-on .sk-acts { height: 44px; }
  .vn-time { font-size: 14px; }
  .vn-grid { height: 24px; }
  .vn-slide { font-size: 13px; }
  .vn-b { width: 34px; height: 34px; }
  .vn-b svg { width: 18px; height: 18px; }
  .sk.vn-on .vm-mic { display: inline-grid !important; }
  .sk.vn-locked .vm-mic { display: none !important; }
  /* the lock: a pill above the mic that fills as you slide up (phones; a mouse click locks at once) */
  .sk.vn-on:not(.vn-locked) .vn-lock { display: flex; position: absolute; right: 4px; bottom: calc(100% + 10px); width: 34px; height: 64px; flex-direction: column; align-items: center; justify-content: flex-start;
    padding-top: 7px; gap: 4px; border-radius: 17px; background: var(--pop-bg); color: var(--text); box-shadow: var(--elev-2);
    transform: translateY(calc(var(--vn-up, 0) * -14px)); }
  .vn-lock i { display: grid; place-items: center; color: color-mix(in srgb, var(--text-2) calc(60% + var(--vn-up, 0) * 40%), var(--canopy)); }
  .vn-lock i svg { width: 18px; height: 18px; }
  .vn-lock b { width: 8px; height: 8px; border-left: 1.6px solid currentColor; border-top: 1.6px solid currentColor; transform: rotate(45deg); margin-top: 6px; opacity: .7; }
  .sk.vn-on .sk-box { position: relative; }
}

/* ---------- a voice message's preview: the call card's note mode (voice.js preview) ---------- */
.vx-open { margin-left: auto; margin-right: -10px; height: 24px; padding: 0 10px; border: 0; border-radius: 12px; background: none; color: var(--text-2); font: 500 12.5px var(--sans); cursor: pointer; }
.vx-open:hover { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); }
.vx-open:focus-visible { outline: var(--focus-w, 2px) solid var(--focus); outline-offset: 1px; }
.vx-read, .vx-close { background: color-mix(in srgb, var(--text) 9%, var(--pop-bg)); color: var(--text); } /* opaque: no pixels show through */
.vx-read:hover, .vx-close:hover { background: color-mix(in srgb, var(--text) 14%, var(--pop-bg)); }
.vx-read[aria-pressed="false"] { color: var(--text-3); }
/* only the end of a call is red; Out loud on is the button lit in the text colour, off is quieter with a slash */
.vx.is-note .vx-win { height: 96px; }

/* the recording bar: the grid fills the composer's box; the dot and time, "Slide to cancel" and the buttons sit on it in
   rings of the box's colour, so they stay apart from the pixels */
.sk { --vn-bg: var(--pop-bg); }
/* the bar is 5 px taller than its buttons on each side and 6 px in from each edge, so their 3 px rings never reach the
   box's border (the owner's note); the grid is level with the buttons */
.vn-grid { position: absolute; inset: 5px 0; z-index: 0; border-radius: 14px; overflow: hidden; height: auto; min-width: 0; }
/* the time pill covers the grid's left end: as tall as the buttons (and the grid), its ring reaching the box's edge */
.vn-tag { position: relative; z-index: var(--z-raise); display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 10px; border-radius: 14px; background: var(--vn-bg); box-shadow: 0 0 0 3px var(--vn-bg); }
.vn-slide { position: relative; z-index: var(--z-raise); padding: 0 10px; height: 24px; display: inline-flex; align-items: center; border-radius: 12px; background: var(--vn-bg); box-shadow: 0 0 0 3px var(--vn-bg); }
.vn { position: static; justify-content: space-between; }
.vn-b { position: relative; z-index: var(--z-raise); box-shadow: 0 0 0 3px var(--vn-bg); }
.sk.vn-on .vm-mic { position: relative; z-index: var(--z-raise); box-shadow: 0 0 0 3px var(--vn-bg); }
.vn-sp { flex: 1; }
@media (max-width: 780px) {
  .sk { --vn-bg: var(--content-bg); }
  .vn-grid { inset: 5px 0; border-radius: 17px; } /* level with the 34 px buttons */
  .vn-tag { height: 34px; border-radius: 17px; }
  .vn-slide { height: 28px; border-radius: 14px; }
}
