/* The Clients grid (agency-clients.js) and the client place (agency-client.js + agency-play.js), 2045 language
   (notes/DESIGN-2045-2026-11-20.md). Built from the tokens in future.css (loaded after this file): porcelain,
   black + cobalt, the aurora only for AI. Radius: cards 22, inner 14, pills full. Motion 160/260 ms, one ease.
   Phone 390: the canvas is a vertical stack and the panels are bottom sheets that float above the app bar. */

body.agency-body { --pl-gap: 12px; --pl-chat-w: 320px; --pl-panel-w: 412px; --pl-sheet-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }

/* small shared bits */
.pl-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--fx-cobalt); color: #fff; font: 600 12px/1 var(--fx-sans); }
body.agency-body .pl-ibtn { position: relative; width: var(--fx-h); height: var(--fx-h); padding: 0; display: inline-grid; place-items: center; flex: none; border: 0; border-radius: 50%; background: transparent; box-shadow: none; color: var(--fx-ink-3); cursor: pointer; text-decoration: none;
  transition: background var(--fx-fast) var(--fx-ease), color var(--fx-fast) var(--fx-ease); }
body.agency-body .pl-ibtn:hover { background: var(--fx-sunk); color: var(--fx-ink); }
body.agency-body .pl-ibtn[aria-pressed="true"] { background: var(--fx-ink); color: #fff; }
.pl-ibtn .ico { width: 17px; height: 17px; }
.pl-ibtn .pl-badge { position: absolute; top: -3px; right: -5px; box-shadow: 0 0 0 2px var(--fx-card); }
.fx-node-tag.ink { background: var(--fx-ink); color: #fff; }
.fx-node-tag.soft { background: var(--fx-sunk); color: var(--fx-ink-2); }
body.agency-body .fx-btn { text-decoration: none; white-space: nowrap; }
body.agency-body .fx-btn:disabled { opacity: .45; cursor: default; transform: none; }
body.agency-body .fx-btn .ico { width: 15px; height: 15px; }
body.agency-body .fx-btn.on { box-shadow: 0 0 0 1.5px var(--fx-ink); }
body.agency-body .fx-btn.primary.on { box-shadow: 0 0 0 3px var(--fx-cobalt-soft), inset 0 1px 0 rgba(255, 255, 255, .14); }

/* ════ Clients: a bento grid ════ */
.cg-page > * + * { margin-top: 18px; }
.cg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 4px 4px 0; }
.cg-title { font: 500 var(--fx-t-title)/1.08 var(--fx-sans); letter-spacing: -.035em; word-spacing: 0; color: var(--fx-ink); margin: 0; }
.cg-sub { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; min-height: 13px; }
.cg-tabs { padding: 0 4px; box-shadow: inset 0 -1px 0 var(--fx-line); }
.cg-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); grid-auto-flow: dense; gap: 16px; }
.cg { position: relative; display: grid; grid-template-rows: auto 1fr; min-width: 0; overflow: hidden; cursor: pointer; outline: none;
  transition: transform var(--fx-med) var(--fx-ease), box-shadow var(--fx-med) var(--fx-ease); }
.cg:hover { transform: translateY(-2px); box-shadow: var(--fx-shadow-float); }
.cg:focus-visible { box-shadow: 0 0 0 2px var(--fx-cobalt), var(--fx-shadow-card); }
/* the soft well with their live app peeking up from the bottom */
.cg-well { position: relative; height: 204px; margin: 8px 8px 0; border-radius: var(--fx-r-inner); display: flex; align-items: flex-end; justify-content: center; overflow: hidden;
  background: radial-gradient(80% 70% at 50% 110%, rgba(201, 100, 66, .10), transparent 70%), var(--fx-sunk); box-shadow: inset 0 0 0 1px var(--fx-line); }
.cg-well.fx-ai-edge { overflow: visible; }
.cg-well .phone { border-bottom-left-radius: 0; border-bottom-right-radius: 0; box-shadow: 0 0 0 1px rgba(31, 30, 29, .07), 0 -2px 24px -10px rgba(31, 30, 29, .25); transition: transform var(--fx-med) var(--fx-ease); }
.cg:hover .cg-well .phone { transform: translateY(-4px); }
.cg.archived .cg-well .phone { filter: grayscale(1); opacity: .65; }
.cg-needs { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; background: var(--fx-card); box-shadow: var(--fx-shadow-card); font: 600 12px/1 var(--fx-sans); color: var(--fx-ink); }
.cg-needs i { width: 7px; height: 7px; border-radius: 50%; background: var(--fx-wait); }
.cg-tag { position: absolute; top: 10px; left: 10px; height: 22px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; font: 500 12px/1 var(--fx-sans); background: var(--fx-glass-strong); color: var(--fx-ink-2); box-shadow: 0 0 0 1px var(--fx-line); }
.cg-body { display: grid; gap: 10px; align-content: start; padding: 14px 16px 16px; min-width: 0; }
.cg-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cg-name .fx-tile { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.cg-name > div { display: grid; min-width: 0; gap: 1px; }
.cg-name b { font: 600 16px/1.25 var(--fx-sans); letter-spacing: -.012em; color: var(--fx-ink); }
.cg-name small { font: 400 13px/1.3 var(--fx-sans); color: var(--fx-ink-3); }
.cg-line { margin: 0; font: 400 14px/1.45 var(--fx-sans); color: var(--fx-ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cg-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.cg-when { font: 400 12px/1 var(--fx-sans); color: var(--fx-ink-4); white-space: nowrap; }
/* needs you: a wide bento tile, the phone on the left in a taller well */
.cg.wide { grid-column: span 2; grid-template-rows: none; grid-template-columns: minmax(200px, 46%) minmax(0, 1fr); }
.cg.wide .cg-well { height: auto; min-height: 262px; margin: 8px 0 8px 8px; }
.cg.wide .cg-body { padding: 20px 20px 18px 18px; align-content: space-between; }
.cg.wide .cg-name b { font-size: 18px; }
.cg.wide .cg-name .fx-tile { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.cg.wide .cg-foot { margin-top: auto; }
/* new client + demo */
.cg-new { cursor: default; display: grid; min-height: 300px; border-radius: var(--fx-r-card); background: transparent; box-shadow: inset 0 0 0 1.5px var(--fx-line-2); }
.cg-new:hover { transform: none; box-shadow: inset 0 0 0 1.5px rgba(201, 100, 66, .4); }
.cg-new > a, body.agency-body .cg-new > button { all: unset; box-sizing: border-box; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 24px; text-align: center; cursor: pointer; color: var(--fx-ink); border-radius: inherit; }
.cg-new > a:focus-visible, .cg-new > button:focus-visible { outline: 2px solid rgba(201, 100, 66, .45); outline-offset: -4px; }
.cg-new b { font: 600 15px/1.3 var(--fx-sans); }
.cg-new small { font: 400 13px/1.4 var(--fx-sans); color: var(--fx-ink-3); max-width: 22ch; }
.cg-plus { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--fx-ink); color: #fff; margin-bottom: 6px; transition: transform var(--fx-fast) var(--fx-ease); }
.cg-demo .cg-plus { background: var(--fx-cobalt); }
.cg-new:hover .cg-plus { transform: scale(1.06); }
.cg-empty { grid-column: 1 / -1; padding: 24px; }
.cg-skel { height: 300px; border-radius: var(--fx-r-card); background: linear-gradient(90deg, var(--fx-card) 0%, var(--fx-sunk) 50%, var(--fx-card) 100%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* ════ The client place: a workflow canvas ════ */
.pl { position: relative; height: calc(var(--sh-page-h, calc(100dvh - 24px)) - 62px); min-height: 560px; border-radius: var(--fx-r-card); overflow: hidden; isolation: isolate; }
.pl-loading { box-shadow: var(--fx-shadow-card); }
.pl-skel-top { position: absolute; top: 12px; left: 12px; right: 12px; height: 60px; margin: 0; border-radius: 18px; }
.pl-skel-phone { position: absolute; left: 50%; top: 50%; width: 220px; height: 440px; margin: 0; transform: translate(-50%, -40%); border-radius: 30px; }

/* the canvas fills the place; everything else floats on it */
.pl-canvas { position: absolute; inset: 0; z-index: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px var(--fx-line); }
.pl-vp { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; outline: none; border-radius: inherit; }
.pl-vp.panning { cursor: grabbing; }
.pl-vp.panning .pl-node { pointer-events: none; }
.pl-vp:focus-visible { box-shadow: inset 0 0 0 2px rgba(201, 100, 66, .45); }
.pl-world { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-origin: 0 0; will-change: transform; }
.pl-world.glide { transition: transform var(--fx-med) var(--fx-ease); }
.pl-world .phone iframe { pointer-events: none; }
.pl-wires { position: absolute; overflow: visible; pointer-events: none; }
.pl-wires .fx-connector { stroke-width: 1.6; }
.pl-wires .fx-connector.flag { stroke: var(--fx-cobalt); stroke-dasharray: 3 5; stroke-width: 1.6; }
.pl-port { fill: var(--fx-card); stroke: rgba(31, 30, 29, .28); stroke-width: 1.2; }
.pl-wire-tags { position: absolute; left: 0; top: 0; pointer-events: none; }
.pl-wire-tag { position: absolute; transform: translate(-50%, -50%); max-width: 118px; height: 22px; padding: 0 9px; display: inline-flex; align-items: center; border-radius: 999px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 500 12px/22px var(--fx-sans); color: var(--fx-ink-2); background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line-2), 0 4px 10px -6px rgba(31, 30, 29, .2); }
.pl-wire-tag.flag { color: var(--fx-cobalt-deep); box-shadow: 0 0 0 1px rgba(201, 100, 66, .35), 0 4px 10px -6px rgba(201, 100, 66, .35); }

/* the base: their app in a soft well */
.pl-node-base { position: absolute; width: 332px; }
.pl-base-head { position: absolute; left: 0; right: 0; bottom: calc(100% + 10px); display: flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.pl-base-head small { font: 500 12px/1 var(--fx-sans); color: var(--fx-ink-3); }
.pl-base-well { position: relative; padding: 16px; border-radius: 40px; background: var(--fx-glass-strong); box-shadow: var(--fx-shadow-float); }
.pl-base-well .phone { border-radius: 26px; box-shadow: 0 0 0 1px rgba(31, 30, 29, .08); }

/* idea nodes */
body.agency-body button.pl-node { position: absolute; width: 188px; height: 246px; padding: 10px; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; align-content: start; justify-items: stretch; text-align: left; white-space: normal;
  border: 0; border-radius: var(--fx-r-card); background: var(--fx-card); color: var(--fx-ink); box-shadow: var(--fx-shadow-card); cursor: pointer; font: inherit;
  animation: pl-rise var(--fx-med) var(--fx-ease) both; transition: box-shadow var(--fx-fast) var(--fx-ease), transform var(--fx-fast) var(--fx-ease); }
body.agency-body button.pl-node:hover { transform: translateY(-2px); box-shadow: var(--fx-shadow-card); background: var(--fx-card); }
body.agency-body button.pl-node.nw { box-shadow: 0 0 0 1.5px rgba(201, 100, 66, .55), var(--fx-shadow-card); }
body.agency-body button.pl-node.on { box-shadow: 0 0 0 2px var(--fx-ink), 0 0 0 7px rgba(18, 13, 11, .07), 0 24px 44px -24px rgba(31, 30, 29, .45); }
body.agency-body button.pl-node:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--fx-cobalt), 0 0 0 7px rgba(201, 100, 66, .14); }
.pl-node-well { position: relative; display: flex; justify-content: center; align-items: flex-start; height: 150px; border-radius: var(--fx-r-inner); overflow: hidden; background: var(--fx-sunk); }
.pl-node-well .phone { border-radius: 13px 13px 0 0; box-shadow: none; }
.pl-node-flag { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--fx-cobalt); color: #fff; box-shadow: 0 0 0 2px var(--fx-card); }
.pl-node-flag .ico { width: 12px; height: 12px; }
.pl-node-cap { display: grid; gap: 5px; align-content: start; min-width: 0; padding: 0 4px; }
.pl-node-tags { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl-node-pick { display: inline-flex; align-items: center; gap: 3px; font: 600 12px/1 var(--fx-sans); color: var(--fx-live); }
.pl-node-pick .ico { width: 11px; height: 11px; }
.pl-node-cap b { font: 600 14px/1.3 var(--fx-sans); letter-spacing: -.005em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-node-cap small { font: 400 12px/1.3 var(--fx-sans); color: var(--fx-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pl-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* a waiting decision hangs under the base */
body.agency-body button.pl-node-dec { position: absolute; width: 280px; height: 96px; padding: 14px 14px 14px 14px; display: grid; grid-template-columns: 40px minmax(0, 1fr) 16px; gap: 12px; align-items: center; text-align: left; white-space: normal;
  border: 0; border-radius: var(--fx-r-card); background: var(--fx-card); color: var(--fx-ink); box-shadow: var(--fx-shadow-card); cursor: pointer; font: inherit; transition: box-shadow var(--fx-fast) var(--fx-ease), transform var(--fx-fast) var(--fx-ease); }
body.agency-body button.pl-node-dec:hover { transform: translateY(-2px); background: var(--fx-card); box-shadow: var(--fx-shadow-card); }
body.agency-body button.pl-node-dec.hot { box-shadow: 0 0 0 1.5px var(--fx-ink), var(--fx-shadow-card); }
.pl-dec-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--fx-sunk); color: var(--fx-ink-2); }
.pl-node-dec.hot .pl-dec-ico { background: var(--fx-ink); color: #fff; }
.pl-dec-txt { display: grid; gap: 4px; justify-items: start; min-width: 0; }
.pl-dec-txt b { max-width: 100%; font: 600 14px/1.25 var(--fx-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dec-txt small { max-width: 100%; font: 400 12px/1.25 var(--fx-sans); color: var(--fx-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-dec-go { width: 16px; height: 16px; color: var(--fx-ink-3); }

/* the floating zoom bar */
.pl-zoom { position: absolute; left: 50%; bottom: 14px; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 999px; max-width: calc(100% - 24px); }
.pl[data-panel="on"] .pl-zoom { left: calc(50% - var(--pl-panel-w) / 2); }
.pl-zgroup { display: flex; align-items: center; gap: 2px; }
.pl-zgroup.text:empty { display: none; }
.pl-zgroup.text { padding-left: 4px; box-shadow: inset 1px 0 0 var(--fx-line-2); }
body.agency-body .pl-zbtn { height: var(--fx-h-sm); min-width: var(--fx-h-sm); padding: 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; background: transparent; box-shadow: none; color: var(--fx-ink-2); font: 500 13px/1 var(--fx-sans); cursor: pointer; text-decoration: none; }
body.agency-body .pl-zbtn.wide { padding: 0 12px; }
body.agency-body .pl-zbtn:hover { background: var(--fx-sunk); color: var(--fx-ink); }
.pl-zbtn .ico { width: 15px; height: 15px; }
.pl-zoom-val { min-width: 42px; text-align: center; font: 500 12px/1 var(--fx-sans); color: var(--fx-ink-3); font-variant-numeric: tabular-nums; }
.pl-canvas-hint { position: absolute; left: 50%; bottom: 64px; z-index: 2; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; background: var(--fx-glass); font: 400 13px/1.3 var(--fx-sans); color: var(--fx-ink-3); white-space: nowrap; pointer-events: none; }
.pl-canvas-hint:empty { display: none; }
.pl-legacy-box { position: absolute; inset: 88px 0 0; overflow: auto; }
.pl-legacy { display: grid; gap: 24px; padding: 20px; max-width: 980px; margin: 0 auto; }

/* ── top bar ── */
.pl-top { position: absolute; top: var(--pl-gap); left: var(--pl-gap); right: var(--pl-gap); z-index: 6; display: flex; align-items: center; gap: 12px; min-width: 0; padding: 8px 10px 8px 8px; border-radius: 20px; }
body.agency-body button.pl-name { height: auto; padding: 4px 10px 4px 4px; display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; white-space: normal; border: 0; background: transparent; box-shadow: none; border-radius: 14px; min-width: 0; flex: 0 1 auto; cursor: pointer; font: inherit; color: var(--fx-ink); }
body.agency-body button.pl-name:hover, body.agency-body button.pl-name[aria-expanded="true"] { background: var(--fx-sunk); }
.pl-av { width: 40px; height: 40px; border-radius: var(--fx-r-inner); font-size: 14px; }
.pl-name-txt { display: grid; gap: 2px; min-width: 0; }
.pl-name-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pl-name-row h1 { font: 600 18px/1.2 var(--fx-sans); letter-spacing: -.018em; word-spacing: 0; margin: 0; color: var(--fx-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-chev { width: 13px; height: 13px; color: var(--fx-ink-4); transform: rotate(90deg); transition: transform var(--fx-fast) var(--fx-ease); }
.pl-name[aria-expanded="true"] .pl-chev { transform: rotate(-90deg); }
.pl-name-txt small { font: 400 13px/1.3 var(--fx-sans); color: var(--fx-ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 7px; margin-left: 6px; border-radius: 999px; background: var(--fx-sunk); font: 500 12px/1 var(--fx-sans); color: var(--fx-ink-2); vertical-align: 1px; }
.pl-status { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--fx-sunk); }
.pl-acts { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
.pl-acts .fx-btn { height: var(--fx-h); }

/* ── left: the conversation ── */
.pl-chat { position: absolute; z-index: 4; left: var(--pl-gap); top: 88px; bottom: var(--pl-gap); width: var(--pl-chat-w); pointer-events: none; }
.pl-chat > * { pointer-events: auto; }
.pl-chat-card { position: absolute; inset: 0; display: flex; flex-direction: column; min-height: 0; overflow: hidden; animation: pl-in-l var(--fx-med) var(--fx-ease) both; }
.pl[data-chat="closed"] .pl-chat-card { display: none; }
.pl-chat-pill { position: absolute; left: 0; top: 0; display: none; align-items: center; gap: 8px; height: var(--fx-h); padding: 0 14px 0 12px; border: 0; border-radius: 999px !important; font: 500 13px/1 var(--fx-sans); color: var(--fx-ink); cursor: pointer; }
.pl[data-chat="closed"] .pl-chat-pill { display: inline-flex; }
.pl-chat-pill .ico { width: 16px; height: 16px; }
.pl-chat-pill b { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--fx-sunk); font: 600 12px/1 var(--fx-sans); color: var(--fx-ink-2); }
.pl-chat-head, .pl-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 16px 10px 10px 18px; }
.pl-chat-head h2 { font: 600 15px/1.25 var(--fx-sans); letter-spacing: -.01em; margin: 0; }
.pl-chat-head small { font: 400 12px/1.3 var(--fx-sans); color: var(--fx-ink-3); }
.pl-msgs { list-style: none; margin: 0; padding: 4px 14px 14px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; display: flex; flex-direction: column; gap: 12px; }
.pl-msg-day { display: flex; justify-content: center; padding: 4px 0 0; }
.pl-msg-day span { padding: 3px 10px; border-radius: 999px; background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line); font: 500 12px/1.2 var(--fx-sans); color: var(--fx-ink-3); }
.pl-msg { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; align-items: end; max-width: 94%; }
.pl-msg.client { grid-template-columns: minmax(0, 1fr) 26px; align-self: flex-end; }
.pl-msg.client .pl-msg-av { order: 2; }
.pl-msg-av { width: 26px; height: 26px; border-radius: 8px; font-size: 10px; }
.pl-msg-av.blanks { display: block; border-radius: 50%; background: var(--fx-aurora); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .55); }
.pl-msg-av.agency { display: grid; place-items: center; border-radius: 50%; background: var(--fx-ink); color: #fff; font: 600 9px/1 var(--fx-sans); }
.pl-msg-b { display: grid; gap: 4px; min-width: 0; padding: 9px 12px 10px; border-radius: 16px; background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line); }
.pl-msg.blanks .pl-msg-b, .pl-msg.agency .pl-msg-b { border-bottom-left-radius: 5px; }
.pl-msg.client .pl-msg-b { background: var(--fx-ink); color: #fff; box-shadow: none; border-bottom-right-radius: 5px; }
.pl-msg-meta { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pl-msg-meta b { font: 600 12px/1.2 var(--fx-sans); opacity: .7; }
.pl-msg-meta time { font: 400 12px/1 var(--fx-sans); opacity: .5; font-variant-numeric: tabular-nums; }
.pl-msg-b p { margin: 0; font: 400 14px/1.5 var(--fx-sans); white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-msg-empty { margin: auto 0; padding: 24px 8px; text-align: center; font: 400 13px/1.5 var(--fx-sans); color: var(--fx-ink-3); }
.pl-chat-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 12px 18px; box-shadow: inset 0 1px 0 var(--fx-line); }
.pl-chat-foot small { font: 400 12px/1.35 var(--fx-sans); color: var(--fx-ink-3); }

/* ── right: the floating panel (picked thing / timeline) ── */
.pl-panel { position: absolute; z-index: 5; right: var(--pl-gap); top: 88px; bottom: var(--pl-gap); width: var(--pl-panel-w); display: flex; flex-direction: column; min-height: 0; overflow: hidden;
  background: var(--fx-glass-strong); opacity: 0; visibility: hidden; transform: translateX(16px); transition: opacity var(--fx-med) var(--fx-ease), transform var(--fx-med) var(--fx-ease), visibility 0s linear var(--fx-med); }
.pl[data-panel="on"] .pl-panel { opacity: 1; visibility: visible; transform: none; transition: opacity var(--fx-med) var(--fx-ease), transform var(--fx-med) var(--fx-ease), visibility 0s; }
.pl-panel-head { align-items: center; padding: 14px 10px 10px 16px; box-shadow: inset 0 -1px 0 var(--fx-line); }
.pl-panel-titles { display: grid; gap: 3px; min-width: 0; flex: 1; }
.pl-panel-titles .fx-eyebrow { margin: 0; }
.pl-panel-title { font: 600 18px/1.25 var(--fx-sans); letter-spacing: -.015em; margin: 0; color: var(--fx-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-panel-back { margin-left: -6px; }
.pl-panel-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 16px; display: grid; gap: 16px; align-content: start; }
.pl-sheet-handle, .pl-sheet-scrim { display: none; }

/* an idea: before → after, flags, changes, answer */
.pl-idea { display: grid; gap: 16px; }
.pl-idea .ba { justify-content: center; gap: 10px; padding: 16px 10px; border-radius: var(--fx-r-inner); background: var(--fx-sunk); box-shadow: inset 0 0 0 1px var(--fx-line); }
.pl-idea .ba figure.fx-ai-edge { border-radius: var(--fx-r-card); }
.pl-idea .ba figcaption { font: 600 12px/1.2 var(--fx-sans); color: var(--fx-ink-2); }
.pl-idea .ba figcaption small { font-weight: 400; color: var(--fx-ink-3); }
.pl-idea .ba-arrow { color: var(--fx-ink-3); }
.pl-idea-text { display: grid; gap: 14px; justify-items: start; min-width: 0; }
.pl-idea-tags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pl-idea-tags small { font: 400 12px/1 var(--fx-sans); color: var(--fx-ink-3); margin-left: 2px; }
.pl-idea-text .flags { margin: 0; padding: 12px 14px; display: grid; gap: 10px; width: 100%; border-radius: var(--fx-r-inner); background: var(--fx-cobalt-soft); list-style: none; }
.pl-idea-text .flags li .ico { color: var(--fx-cobalt-deep); }
.pl-changes-box { display: grid; gap: 8px; width: 100%; }
.pl-changes-box .fx-eyebrow { margin: 0; }
.pl-idea-text ol.changes { margin: 0; padding-left: 18px; display: grid; gap: 10px; font: 400 14px/1.45 var(--fx-sans); color: var(--fx-ink); }
.pl-idea-text ol.changes li span { display: block; }
.pl-idea-text ol.changes small { font-size: 12px; }
.pl-answer-box { display: grid; gap: 12px; padding-top: 14px; box-shadow: inset 0 1px 0 var(--fx-line); }
body.agency-body button.pl-in-prop { width: 100%; height: auto; padding: 12px 14px; display: grid; grid-template-columns: minmax(0, 1fr) 16px; gap: 2px 10px; align-items: center; text-align: left; white-space: normal;
  border: 0; border-radius: var(--fx-r-inner); background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line-2); cursor: pointer; font: inherit; color: var(--fx-ink); }
body.agency-body button.pl-in-prop:hover { background: var(--fx-card); box-shadow: var(--fx-shadow-card); }
.pl-in-prop .fx-eyebrow, .pl-in-prop b, .pl-in-prop small { grid-column: 1; }
.pl-in-prop b { font: 600 14px/1.3 var(--fx-sans); }
.pl-in-prop small { font: 400 12px/1.3 var(--fx-sans); color: var(--fx-ink-3); }
.pl-in-prop > .ico { grid-column: 2; grid-row: 1 / span 3; width: 16px; height: 16px; color: var(--fx-ink-3); }

/* the answer (proposal or idea): Approve / Quote / Ask a change, confirmed inline */
.answer .prop-draft, .prop-draft { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; font: 400 13px/1.4 var(--fx-sans); color: var(--fx-ink-2); }
.answer-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.answer-bar .fx-btn { flex: 1 1 auto; justify-content: center; }
.answer-panel { margin-top: 12px; display: grid; gap: 10px; padding: 14px; border-radius: var(--fx-r-inner); background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line-2); }
.answer-panel.hidden { display: none; }
.answer-lead { margin: 0; font: 500 14px/1.45 var(--fx-sans); color: var(--fx-ink); }
.answer-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.answer-amount { position: relative; display: grid; gap: 6px; justify-items: start; }
.answer-amount input { width: 100%; }
.answer-fields textarea { min-height: 56px; }
.answer-row { display: flex; gap: 8px; flex-wrap: wrap; }
.answer-panel .bad { font-size: 13px; }
.answer-panel .bad:empty { display: none; }
.pl-panel .your-note { margin: 0; padding: 12px 14px; border: 0; border-radius: var(--fx-r-inner); background: var(--fx-sunk); align-items: flex-start; }

/* a proposal / package / test inside the panel: flat, no card chrome */
.pl-panel-body > .card, .pl-panel-body .prop-card, .pl-panel-body .pkg-card { margin: 0 !important; padding: 0 !important; box-shadow: none !important; background: transparent !important; border-radius: 0 !important; overflow: visible; }
.pl-panel .prop-head { padding: 0 0 12px; }
.pl-panel .prop-head h3 { display: none; }
.pl-panel .prop-body { padding: 0 0 16px; }
.pl-panel .prop-summary { font: 400 14px/1.55 var(--fx-sans); }
.pl-panel .prop-ideas { margin: 0 -16px; padding: 4px 16px 8px; }
.pl-panel .prop-idea { flex-basis: 316px; background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line); }
.pl-panel .prop-idea .prop-ba { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; }
.pl-panel .answer { padding: 14px 0 0; border-top: 1px solid var(--fx-line); background: transparent; }
.pl-panel .pkg-head, .pl-panel .pkg, .pl-panel .pkg-actions, .pl-panel .your-note { padding-left: 0; padding-right: 0; }
.pl-panel .pkg-actions { display: grid; gap: 8px; }
.pl-panel .pkg-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.pl-panel .test-report { gap: 16px; }
.pl-panel .test-report > .rp { box-shadow: 0 0 0 1px var(--fx-line) !important; border-radius: var(--fx-r-inner); }

/* the timeline (in the panel) */
.pl-tl-tabs { gap: 16px; padding: 4px 32px 0 16px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--fx-line); flex: none; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent); }
.fx-tabs.pl-tl-tabs button { font-size: 13px; padding: 10px 0; white-space: nowrap; }
.pl-tl-list { list-style: none; margin: 0; padding: 6px 10px 16px; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.pl-day { position: sticky; top: 0; z-index: 1; display: flex; justify-content: center; margin: 0 -22px; padding: 8px 22px 6px; pointer-events: none; background: linear-gradient(var(--fx-card) 75%, rgba(255, 255, 255, 0)); }
.pl-day span { padding: 3px 10px; border-radius: 999px; background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line); font: 500 12px/1.2 var(--fx-sans); color: var(--fx-ink-3); }
.pl-tl-empty { padding: 28px 12px; text-align: center; font: 400 13px/1.5 var(--fx-sans); color: var(--fx-ink-3); }
.pl-ev { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 5px 8px; font-size: 12px; color: var(--fx-ink-3); }
.pl-ev i { width: 6px; height: 6px; border-radius: 50%; background: var(--fx-stalled); align-self: center; }
.pl-ev span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-ev time, .pl-it-side time { font-size: 12px; color: var(--fx-ink-4); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-it { position: relative; margin: 2px 0; border-radius: var(--fx-r-inner); transition: background var(--fx-fast) var(--fx-ease), box-shadow var(--fx-fast) var(--fx-ease); }
.pl-it.open { background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line); margin: 6px 0; }
.pl-it.hot::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 3px; background: var(--fx-cobalt); }
body.agency-body button.pl-it-head { width: 100%; height: auto; padding: 9px 8px 9px 10px; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 10px; align-items: start; justify-content: stretch; text-align: left; white-space: normal; border-radius: var(--fx-r-inner); background: transparent; box-shadow: none; font-weight: 400; }
body.agency-body button.pl-it-head:hover { background: rgba(31, 30, 29, .035); }
.pl-it.open button.pl-it-head:hover { background: transparent; }
.pl-it-ico { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--fx-sunk); color: var(--fx-ink-2); }
.pl-it-ico .ico { width: 16px; height: 16px; }
.pl-it.hot .pl-it-ico { background: var(--fx-ink); color: #fff; }
.pl-it-main { display: grid; gap: 1px; min-width: 0; }
.pl-it-main b { font: 600 13px/1.35 var(--fx-sans); color: var(--fx-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-it-main small { font: 400 12px/1.4 var(--fx-sans); color: var(--fx-ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pl-it.open .pl-it-main small { -webkit-line-clamp: unset; }
.pl-it-side { display: grid; justify-items: end; gap: 4px; padding-top: 1px; }
.pl-it-side .tag { height: 20px; padding: 0 7px; font-size: 12px; }
.pl-mini { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px; font: 500 12px/1 var(--fx-sans); background: var(--fx-sunk); color: var(--fx-ink-2); white-space: nowrap; }
.pl-mini.hot, .pl-mini.flag { background: var(--fx-cobalt); color: #fff; }
.pl-mini .ico { width: 11px; height: 11px; }
.pl-it-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--fx-med) var(--fx-ease); }
.pl-it.open .pl-it-body { grid-template-rows: 1fr; }
.pl-it-clip { min-height: 0; overflow: hidden; }
.pl-it-in { display: grid; gap: 10px; justify-items: start; padding: 0 12px 12px 48px; font-size: 13px; }
.pl-it-in > * { max-width: 100%; }
.pl-quote { margin: 0; padding: 8px 12px; border-left: 2px solid var(--fx-cobalt); font-size: 13px; color: var(--fx-ink-2); background: var(--fx-sunk); border-radius: 0 8px 8px 0; }
.pl-changes { margin: 0; padding-left: 16px; display: grid; gap: 4px; font-size: 13px; color: var(--fx-ink-2); }
.pl-it-in .flags li { font-size: 13px; }
.pl-it-in .flags li .ico { color: var(--fx-cobalt-deep); }
.pl-ab { display: flex; gap: 10px; flex-wrap: wrap; }
.pl-ab figure { margin: 0; display: grid; gap: 6px; font-size: 12px; }
.pl-ab figure.chosen .phone { box-shadow: 0 0 0 2px var(--fx-cobalt); }
.pl-talk { list-style: none; margin: 0; padding: 0 10px 12px; display: grid; gap: 6px; }
.pl-talk li { display: grid; gap: 2px; justify-items: start; max-width: 92%; }
.pl-talk li.client { justify-self: end; justify-items: end; }
.pl-bub { padding: 7px 11px; border-radius: 14px; background: var(--fx-sunk); font-size: 13px; line-height: 1.45; }
.pl-talk li.client .pl-bub { background: var(--fx-ink); color: #fff; border-bottom-right-radius: 4px; }
.pl-talk li.blanks .pl-bub { border-bottom-left-radius: 4px; }
.pl-bub b { display: block; font-size: 12px; font-weight: 600; opacity: .6; margin-bottom: 1px; }
.pl-bub p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-talk time { font-size: 12px; color: var(--fx-ink-4); padding: 0 4px; }
.pl-test-in { padding-left: 12px; }
.pl-replay { width: 100%; }
.pl-replay .rp { box-shadow: 0 0 0 1px var(--fx-line) !important; border-radius: var(--fx-r-inner); background: var(--fx-card); }
.pl-replay .rp-frame { height: 380px; }
.pl-replay .rp-caption { font-size: 13px; padding: 10px 12px 0; }
.pl-replay .rp-bar { padding: 8px 10px 10px; gap: 6px; }
.pl-replay .rp-chip { min-width: 24px; height: 24px; font-size: 12px; }
.pl-replay .rp-tabs { padding: 10px 10px 0; }
.pl-replay .rp-tab { font-size: 12px; padding: 5px 10px; }
.pl-replay .skel { height: 220px; margin: 0; }

/* "Test it" popover */
.pl-pop { position: absolute; top: calc(100% + 8px); right: 8px; z-index: 30; width: min(380px, calc(100vw - 24px)); display: grid; gap: 12px; padding: 16px; background: var(--fx-glass-strong); animation: pl-in var(--fx-fast) var(--fx-ease) both; }
.pl-pop-head { display: flex; align-items: center; justify-content: space-between; }
.pl-pop-head b { font: 600 15px/1.2 var(--fx-sans); }
.pl-pop .notice { margin: 0; }
.pl-targets { display: grid; gap: 6px; }
.pl-target { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 12px; border-radius: var(--fx-r-inner); background: var(--fx-card); box-shadow: inset 0 0 0 1px var(--fx-line-2); cursor: pointer; transition: box-shadow var(--fx-fast) var(--fx-ease), background var(--fx-fast) var(--fx-ease); }
.pl-target:has(input:checked) { box-shadow: inset 0 0 0 1.5px var(--fx-cobalt); background: var(--fx-cobalt-soft); }
.pl-target input { margin: 2px 0 0; accent-color: var(--fx-cobalt); }
.pl-target span { display: grid; gap: 1px; min-width: 0; }
.pl-target b { font-size: 13px; font-weight: 600; }
.pl-target small { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-pop-row { justify-content: space-between; }
.pl-seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 999px; background: var(--fx-sunk); }
body.agency-body .pl-seg button { height: 28px; padding: 0 12px; font-size: 13px; background: transparent; box-shadow: none; color: var(--fx-ink-3); border-radius: 999px; }
body.agency-body .pl-seg button.on { background: var(--fx-card); color: var(--fx-ink); box-shadow: 0 0 0 1px var(--fx-line-2); }

/* project facts: a floating panel from the name */
.pl-drawer-wrap { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.pl-drawer-wrap:empty { display: none; }
.pl-scrim { position: absolute; inset: 0; border-radius: inherit; background: rgba(31, 30, 29, .06); opacity: 0; transition: opacity var(--fx-med) var(--fx-ease); }
.pl-drawer { position: absolute; left: var(--pl-gap); top: 88px; bottom: var(--pl-gap); width: min(460px, calc(100% - 24px)); display: flex; flex-direction: column; background: var(--fx-glass-strong);
  transform: translateX(-16px); opacity: 0; transition: transform var(--fx-med) var(--fx-ease), opacity var(--fx-med) var(--fx-ease); }
.pl-drawer-wrap.on { pointer-events: auto; }
.pl-drawer-wrap.on .pl-scrim { opacity: 1; }
.pl-drawer-wrap.on .pl-drawer { transform: none; opacity: 1; }
.pl-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 12px 6px 22px; }
.pl-drawer-head .fx-eyebrow { margin: 0 0 4px; }
.pl-drawer-head h2 { font: 600 22px/1.2 var(--fx-sans); letter-spacing: -.02em; margin: 0; }
.pl-drawer-nav { display: flex; gap: 2px; padding: 4px 16px 10px; overflow-x: auto; scrollbar-width: none; box-shadow: inset 0 -1px 0 var(--fx-line); }
.pl-drawer-nav a { flex: none; padding: 6px 11px; border-radius: 999px; font: 500 13px/1 var(--fx-sans); color: var(--fx-ink-3); text-decoration: none; }
.pl-drawer-nav a:hover { background: var(--fx-sunk); color: var(--fx-ink); }
.pl-drawer-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 28px; scroll-padding-top: 8px; }
.pl-sec { display: grid; gap: 10px; padding: 18px 0; border-bottom: 1px solid var(--fx-line); }
.pl-sec:last-child { border-bottom: 0; }
.pl-sec-quiet { gap: 4px; padding: 10px 0; }
.pl-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pl-sec-head h3 { font: 600 15px/1.3 var(--fx-sans); margin: 0; }
.pl-facts { display: grid; gap: 0; }
.pl-fact { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--fx-line); }
.pl-facts .pl-fact:last-child, .pl-facts-app .pl-fact:last-of-type { border-bottom: 0; }
.pl-fact-k { font-size: 13px; color: var(--fx-ink-3); }
.pl-fact-v { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.pl-fact-v .bar { margin-top: 2px; }
.pl-facts .pl-fact { grid-template-columns: 112px minmax(0, 1fr); }
.pl-inline-edit { margin-top: 4px; }
.pl-edit { display: grid; gap: 12px; }
.pl-edit .form-grid { gap: 10px; }
.pl-know { display: grid; gap: 2px; }
.pl-clamp { font-size: 14px; line-height: 1.5; color: var(--fx-ink); white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.pl-ready { display: flex; flex-wrap: wrap; gap: 6px; }
.pl-ready-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--fx-ink-3); box-shadow: inset 0 0 0 1px var(--fx-line-2); }
.pl-ready-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--fx-stalled); }
.pl-ready-chip.on { background: var(--fx-cobalt-soft); color: var(--fx-cobalt-deep); box-shadow: none; }
.pl-ready-chip .ico { width: 12px; height: 12px; }
.pl-link-row input { font-size: 13px; }
.pl-facts-app { display: grid; gap: 10px; }
.pl-fold > summary { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; cursor: pointer; list-style: none; font-size: 14px; }
.pl-fold > summary::-webkit-details-marker { display: none; }
.pl-fold > summary::after { content: 'Show'; margin-left: auto; font-size: 13px; color: var(--fx-cobalt-deep); }
.pl-fold[open] > summary::after { content: 'Hide'; }
.pl-fold[open] > summary { margin-bottom: 8px; }
.pl-danger label { display: grid; gap: 6px; font-size: 13px; margin: 8px 0; }
.pl-outbox { gap: 8px; }

@keyframes pl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes pl-in-l { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }

/* #/watch: a way out */
body.agency-body button.w-close { position: absolute; top: 18px; right: 20px; z-index: 6; width: var(--fx-h); height: var(--fx-h); padding: 0; border-radius: 50%; background: rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px var(--fx-line-2); color: var(--fx-ink); }

/* ── narrower screens ── */
@media (max-width: 1360px) {
  body.agency-body { --pl-chat-w: 296px; --pl-panel-w: 384px; }
  .pl-acts .pl-test span:not(.ico) { display: none; }
  body.agency-body .pl-acts .pl-test { width: var(--fx-h); height: var(--fx-h); padding: 0; justify-content: center; }
}
@media (max-width: 1180px) {
  /* a panel on the right takes the room: the conversation folds to its pill */
  .pl[data-panel="on"] .pl-chat-card { display: none; }
  .pl[data-panel="on"] .pl-chat-pill { display: inline-flex; }
  .pl-status { display: none; }
}
@media (max-width: 1023px) and (min-width: 760px) {
  .pl-name-txt small { display: none; }
  body.agency-body { --pl-panel-w: min(384px, calc(100vw - 420px)); --pl-chat-w: 280px; }
}

/* ── phones: a vertical stack, the panels are bottom sheets above the app bar ── */
@media (max-width: 759px) {
  .cg-head { align-items: center; }
  .cg-tabs { gap: 18px; overflow-x: auto; scrollbar-width: none; }
  .cg-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .cg, .cg.wide { grid-column: auto; grid-template-rows: none; grid-template-columns: 112px minmax(0, 1fr); }
  .cg-well, .cg.wide .cg-well { height: auto; min-height: 140px; margin: 6px 0 6px 6px; border-radius: var(--fx-r-card); }
  .cg-body, .cg.wide .cg-body { padding: 12px 12px 12px 4px; gap: 7px; }
  .cg-name .fx-tile, .cg.wide .cg-name .fx-tile { display: none; }
  .cg-name b, .cg.wide .cg-name b { font-size: 15px; }
  .cg-line { font-size: 13px; -webkit-line-clamp: 2; }
  .cg-needs { top: 6px; right: 6px; height: 20px; padding: 0 7px; font-size: 12px; }
  .cg-foot { flex-wrap: wrap; }
  .cg-new { min-height: 120px; grid-template-columns: none; }
  .cg-skel { height: 150px; }

  .pl { height: auto; min-height: 0; overflow: visible; border-radius: 0; isolation: auto; }
  .pl-loading { min-height: 70vh; }
  .pl-canvas { position: relative; inset: auto; padding: 0 0 8px; border-radius: var(--fx-r-card); box-shadow: inset 0 0 0 1px var(--fx-line); }
  .pl-vp { position: relative; inset: auto; overflow: visible; cursor: auto; touch-action: auto; }
  .pl-world { position: relative; width: auto; height: auto; transform: none !important; display: grid; gap: 10px; padding: 18px 12px 8px; }
  .pl-wires, .pl-wire-tags, .pl-zoom .pl-zgroup:first-child, .pl-canvas-hint { display: none !important; }
  .pl-node-base { position: relative; left: auto !important; top: auto !important; width: auto; display: grid; justify-items: center; gap: 10px; padding-bottom: 6px; }
  .pl-base-head { position: static; }
  .pl-base-well { padding: 10px; border-radius: 30px; }
  .pl-base-well .phone { border-radius: 22px; }
  body.agency-body button.pl-node { position: relative; left: auto !important; top: auto !important; width: 100%; height: auto; grid-template-rows: none; grid-template-columns: 76px minmax(0, 1fr); align-items: center; padding: 8px; animation: none; }
  .pl-node-well { height: 104px; }
  body.agency-body button.pl-node-dec { position: relative; left: auto !important; top: auto !important; width: 100%; order: 1; }
  body.agency-body button.pl-node { order: 2; }
  .pl-zoom { position: static; transform: none; margin: 4px 12px 0; justify-content: center; background: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .pl-zgroup.text { box-shadow: none; padding: 0; }
  .pl-legacy-box { position: static; }

  .pl-top { position: relative; top: auto; left: auto; right: auto; margin-bottom: 10px; flex-wrap: wrap; gap: 6px 8px; padding: 8px; }
  body.agency-body button.pl-name { order: 1; flex: 1 1 0; padding: 2px 6px 2px 2px; gap: 10px; }
  .pl-back { order: 0; }
  .pl-av { width: 36px; height: 36px; border-radius: var(--fx-r-inner); font-size: 12px; }
  .pl-status { display: inline-flex; order: 2; flex: none; padding: 6px 10px; }
  .pl-acts { order: 3; width: 100%; margin: 0; }
  .pl-acts .pl-prim { flex: 1; justify-content: center; }
  body.agency-body .pl-acts .pl-test { width: var(--fx-h); height: var(--fx-h); padding: 0; justify-content: center; }
  .pl-acts .pl-test span:not(.ico) { display: none; }

  /* bottom sheets: chat, panel and facts float above the app bar, one at a time */
  .pl-chat, .pl-panel, .pl-drawer { position: fixed; left: 8px; right: 8px; top: auto; bottom: var(--pl-sheet-bottom); width: auto; z-index: 75; max-height: calc(100dvh - var(--pl-sheet-bottom) - 56px); }
  .pl-chat { height: calc(100dvh - var(--pl-sheet-bottom) - 56px); pointer-events: none; }
  .pl-chat-pill { display: none !important; }
  .pl-chat-card { display: none; border-radius: var(--fx-r-card); }
  .pl[data-sheet="chat"] .pl-chat-card { display: flex; animation: pl-up var(--fx-med) var(--fx-ease) both; }
  .pl[data-chat] .pl-chat-card { position: absolute; inset: 0; }
  .pl[data-chat]:not([data-sheet="chat"]) .pl-chat-card { display: none; }
  .pl-panel { height: calc(100dvh - var(--pl-sheet-bottom) - 56px); border-radius: var(--fx-r-card); transform: translateY(24px); }
  .pl[data-panel="on"] .pl-panel { transform: none; }
  .pl[data-sheet="facts"] .pl-panel { visibility: hidden; opacity: 0; }
  .pl-drawer { height: calc(100dvh - var(--pl-sheet-bottom) - 56px); border-radius: var(--fx-r-card); transform: translateY(24px); }
  .pl-drawer-wrap { position: fixed; inset: 0; z-index: 74; }
  .pl-scrim { border-radius: 0; background: rgba(31, 30, 29, .22); }
  .pl[data-sheet="chat"] .pl-sheet-scrim, .pl[data-sheet="panel"] .pl-sheet-scrim { display: block; position: fixed; inset: 0; z-index: 70; background: rgba(31, 30, 29, .22); animation: pl-fade var(--fx-med) var(--fx-ease) both; }
  body.agency-body .pl-sheet-handle { display: block; flex: none; width: 100%; height: 18px; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: transparent; box-shadow: none; cursor: pointer; }
  .pl-sheet-handle i { display: block; width: 40px; height: 4px; margin: 8px auto 0; border-radius: 4px; background: var(--fx-line-2); }
  .pl-chat-head, .pl-panel-head { padding-top: 6px; }
  .pl-drawer-head { padding-top: 8px; }
  .pl-drawer-body { padding: 4px 16px 28px; }
  .pl-fact, .pl-facts .pl-fact { grid-template-columns: minmax(0, 1fr) auto; }
  .pl-fact .pl-fact-k { grid-column: 1 / -1; }
  .pl-panel-body { padding: 14px 12px; }
  .pl-panel .prop-ideas { margin: 0 -12px; padding: 4px 12px 8px; }
  .pl-panel .prop-idea { flex-basis: min(300px, 80vw); }
  .pl-idea .ba { padding: 12px 6px; gap: 6px; }
  .pl-replay .rp-frame { height: 50vh; }
  .pl-pop { position: fixed; left: 8px; right: 8px; top: auto; bottom: var(--pl-sheet-bottom); width: auto; z-index: 80; }
}
@keyframes pl-up { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes pl-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .cg, .cg-well .phone, .cg-plus, .pl-chev, .pl-it, .pl-it-body, .pl-scrim, .pl-drawer, .pl-target, .pl-panel, .pl-world.glide, body.agency-body button.pl-node, body.agency-body button.pl-node-dec { transition: none !important; }
  body.agency-body button.pl-node, .pl-pop, .pl-chat-card, .pl-sheet-scrim { animation: none !important; }
  .cg:hover, .cg:hover .cg-well .phone, .cg-new:hover .cg-plus, body.agency-body button.pl-node:hover, body.agency-body button.pl-node-dec:hover { transform: none; }
}

/* Lead polish (2026-11-20): on phones the client's name, status and Test it come first, above their app. */
@media (max-width: 759px) { .pl { display: flex; flex-direction: column; } .pl > .pl-top { order: -1; } }
/* phone: touch targets at least 40 px */
@media (max-width: 759px) { .fx-tabs.pl-tl-tabs button { padding: 14px 0; } .pl-replay .rp-chip { min-width: 40px; height: 40px; } }

/* ── Phase 1 (2026-11-22): "Message <client>" composer, agency bubbles, Brief → Yes, answering one idea ── */
.pl-msg.agency .pl-msg-b { background: var(--fx-cobalt-soft); box-shadow: 0 0 0 1px rgba(201, 100, 66, .18); }
.pl-talk li.agency .pl-bub { background: var(--fx-cobalt-soft); border-bottom-left-radius: 4px; }
.pl-compose { display: grid; gap: 6px; padding: 10px 12px 12px; box-shadow: inset 0 1px 0 var(--fx-line); }
.pl-compose-box { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 12px; border-radius: 18px; background: var(--fx-card); box-shadow: 0 0 0 1px var(--fx-line-2); transition: box-shadow var(--fx-fast) var(--fx-ease); }
.pl-compose-box:focus-within { box-shadow: 0 0 0 1px rgba(201, 100, 66, .45), 0 0 0 4px rgba(201, 100, 66, .08); }
.pl-compose-in { all: unset; flex: 1; min-width: 0; min-height: 22px; max-height: 140px; padding: 6px 0; overflow-y: auto; font: 400 14px/1.45 var(--fx-sans); color: var(--fx-ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.pl-compose-in::placeholder { color: var(--fx-ink-4); }
.pl-compose-in[aria-invalid="true"] { color: var(--fx-ink); }
.pl-compose-box:has([aria-invalid="true"]) { box-shadow: 0 0 0 1px var(--fx-bad); }
.pl-compose-send { flex: none; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--fx-ink); color: #fff; cursor: pointer; }
.pl-compose-send:hover { background: var(--fx-ink-hover); }
.pl-compose-send:disabled { opacity: .5; cursor: default; }
.pl-compose-send:focus-visible { outline: 2px solid var(--fx-cobalt); outline-offset: 2px; }
.pl-compose-send .ico { width: 16px; height: 16px; }
.pl-compose.busy .pl-compose-box { opacity: .7; }
.pl-compose-foot { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px; }
.pl-compose-foot small { font: 400 12px/1.35 var(--fx-sans); color: var(--fx-ink-3); }
.pl-compose-count { flex: none; font-variant-numeric: tabular-nums; }
.pl-compose .field-err { padding: 0 4px; }
.pl-status { align-items: center; gap: 10px; }
@media (min-width: 1181px) { .pl-status { display: inline-flex; } }
.pl-b2y { font: 500 13px/1 var(--fx-sans); color: var(--fx-ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pl-b2y::before { content: ''; display: inline-block; width: 1px; height: 12px; margin-right: 10px; vertical-align: -1px; background: var(--fx-line-2); }
.pl-b2y.done { color: var(--fx-ink); }
.idea-answer { display: grid; gap: 10px; }
.idea-answer .prop-draft { margin: 0; }
.answer-intro { margin: 0; font: 400 13px/1.45 var(--fx-sans); color: var(--fx-ink-3); }
@media (max-width: 759px) {
  .pl-compose-send { width: 40px; height: 40px; }
  .pl-b2y { display: none; }
}
