/* Tokens: the Figma file's variables (clickroom-brand-identity · Color / Layout); names follow it
   where they exist here (--ink-3 = text/tertiary, --placeholder = text/placeholder and quiet icons). */
@font-face { font-family: "Geist"; src: url("/__ps/fonts/Geist-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/__ps/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
:root, :host {
  --bg: #f4f4f5;
  --panel: #ffffff;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --placeholder: #a1a1aa;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --hover: #f4f4f5;
  --accent: #5046e5;
  --accent-ink: #ffffff;
  --accent-soft: #eeedfe;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --badge: #ef4444;
  --scrim: rgb(0 0 0 / .35);
  --queued: #b45309;
  --queued-soft: #fef3c7;
  --progress: #0369a1;
  --progress-soft: #e0f2fe;
  --done: #15803d;
  --done-soft: #dcfce7;
  --warn: #b45309;
  --agent: #7c3aed;
  --agent-soft: #f3e8ff;
  --stage: #e9e9ec;
  --shadow: 0 1px 2px rgb(0 0 0 / .06), 0 8px 24px rgb(0 0 0 / .08);
  --shadow-modal: 0 1px 3px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .12);
  --shadow-menu: 0 8px 24px rgb(0 0 0 / .13);
  --radius: 10px;
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]), :host {
    --bg: #111113; --panel: #18181b; --ink: #f4f4f5; --ink-2: #a1a1aa; --ink-3: #8b8b94; --placeholder: #71717a; --line: #3f3f46; --line-strong: #52525b;
    --hover: #27272a; --accent: #6d66f0; --accent-soft: #26244a; --danger: #f87171; --danger-soft: #3b1414; --badge: #ef4444; --scrim: rgb(0 0 0 / .55);
    --queued: #fbbf24; --queued-soft: #3a2a0a;
    --progress: #38bdf8; --progress-soft: #0c2a3d; --done: #4ade80; --done-soft: #0f2e1b; --warn: #fbbf24; --agent: #c4a7ff;
    --agent-soft: #2a1d47; --stage: #0b0b0d; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .5);
    --shadow-modal: 0 1px 3px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .55);
    --shadow-menu: 0 8px 24px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #111113; --panel: #18181b; --ink: #f4f4f5; --ink-2: #a1a1aa; --ink-3: #8b8b94; --placeholder: #71717a; --line: #3f3f46; --line-strong: #52525b;
  --hover: #27272a; --accent: #6d66f0; --accent-soft: #26244a; --danger: #f87171; --danger-soft: #3b1414; --badge: #ef4444; --scrim: rgb(0 0 0 / .55);
  --queued: #fbbf24; --queued-soft: #3a2a0a;
  --progress: #38bdf8; --progress-soft: #0c2a3d; --done: #4ade80; --done-soft: #0f2e1b; --warn: #fbbf24; --agent: #c4a7ff;
  --agent-soft: #2a1d47; --stage: #0b0b0d; --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 8px 24px rgb(0 0 0 / .5);
  --shadow-modal: 0 1px 3px rgb(0 0 0 / .4), 0 12px 32px rgb(0 0 0 / .55);
  --shadow-menu: 0 8px 24px rgb(0 0 0 / .5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
@supports (height: 100dvh) { html, body { height: 100dvh; } }
html { -webkit-text-size-adjust: 100%; }
button, a, [role="button"], [role="tab"] { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--ink); background: var(--bg); display: flex; flex-direction: column; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink-2); background: var(--panel); }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
input::placeholder, textarea::placeholder { color: var(--placeholder); opacity: 1; }

/* ---------- top bar ---------- */
.bar { height: 52px; flex: none; display: flex; align-items: center; gap: 12px; padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); }
.brand { display: grid; place-items: center; width: 30px; height: 30px; }
/* Logo: an arrow that pops out of a hole. Hover keeps the load animations in the list so they
   don't replay when the pointer leaves. The arrow is clipped to the hole's front rim, so the
   hole only fades in and widens; shrinking it would let the arrow show below its bottom edge. */
.logo { width: 30px; height: 21px; overflow: visible; stroke: none; }
.logo .hole, .logo .edge { fill: var(--ink); }
.logo .face { fill: var(--panel); }
.logo .arrow, .logo .hole { transform-box: view-box; transform-origin: 40px 34px; }
.logo .hole { animation: logoHoleIn .15s ease-out both, logoWiden .38s ease-out .1s; }
.logo .arrow { animation: logoPop .38s cubic-bezier(.3, 1.25, .5, 1) .1s both; }
.homeLink:hover .logo .arrow, .brand:hover .logo .arrow { animation: logoPop .38s cubic-bezier(.3, 1.25, .5, 1) .1s both, logoPeek .38s cubic-bezier(.3, 1.25, .5, 1); }
.homeLink:hover .logo .hole, .brand:hover .logo .hole { animation: logoHoleIn .15s ease-out both, logoWiden .38s ease-out .1s, logoPeekHole .38s ease-out; }
@keyframes logoHoleIn { from { opacity: 0; } }
@keyframes logoWiden { 40% { transform: scale(1.06, 1.02); } }
@keyframes logoPeekHole { 40% { transform: scale(1.06, 1.02); } }
@keyframes logoPop { from { transform: translate(-14px, 17px) scale(.5); } }
@keyframes logoPeek { 40% { transform: translate(-5px, 6px) scale(.85); } }
@media (prefers-reduced-motion: reduce) { .logo .arrow, .logo .hole, .logo .face { animation: none !important; } }
.where { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.where strong { font-weight: 600; white-space: nowrap; }
.path { font: 12px var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 28vw; }
.seg { display: flex; background: var(--hover); border-radius: 8px; padding: 2px; gap: 2px; }
.seg button { border: 0; background: none; padding: 5px 10px; border-radius: 6px; color: var(--ink-2); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.seg button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
.seg button[data-mode="comment"].on { background: var(--accent); color: var(--accent-ink); }
.seg button[data-mode="comment"].on kbd { background: transparent; color: var(--accent-ink); border-color: rgb(255 255 255 / .4); }
.spacer { flex: 1; }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.conn.live { background: var(--done); }
.conn.down { background: var(--danger); }
.presence { display: flex; }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); font-size: 11px; font-weight: 700; border: 2px solid var(--panel); margin-left: -6px; cursor: pointer; position: relative; padding: 0; }
.avatar.agentish { border-radius: 8px; }
.me { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 10px 4px 4px; display: flex; align-items: center; gap: 6px; font-weight: 500; }
.me .dot { width: 20px; height: 20px; border-radius: 50%; }
.me .role { font-size: 11px; color: var(--ink-2); font-weight: 500; }
.sideToggle { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 9px; display: flex; align-items: center; gap: 6px; font-weight: 600; }
.sideToggle.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }

/* ---------- stage ---------- */
.main { flex: 1; display: flex; min-height: 0; position: relative; }
.stage { flex: 1; min-width: 0; background: var(--stage); display: flex; justify-content: center; position: relative; overflow: auto; }
.frameWrap { width: 100%; height: 100%; transition: width .2s ease; background: #fff; }
.frameWrap.tablet { width: 834px; height: calc(100% - 32px); margin: 16px 0; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); flex: none; }
.frameWrap.mobile { width: 390px; height: min(844px, calc(100% - 32px)); margin: 16px 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); flex: none; }
/* Mobile and Tablet are a device (share.js drawPhone): its screen at the model's exact size, scaled as a
   whole to fit the window or to the zoom picked (fitPhone), the status bar above the page and the home
   bar below it in the page's own colour, in a body drawn around it (shadows take no room: the margins
   make it, above for the device bar, below for the floating toolbar). Screen radius 44 inside a body
   of 56: the gap between nested shapes is outer − inner. */
.frameWrap.phone { display: flex; flex-direction: column; width: var(--pw); height: var(--ph); margin: 72px 0 calc(96px + var(--ph) * (var(--pk, 1) - 1)); transform: scale(var(--pk, 1)); transform-origin: top center; border-radius: 44px; overflow: hidden; flex: none; background: var(--pbg, #fff); box-shadow: 0 0 0 12px #111114, 0 0 0 13px #3a3a40, 0 24px 60px rgb(0 0 0 / .28); }
.frameWrap.phone[data-look="classic"] { border-radius: 4px; box-shadow: 0 0 0 12px #111114, 0 -60px 0 12px #111114, 0 60px 0 12px #111114, 0 0 0 13px #3a3a40, 0 -60px 0 13px #3a3a40, 0 60px 0 13px #3a3a40; margin-top: 120px; margin-bottom: calc(156px + var(--ph) * (var(--pk, 1) - 1)); }
.frameWrap.phone[data-look="android"] { border-radius: 34px; }
.frameWrap.phone[data-look="ipad"] { border-radius: 18px; box-shadow: 0 0 0 16px #111114, 0 0 0 17px #3a3a40, 0 24px 60px rgb(0 0 0 / .28); }
.frameWrap.phone iframe { flex: 1; min-height: 0; height: auto; }
.phoneBar { flex: none; height: var(--pbar); display: flex; align-items: center; justify-content: space-between; padding: 0 26px 0 32px; background: var(--pbg, #fff); color: var(--pink, #000); font: 600 15px/1 -apple-system, system-ui, sans-serif; position: relative; user-select: none; }
.phoneBar .pbTime { min-width: 54px; letter-spacing: -.2px; }
.phoneBar .pbRight { display: flex; align-items: center; gap: 5px; }
.phoneBar svg { display: block; fill: currentColor; }
.phoneBar .pbSignal { width: 18px; height: 12px; }
.phoneBar .pbWifi { width: 16px; height: 12px; }
/* The battery as iOS draws it: a rounded body with a faint outline, full, and its cap. */
.phoneBar .pbBattery { position: relative; width: 25px; height: 12px; margin-left: 1px; border: 1px solid color-mix(in srgb, currentColor 40%, transparent); border-radius: 4px; }
.phoneBar .pbBattery::after { content: ""; position: absolute; right: -3.5px; top: 3.5px; width: 1.5px; height: 4px; border-radius: 0 1px 1px 0; background: color-mix(in srgb, currentColor 40%, transparent); }
.phoneBar .pbBattery i { position: absolute; inset: 1.5px; border-radius: 2px; background: currentColor; }
.phoneBar .pbMid { position: absolute; left: 50%; transform: translateX(-50%); background: #000; }
.phone[data-look="island"] .pbMid { top: 11px; width: 122px; height: 35px; border-radius: 18px; }
.phone[data-look="notch"] .pbMid { top: 0; width: 160px; height: 31px; border-radius: 0 0 20px 20px; }
.phone[data-look="android"] .pbMid { top: 11px; width: 12px; height: 12px; border-radius: 50%; }
.phone[data-look="classic"] .phoneBar { padding: 0 8px; font-size: 12px; }
.phone:is([data-look="island"], [data-look="notch"]) .phoneBar { font-size: 17px; padding: 0 30px 0 44px; } /* iOS: the time a little larger, centred in its corner */
.phone[data-look="classic"] .pbMid { display: none; }
.phone[data-look="android"] .phoneBar { padding: 0 20px; font-size: 13px; }
/* Which device, its size and its zoom: top left of the stage, like All pages' bar (overview.css .ovwBar). */
.deviceBar { position: absolute; top: 12px; left: 12px; z-index: 4; display: flex; align-items: center; gap: 2px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; }
.deviceBar[hidden], body.recording .deviceBar, body.replaying .deviceBar { display: none; }
.deviceBar button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: inherit; }
.deviceBar button:hover:not(:disabled) { background: var(--hover); }
.deviceBar button:disabled { opacity: .35; }
.deviceBar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.deviceBar button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent); }
.deviceBar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.deviceBar .dbModel { padding: 0 8px; font-weight: 600; }
.deviceBar .dbModel svg:last-child { width: 14px; height: 14px; color: var(--ink-3); }
.deviceBar .dbSize { padding: 0 6px; color: var(--ink-3); font: 500 12px/1 var(--mono); }
.deviceBar .dbPct { min-width: 52px; color: var(--ink-2); font: 500 12px/1 var(--mono); }
.deviceBar .dbDiv { width: 1px; align-self: stretch; margin: 4px; background: var(--line); }
.deviceBar [data-tip] { position: relative; }
.deviceBar [data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; top: calc(100% + 10px); z-index: 30; transform: translate(-50%, -2px); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--panel); font: 500 12px/16px var(--font); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s; }
.deviceBar [data-tip]:is(:hover, :focus-visible):not([aria-expanded="true"])::after { opacity: 1; transform: translate(-50%, 0); }
.phoneHome { flex: none; height: var(--phome); display: grid; place-items: center; background: var(--pbg, #fff); }
.phoneHome i { width: 134px; height: 5px; border-radius: 3px; background: var(--pink, #000); opacity: .85; }
.phone[data-look="android"] .phoneHome i { width: 108px; height: 4px; }
/* Safari's bar (share.js SAFARI_BAR): a floating glass capsule over the page's colour, Back, the
   address, More; the home bar under it. In iOS's own colours, light or dark with the page. */
.phone.safari .phoneHome { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 0; padding: 0 0 8px; }
.phone.safari .phoneHome > i { flex: none; margin-top: 21px; }
.sfBar { display: flex; align-items: center; gap: 8px; width: calc(100% - 20px); }
.sfBtn { flex: none; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%; color: var(--pink, #000); background: color-mix(in srgb, var(--pbg, #fff) 70%, var(--pink, #000) 6%); box-shadow: 0 0 0 .5px color-mix(in srgb, var(--pink, #000) 12%, transparent), 0 6px 18px rgb(0 0 0 / .14); backdrop-filter: blur(18px) saturate(1.6); }
.sfBtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
span.sfBtn svg { fill: currentColor; stroke: none; }
button.sfBtn { cursor: pointer; }
.sfAddr { flex: 1; min-width: 0; height: 48px; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 0 16px; border-radius: 24px; color: var(--pink, #000); background: color-mix(in srgb, var(--pbg, #fff) 70%, var(--pink, #000) 6%); box-shadow: 0 0 0 .5px color-mix(in srgb, var(--pink, #000) 12%, transparent), 0 6px 18px rgb(0 0 0 / .14); backdrop-filter: blur(18px) saturate(1.6); font: 500 15px/1 -apple-system, system-ui, sans-serif; }
.sfAddr svg { flex: none; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; opacity: .6; }
.sfUrl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 819px) {
  /* On a phone the prototype is shown as it is: that phone is the device. */
  .frameWrap.mobile, .frameWrap.tablet, .frameWrap.phone { width: 100%; height: 100%; margin: 0; border-radius: 0; box-shadow: none; transform: none; }
  .phoneBar, .phoneHome, .deviceBar { display: none; }
}
iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.hint { position: absolute; top: 16px; left: 50%; transform: translateX(-50%) translateY(-20px); opacity: 0; pointer-events: none; background: var(--ink); color: var(--panel); padding: 7px 14px; border-radius: 999px; font-size: 13px; transition: .18s ease; white-space: nowrap; }
.hint kbd { background: transparent; color: inherit; border-color: rgb(127 127 127 / .5); }
body.commenting .hint.show { opacity: .92; transform: translateX(-50%); }
body.commenting .hint:not(.show) { transition-duration: .4s; }

/* ---------- floating toolbar ---------- */
.tools { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 8; /* over a walkthrough's video and the recorder's layer (.recLayer: 6, .recNote: 7) */ display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.toolRow { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 2px; white-space: nowrap; }
.tools .presence .more { background: var(--hover); color: var(--ink-2); font-size: 10px; }
.tools .me { max-width: 150px; }
.tools .me .nm { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.me .dot, .me .role { flex: none; }
.tools.placed { transform: none; bottom: auto; }
.tools .seg button { padding: 6px 8px; }
.tools .divider { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line); }
.tools .presence:empty { display: none; }
.tools .presence { padding-left: 6px; }
.tools .avatar { width: 26px; height: 26px; }
.tools .me { padding: 3px 9px 3px 3px; font-size: 13px; }
.tools .me .dot { width: 18px; height: 18px; }
.tools .sideToggle { padding: 5px 8px; }
.tools .conn { margin: 0 2px; }
/* The toolbar's own controls (Figma: Design system · Components · Toolbar): Tabler icons at their
   stroke, bordered buttons 32px high; Activity and Share show only their icon on wider screens,
   named by a tooltip (data-tip; Agent keeps its label and its title, its beam owns ::after). */
.tools svg:not(.logo) { stroke-width: 2; }
.vpBtn { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: none; color: var(--ink); }
.vpBtn:hover, .vpBtn.open { background: var(--hover); }
.vpBtn .vpIco { width: 18px; height: 18px; }
.vpBtn .chev { width: 14px; height: 14px; color: var(--placeholder); }
.menu:has(.vpItem) { min-width: 200px; }
.menu .vpItem svg { width: 16px; height: 16px; flex: none; stroke-width: 2; color: var(--ink-2); }
.menu .vpItem .t { font-weight: 500; }
@media (min-width: 820px) {
  .tools .sideToggle { height: 32px; }
  .tools .pick { height: 28px; }
  .tools .iconOnly { width: 32px; padding: 0; justify-content: center; }
  .tools .iconOnly .lbl { display: none; }
  /* Like the toolbar's other buttons: no border, a tint on hover (the accent while its panel is open). */
  .tools .iconOnly:not(.on) { border-color: transparent; background: none; }
  .tools .iconOnly:not(.on):hover { background: var(--hover); }
  .tools .sideToggle svg { width: 16px; height: 16px; }
  .agentToggle #agentBadge { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 1; }
  .agentToggle #agentBadge[hidden] { display: none; }
  .tools [data-tip] { position: relative; }
  .tools [data-tip]::after { content: attr(data-tip); position: absolute; left: 50%; bottom: calc(100% + 10px); z-index: 30; transform: translate(-50%, 2px); padding: 4px 8px; border-radius: 6px; background: var(--ink); color: var(--panel); font: 500 12px/16px var(--font); white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .12s, transform .12s; }
  .tools [data-tip]:is(:hover, :focus-visible):not(.open)::after { opacity: 1; transform: translate(-50%, 0); }
}
.pick { border: 0; background: none; border-radius: 8px; padding: 4px 6px; display: flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.pick:hover, .pick.open { background: var(--hover); }
.pick .chev { width: 14px; height: 14px; color: var(--placeholder); }
.homeLink { display: grid; place-items: center; border-radius: 8px; padding: 4px; color: inherit; }
.homeLink:hover { background: var(--hover); }
.homeLink:not([href]) { pointer-events: none; }
.homeLink .brand { width: 26px; height: 24px; }
.homeLink .logo { width: 26px; height: 18px; }
.projBtn strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.verBtn { font: 600 12.5px var(--mono); color: var(--ink-2); }
.verBtn.old { background: #fef3c7; color: #92400e; }
.verBtn.live { background: var(--done-soft); color: var(--done); } /* the same green as Live's dot in the Versions menu */
.verBtn.pending #verLabel::after { content: ""; display: inline-block; width: 6px; height: 6px; margin-left: 5px; border-radius: 50%; background: var(--warn); vertical-align: 1px; } /* work not pushed yet: Push is in the menu */

/* ---------- menus (project switcher, versions) ---------- */
.menu { position: fixed; z-index: 20; min-width: 260px; max-width: min(360px, calc(100vw - 16px)); max-height: min(420px, calc(100vh - 16px)); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-menu); padding: 2px; }
.menu h4 { margin: 8px 8px 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.menu .item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 7px; color: var(--ink); text-decoration: none; }
.menu .item:hover { background: var(--bg); } /* Figma: bg/subtle */
.menu .item.on { background: var(--accent-soft); }
.menu .item .main2 { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.menu .item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .item .s { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .item .r { font: 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.menu .item .s.path { font: 11px var(--mono); }
.menu .item[hidden] { display: none; }
.menu .item.appData, .menu .item.appData:hover { background: none; cursor: default; } /* says where the app's data comes from; not a choice */
.pageBadge, .projHint { display: inline-flex; align-items: center; gap: 3px; flex: none; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 12px; line-height: 1; padding: 3px 7px 3px 6px; }
.pageBadge svg, .projHint svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.menu .item.on .pageBadge { background: var(--panel); }
/* A page's or state's code (A3, A3.2: see worker/pages.js), to point at it with. */
.placeCode { flex: none; font: 600 11px/16px var(--mono); padding: 0 5px; border-radius: 4px; background: var(--ink); color: var(--panel); letter-spacing: 0; }
.menu .item .placeCode { margin-right: 2px; }
/* Where a comment pointed at in the panel is: its page or state, beside the panel. */
.placePeek { position: fixed; z-index: 9; width: 320px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-menu); pointer-events: none; }
.placePeek[hidden] { display: none; }
.ppHead { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 2px 8px; font: 600 13px/18px var(--font); }
.ppName { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppPath { margin-left: auto; font: 11px var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ppShot { position: relative; overflow: hidden; border-radius: 7px; border: 1px solid var(--line); background: #fff; }
.ppShot img { display: block; width: 100%; }
.ppShot img.ppCrop { height: 100%; object-fit: contain; background: var(--hover); }
.ppWait { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: 12px; }
.ppPin { position: absolute; width: 20px; height: 20px; display: grid; place-items: center; transform: translateY(-100%); border: 2px solid #fff; border-radius: 50% 50% 50% 3px; background: var(--c); color: #fff; font: 700 10px/1 var(--font); box-shadow: 0 2px 6px rgb(0 0 0 / .3); }
.ppNote { padding: 6px 2px 0; color: var(--ink-3); font-size: 12px; }
.projHint { font-size: 11px; padding: 2px 6px 2px 5px; }
.projHint[hidden] { display: none; }
.menu .item .tag.teamOnly + .pageBadge { margin-left: -4px; }
.menu .pagesHead { display: flex; align-items: center; justify-content: space-between; }
.menu .gear { display: grid; place-items: center; min-width: 24px; height: 24px; margin: -4px -4px -4px 0; padding: 0 6px; border: 0; border-radius: 6px; background: none; color: var(--ink-3); font-family: inherit; font-size: 12px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0; cursor: pointer; }
.menu .gear:hover { background: var(--hover); color: var(--ink); }
.menu .gear.on { color: var(--accent); }
.menu .gear svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.menu .menuHint { margin: 0 8px 8px; font-size: 12px; color: var(--ink-2); }
.menu .tag.teamOnly { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--hover); border-radius: 999px; padding: 2px 7px; white-space: nowrap; }
.visToggle { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 2px; font-size: 12px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.visToggle span { position: relative; width: 28px; height: 16px; border-radius: 999px; background: var(--line); transition: background .15s; }
.visToggle span::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.visToggle[aria-checked="true"] span { background: var(--accent); }
.visToggle[aria-checked="true"] span::after { transform: translateX(12px); }
.hiddenCover { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: var(--bg); }
.hiddenCover[hidden] { display: none; }
.hiddenCover .card { display: flex; flex-direction: column; gap: 6px; max-width: 340px; padding: 20px 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); text-align: center; }
.hiddenCover .card span { color: var(--ink-2); font-size: 14px; }
.hiddenCover .row { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.hiddenCover button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 6px 14px; font-weight: 600; cursor: pointer; }
.hiddenCover button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.menu .pageFilter { display: block; width: calc(100% - 8px); margin: 0 4px 6px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg, transparent); color: var(--ink); font: inherit; font-size: 13px; }
.menu .sep { height: 1px; background: var(--line); margin: 3px 6px; }
/* Push vN, asked first: what goes in, and that the client is told. */
.menu .pushAsk { display: grid; gap: 6px; max-width: 300px; padding: 8px 8px 6px; }
.menu .pushAsk b { font-size: 14px; font-weight: 600; color: var(--ink); }
.menu .pushAsk p { margin: 0; font-size: 13px; line-height: 1.4; color: var(--ink-2); }
.menu .pushAsk .files { font: 12px var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
.liveDot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); opacity: .5; flex: none; }
.liveDot.on { background: var(--done); opacity: 1; box-shadow: 0 0 0 3px color-mix(in srgb, var(--done) 25%, transparent); }
.vtag { font: 11px var(--mono); color: var(--ink-3); }
/* Versions menu (Figma "Versions menu · A2"): one line per version; the live server first, Push beside it.
   The list shows 3½ rows and scrolls, so 30 versions don't make a long menu. */
.menu:has(.verList, .verLive) { width: 340px; }
.menu .verRow { min-height: 34px; }
.menu .verRow.on { background: var(--hover); }
.menu .verNum { flex: none; width: 46px; display: inline-flex; align-items: center; gap: 6px; font: 500 12.5px var(--mono); color: var(--ink); }
.menu .verNum.live { color: var(--done); }
.menu .verNum.live.down { color: var(--ink-3); }
.menu .verNote { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu .verNote.warn { color: var(--warn); }
.menu .verNote.quiet { color: var(--ink-3); font-weight: 400; }
.menu .verDate { flex: none; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.menu .verRow .lost { flex: none; font-size: 12px; }
.menu .verCheck { flex: none; width: 16px; height: 16px; stroke-width: 2; color: var(--accent); }
.menu .verHead { display: flex; justify-content: space-between; }
.menu .verCount { font-weight: 500; }
.menu .verList { max-height: calc(34px * 3.5); overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.menu .verLive { display: flex; align-items: center; border-radius: 7px; }
.menu .verLive.on { background: var(--hover); }
.menu .verLive .verRow { flex: 1; min-width: 0; background: none; }
.menu .verLive:not(.on) .verRow:hover { background: var(--bg); }
.menu .verPush { flex: none; width: auto; gap: 5px; margin-right: 5px; padding: 5px 11px 5px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 13px; font-weight: 600; white-space: nowrap; }
.menu .verDown { padding: 2px 8px 8px; }
.menu .verDown p { margin: 0 0 8px; font-size: 12px; line-height: 1.4; color: var(--ink-2); }
.menu .verCmd { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 5px 0 12px; border-radius: 10px; background: #121214; }
.menu .verCmd code { flex: 1; min-width: 0; color: #fff; font: 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu .verCopy { flex: none; height: 30px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 13px var(--font); cursor: pointer; }
.menu .verPush:hover { background: var(--accent); filter: brightness(1.08); }
.menu .verPush svg { width: 14px; height: 14px; stroke-width: 2; }

/* On a variant: like the bar in All pages (back to the draft, which one, ‹ ›). Banners go under it. */
.variantBar { position: absolute; top: 12px; left: 12px; z-index: 4; display: flex; align-items: center; gap: 2px; max-width: calc(100% - 24px); padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.variantBar[hidden], .stage:has(.ovw) .variantBar { display: none; }
.variantBar button { display: flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-width: 32px; height: 32px; padding: 0 6px; border: 0; border-radius: 8px; background: none; color: var(--ink); font: 500 13px/1 var(--font); }
.variantBar button:hover:not(:disabled) { background: var(--hover); }
.variantBar button:disabled { color: var(--placeholder); }
.variantBar button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.variantBar svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.variantBar .vbBack { padding: 0 8px 0 6px; }
.vbSep { padding: 0 2px; color: var(--placeholder); }
.vbLetter { display: inline-grid; place-items: center; flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: var(--ink); color: var(--panel); font: 600 11px/1 var(--mono); }
.variantBar .vbStar { margin-left: 4px; color: var(--ink-2); }
.variantBar .vbStar.on { color: #f59e0b; }
.variantBar .vbStar.on svg { fill: currentColor; }
.variantBar .vbRemove { margin-left: 4px; color: var(--ink-2); }
.variantBar .vbRemove:hover:not(:disabled) { color: var(--danger); }
.variantBar .vbUse { flex: none; height: 32px; margin-left: 4px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 500 13px/1 var(--font); cursor: pointer; }
.variantBar .vbUse:hover:not(:disabled) { background: var(--accent); filter: brightness(1.1); }
.variantBar .vbUse:disabled { background: var(--hover); color: var(--ink-2); cursor: default; }
.vbTitle { min-width: 0; max-width: 360px; padding: 0 8px 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
body.onVariant .oldBanner { top: 64px; }
.oldBanner { position: absolute; top: 12px; left: 12px; z-index: 4; display: flex; align-items: center; gap: 8px; background: #fef3c7; color: #92400e; border: 1px solid #fde68a; padding: 6px 8px 6px 12px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); }
.oldBanner button { border: 0; background: #92400e; color: var(--accent-ink); border-radius: 8px; padding: 4px 10px; font-weight: 600; font-size: 13px; }
.oldBanner[hidden] { display: none; }
.toast button { margin-left: 10px; border: 0; background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 3px 10px; font-weight: 600; pointer-events: auto; }
.toast.action { pointer-events: auto; }
.grip { display: grid; place-items: center; width: 18px; color: var(--ink-3); cursor: grab; touch-action: none; }
.grip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.side.placed { right: auto; }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none !important; }
body.dragging #frame { pointer-events: none; }

/* ---------- sidebar ---------- */
/* Floats over the stage instead of taking width from it, so the prototype keeps the
   full viewport width and its breakpoints don't change when the panel opens. */
.side { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 360px; max-width: calc(100% - 24px); z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
body.sideMin .side { display: none; }
.sideTitle { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 6px; border-bottom: 1px solid var(--line); cursor: grab; user-select: none; touch-action: none; }
.sideTitle strong { font-weight: 600; }
.sideTitle .n { color: var(--ink-3); font-weight: 500; margin-right: auto; }
.iconBtn { border: 0; background: none; border-radius: 6px; padding: 4px; display: grid; place-items: center; color: var(--ink-2); }
.iconBtn:hover { background: var(--hover); color: var(--ink); }
.sideHead { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--line); gap: 8px; }
.tabs { display: flex; gap: 2px; }
.tabs button { border: 0; background: none; padding: 5px 9px; border-radius: 6px; color: var(--ink-2); font-weight: 500; }
.tabs button.on { background: var(--hover); color: var(--ink); }
.tabs .n { color: var(--ink-3); font-weight: 500; margin-left: 3px; }
.check { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 13px; user-select: none; }
.teamBar { display: flex; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.teamBar button { flex: 1; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 6px 8px; font-size: 13px; font-weight: 500; }
.teamBar button:hover { background: var(--hover); }
body:not(.team) .team-only { display: none !important; }
.list { flex: 1; overflow: auto; padding: 8px; }
.empty { color: var(--ink-2); text-align: center; padding: 40px 20px; }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }

.card { border: 1px solid transparent; border-radius: var(--radius); padding: 10px; cursor: pointer; }
.card:hover { background: var(--hover); }
.card.sel { border-color: var(--line); background: var(--panel); box-shadow: var(--shadow); cursor: default; }
.card + .card { margin-top: 2px; }
.threadPop { position: absolute; z-index: 4; width: 340px; max-height: min(70vh, 560px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.threadPop[hidden] { display: none; }
.threadPop.away { visibility: hidden; }
.threadPop .popHead { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 4px; padding: 6px 6px 6px 12px; background: var(--panel); border-bottom: 1px solid var(--line); font-size: 13px; }
.threadPop .popHead .n { color: var(--ink-3); margin-left: 4px; }
.threadPop .popHead .grow { flex: 1; }
.threadPop .popHead .iconBtn[disabled] { opacity: .35; pointer-events: none; }
.threadPop .card, .threadPop .card.sel { border: 0; box-shadow: none; background: none; cursor: default; padding: 0; }
@media (max-width: 819px) {
  .threadPop { left: 8px !important; right: 8px; top: auto !important; bottom: 72px; width: auto; max-height: 55vh; }
}
.cardHead { display: flex; align-items: center; gap: 8px; }
.num { width: 22px; height: 22px; border-radius: 50% 50% 50% 2px; display: grid; place-items: center; color: var(--accent-ink); font-size: 11px; font-weight: 700; flex: none; }
.who { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.when { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.cardHead .badge { margin-left: auto; }
.cardHead .badge + .acts { margin-left: 4px; }
.badge { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.badge.open { background: var(--hover); color: var(--ink-2); }
.badge.queued { background: var(--queued-soft); color: var(--queued); }
.badge.in_progress { background: var(--progress-soft); color: var(--progress); }
.badge.resolved { background: var(--done-soft); color: var(--done); }
.badge.review { background: var(--accent-soft); color: var(--accent); }
.fixBar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 8px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--ink); font-size: 13px; }
.fixBar.wait { color: var(--ink-2); }
.fixBar .grow { flex: 1; }
.pv { display: flex; gap: 8px; align-items: flex-start; }
.pv .preview { flex: 1; min-width: 0; }
.thumb { flex: none; width: 64px; height: 44px; margin-top: 6px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: var(--hover); }
.shot { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--hover); }
.shot img { display: block; width: 100%; max-height: 220px; object-fit: cover; }
/* The picture viewer (screenshots, pictures sent with a message). */
#shotDlg.lightbox { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; padding: 0; background: transparent; color: var(--accent-ink); display: none; flex-direction: column; }
#shotDlg.lightbox[open] { display: flex; animation: lbIn .16s ease-out; }
#shotDlg::backdrop { background: rgb(9 9 11 / .82); backdrop-filter: blur(6px); }
@keyframes lbIn { from { opacity: 0; } }
.lbBar { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 20px; font-size: 13px; min-width: 0; }
.lbBar .grow { flex: 1; }
.lbName { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.lbMeta { color: rgb(255 255 255 / .6); white-space: nowrap; }
.lbBtn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; flex: none; }
.lbBtn svg { width: 18px; height: 18px; stroke-width: 2.2; }
.lbBtn:hover { background: rgb(255 255 255 / .22); }
.lbBtn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lbStage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 16px 24px; }
.lbPic { min-width: 0; min-height: 0; max-width: 100%; max-height: 100%; display: flex; border-radius: 10px; overflow: hidden; box-shadow: 0 24px 70px rgb(0 0 0 / .55);
  /* Transparent parts show a checkerboard. */
  background: repeating-conic-gradient(#e4e4e7 0% 25%, #fafafa 0% 50%) 50% / 18px 18px; }
.lbPic img { display: block; max-width: min(100%, 1600px); max-height: calc(100dvh - 90px); object-fit: contain; }
.lbNav { display: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgb(255 255 255 / .12); color: #fff; place-items: center; padding: 0; cursor: pointer; flex: none; }
.lbNav svg { width: 22px; height: 22px; stroke-width: 2.2; }
.lbNav:hover { background: rgb(255 255 255 / .22); }
.lightbox.many .lbNav { display: grid; }
@media (max-width: 819px) { .lbStage { padding: 0 8px 16px; gap: 6px; } .lbNav { width: 36px; height: 36px; } }
.preview { margin: 6px 0 0 30px; color: var(--ink); white-space: pre-wrap; word-break: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { margin: 4px 0 0 30px; color: var(--ink-3); font-size: 12px; display: flex; gap: 10px; }
.meta .pg { font-family: var(--mono); }
.detached { color: var(--queued); }
.tabchip { background: var(--accent-soft); color: var(--accent); border-radius: 6px; padding: 0 6px; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabchip.unknown { background: var(--queued-soft); color: var(--queued); }
.row.where { font-size: 13px; color: var(--ink-2); }
.sortBar { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin: 0 0 8px; padding: 8px 10px; border-radius: 8px; background: var(--queued-soft); color: var(--queued); font-size: 13px; font-weight: 500; }
.whereInfo b { color: var(--ink); font-weight: 600; }
button.link { border: 0; background: none; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; }
button.link:hover { text-decoration: underline; }

.thread { margin: 10px 0 0 30px; display: flex; flex-direction: column; gap: 10px; }
.cmt .h { display: flex; align-items: center; gap: 6px; }
.cmt .b { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.cmt.event { color: var(--ink-3); font-size: 12px; font-style: italic; }
.cmt.agent .b { border-left: 2px solid var(--agent); padding-left: 8px; }
.reply textarea, .composer textarea { width: 100%; resize: vertical; min-height: 60px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font: inherit; color: var(--ink); background: var(--panel); }
.reply textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 10px; font-size: 13px; font-weight: 600; }
.btn:hover { background: var(--hover); }
.btn.primary, button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.ghost { border-color: transparent; color: var(--ink-2); }
.btn.danger { color: var(--danger); border-color: transparent; }
.row .grow { flex: 1; }

/* ---------- questions: the interview that opens out of the toolbar ---------- */
.pill { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--panel); color: var(--ink-2); }
.pill.question { background: #dbeafe; color: #1e40af; }
.pill.assumption { background: var(--agent-soft); color: var(--agent); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.question { background: #172554; color: #bfdbfe; } }
:root[data-theme="dark"] .pill.question { background: #172554; color: #bfdbfe; }
.badge.waiting { background: var(--queued-soft); color: var(--queued); }
.badge.answered, .badge.confirmed, .badge.process { background: var(--accent-soft); color: var(--accent); }
.badge.closed, .badge.processed { background: var(--done-soft); color: var(--done); }
.sideName { font-weight: 600; margin-right: auto; }
.sideName .n { color: var(--ink-3); font-weight: 500; margin-left: 6px; }
/* The Questions button: labelled, and filled while something waits on you. */
.qbtn { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 9px 5px 7px; font-weight: 600; white-space: nowrap; }
.qbtn[hidden] { display: none; }
.qbtn.hot { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 35%, transparent); }
.qbtn.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.qbtn .cnt { background: var(--accent-ink); color: var(--accent); border-radius: 999px; font-size: 12px; font-weight: 700; min-width: 19px; padding: 0 5px; text-align: center; line-height: 18px; }
.qbtn:not(.hot) .cnt { background: var(--accent); color: var(--accent-ink); }
.qbtn .cnt[hidden] { display: none; }
/* The client's nudge above the toolbar. */
.qInvite { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translateX(-50%); display: flex; align-items: center; gap: 8px; background: var(--ink); color: var(--panel); border-radius: 999px; padding: 5px 5px 5px 14px; box-shadow: var(--shadow); font-size: 13px; white-space: nowrap; }
.qInvite[hidden] { display: none; }
.qInvite .go { border: 0; background: var(--panel); color: var(--ink); border-radius: 999px; padding: 4px 12px; font-weight: 600; }
.qInvite .x { border: 0; background: none; color: inherit; opacity: .6; padding: 2px; display: grid; }
.qInvite .x svg { width: 14px; height: 14px; }
/* The sheet: part of the toolbar box, above the row (or below it near the top). */
/* The sheet floats above the toolbar (below it near the top); the toolbar itself never changes. */
.qSheet { display: none; position: absolute; left: 0; bottom: calc(100% + 8px); width: min(560px, calc(100vw - 16px)); max-height: min(70vh, 620px); overflow: auto; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.tools.qopen .qSheet { display: block; }
.tools.below .qSheet { bottom: auto; top: calc(100% + 8px); }
.qSheet .grow { flex: 1; }
.pill.draft { background: var(--hover); color: var(--ink-2); border: 1px dashed var(--ink-3); }
.kbd.inv { color: var(--accent-ink); border-color: rgb(255 255 255 / .45); margin-left: 4px; }
.ctx { font: 11px var(--mono); color: var(--ink-3); word-break: break-all; }

/* ---------- dialog / toast ---------- */
dialog { border: 0; border-radius: 16px; padding: 0; box-shadow: var(--shadow-modal); background: var(--panel); color: var(--ink); width: min(360px, calc(100vw - 32px)); }
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(2px); }
dialog form { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
dialog h2 { margin: 0; font-size: 17px; }
dialog p { margin: 0; color: var(--ink-2); }
dialog .primary { border: 0; border-radius: 8px; padding: 9px; font-weight: 600; }

/* ---------- join dialog (Figma: Join modal · W6) ---------- */
/* Fields: 40px, radius 10 (the share modal's Field); buttons: 40px pills. */
.joinDlg { width: min(440px, calc(100vw - 32px)); border-radius: 16px; box-shadow: 0 1px 3px rgb(0 0 0 / .06), 0 12px 32px rgb(0 0 0 / .12); }
.joinDlg:focus { outline: none; }
.joinDlg form { padding: 20px; gap: 20px; }
.joinDlg [hidden] { display: none !important; }
.jHead { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.jMark { position: relative; width: 65px; height: 65px; margin-bottom: 2px; }
.jLogo { position: absolute; inset: 0 9px 9px 0; display: grid; place-items: center; border-radius: 14px; overflow: hidden; color: var(--accent-ink); font-size: 20px; font-weight: 700; background: var(--ink); }
.jLogo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jBy { position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; box-shadow: 0 0 0 2px var(--panel); }
.jBy img { width: 100%; height: 100%; object-fit: cover; }
.jLogo[hidden] + .jBy { position: static; width: 56px; height: 56px; font-size: 20px; margin: 0 auto; box-shadow: none; }
.jMark:has(.jLogo[hidden]) { width: auto; height: auto; }
.jFrom { font-size: 13px; font-weight: 500; color: var(--ink-2); line-height: 18px; }
.joinDlg h2 { font-size: 20px; line-height: 26px; letter-spacing: -.01em; overflow-wrap: anywhere; text-wrap: balance; }
.joinDlg p { text-wrap: pretty; }
.jSub { font-size: 14px; }
.jNew, .jBack, .jGoogleWrap { display: flex; flex-direction: column; gap: 12px; }
.jGoogle { display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--ink); font-weight: 600; }
.jGoogle:hover:not(:disabled) { background: var(--hover); }
.jGoogle svg { width: 18px; height: 18px; stroke: none; }
.jOr { display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 12px; font-weight: 500; }
.jOr::before, .jOr::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.jField { display: flex; flex-direction: column; gap: 6px; }
.jField > span { font-size: 13px; font-weight: 500; color: var(--ink-2); text-align: left; }
.jField input { height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 14px; font: inherit; background: var(--panel); color: var(--ink); outline: none; }
.jField input::placeholder { color: var(--placeholder); }
.jField input:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.jField.bad input { border-color: var(--danger); box-shadow: inset 0 0 0 .5px var(--danger); }
.jField input:disabled { opacity: .5; }
.jErr { margin-top: -6px !important; font-size: 13px; color: var(--danger) !important; text-align: left; }
.jAlert { padding: 10px 14px; border-radius: 10px; background: var(--danger-soft); color: var(--danger) !important; font-size: 13px; }
.joinDlg .primary { display: flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 18px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.joinDlg .primary svg { width: 16px; height: 16px; stroke-width: 2; }
.joinDlg .primary:disabled { opacity: .8; cursor: progress; }
.joinDlg .primary.danger { background: var(--danger); color: #fff; }
.jPerson { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.jAv { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--accent-ink); font-size: 15px; font-weight: 700; }
.jWho { display: flex; flex-direction: column; min-width: 0; }
.jWho b { font-weight: 600; }
.jWho span { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.jLink { border: 0; background: none; padding: 2px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.jLink:hover { color: var(--ink); }
.jGuest { align-self: center; font-size: 14px; font-weight: 500; }
/* The same dialog as a page of its own: the invite-only join link (worker: joinPage). */
body.joinPage { display: grid; place-items: center; height: auto; min-height: 100vh; min-height: 100dvh; padding: 16px; overflow: auto; }
.joinPage .joinDlg { position: static; margin: 0; }
.joinPage a.jGoogle, .joinPage a.jLink { text-decoration: none; text-align: center; }
.joinPage .jSub b { color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
/* Signed in without access (W7): who you are, at the foot; while waiting, a spinner. */
.jSigned { font-size: 13px; text-align: center; overflow-wrap: anywhere; }
.jSigned a { color: var(--ink); font-weight: 600; text-decoration: none; }
.jSigned a:hover { text-decoration: underline; }
.jWait { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: -10px !important; font-size: 13px; font-weight: 500; }
.jWait svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; animation: jSpin .9s linear infinite; }
@keyframes jSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .jWait svg { animation: none; } }
.jDivider { border: 0; border-top: 1px solid var(--line); margin: 0; }
.jField textarea { min-height: 72px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; background: var(--panel); color: var(--ink); outline: none; resize: vertical; }
.jField textarea::placeholder { color: var(--placeholder); }
.jField textarea:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.jField textarea:disabled { opacity: .5; }
.jSent { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.jSent p { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink) !important; font-size: 14px; }
.toast { position: fixed; left: 50%; top: 16px; width: max-content; max-width: calc(100vw - 24px); transform: translateX(-50%) translateY(-16px); display: flex; align-items: center; background: var(--ink); color: var(--panel); padding: 9px 16px; border-radius: 10px; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 10; }
.toast.show { opacity: 1; transform: translateX(-50%); }
body.commenting .toast { top: 60px; }

/* ---------- narrow screens ---------- */
@media (max-width: 820px) {
  .bar { gap: 8px; padding: 0 8px; }
  .vpBtn, .tools .divider, .tools .presence, .tools .conn, .me .role, .projBtn strong { display: none; }
  .tools .me { padding: 3px; }
  .tools .me .nm { display: none; }
  .seg button { padding: 5px 8px; }
  .side { top: 8px; right: 8px; bottom: 8px; max-width: calc(100% - 16px); }
}

.item .lost { color: var(--danger); font-weight: 600; }
/* Viewing Live with work that isn't pushed yet (team). */
.pushBanner { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.pushBanner button { background: var(--accent); color: var(--accent-ink); }
/* On Live: the app in the page hasn't started yet (quiet), or didn't (amber, with Reload). */
.startBanner { background: var(--panel); color: var(--ink-2); border-color: var(--line); padding-right: 12px; }
.startBanner.stuck { background: var(--queued-soft); color: #92400e; border-color: #fde68a; padding-right: 8px; }
.stage:has(.ovw) .startBanner { display: none; }
/* You, as an avatar (Google picture or initials on your color); the menu has the details. */
.meAv { width: 28px; height: 28px; border-radius: 50%; border: 0; padding: 0; flex: none; display: grid; place-items: center; overflow: hidden; color: var(--accent-ink); font-size: 11px; font-weight: 700; cursor: pointer; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
.meAv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meAv:hover, .meAv.open { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--accent); }
.meAv:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.meHead { display: flex; gap: 10px; align-items: center; padding: 6px 8px 10px; }
.meHead .meAv { width: 36px; height: 36px; font-size: 13px; cursor: default; box-shadow: none; }
.meHead b { display: block; font-size: 14px; }
.meHead div span { font-size: 12px; color: var(--ink-2); }
/* Work not pushed yet (team): a button next to the version. */
.pushPill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-weight: 600; font-size: 13px; white-space: nowrap; cursor: pointer; }
.pushPill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pushPill:hover { border-color: var(--accent); }
.pushPill[hidden] { display: none; }
.livePill { background: color-mix(in srgb, #16a34a 12%, transparent); color: #15803d; }
.livePill::before { content: none; }
.livePill:hover { border-color: #16a34a; }
.livePill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.meAv.down { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--danger); }
.meColors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 2px 4px 8px; }
.meColors button { width: 100%; height: 48px; border: 0; border-radius: 8px; background: transparent; display: grid; place-items: center; cursor: pointer; }
.meColors button:hover { background: var(--hover); }
.meColors button.on { box-shadow: inset 0 0 0 2px var(--accent); background: var(--accent-soft); }
.meColors button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.meColors svg { width: 26px; height: 26px; stroke: #fff; stroke-width: 1.2; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .3)); }
.item.signout { display: flex; align-items: center; gap: 10px; }
.item.signout svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.meAv { position: relative; overflow: visible; }
.meAv img { border-radius: 50%; }
.meCursor { position: absolute; right: -5px; bottom: -4px; width: 13px; height: 13px; stroke: #fff; stroke-width: 1.6; filter: drop-shadow(0 1px 1px rgb(0 0 0 / .35)); pointer-events: none; }
/* Questions: the filter above the list, flush with the rows' #numbers; All groups by status. */

/* ---------- the agent queue ---------- */
.agentToggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.agentToggle #agentBadge[hidden] { display: none; }
.agentSide { position: absolute; top: 12px; right: 12px; bottom: 12px; width: 360px; max-width: calc(100% - 24px); z-index: 5; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.agentSide[hidden], body.agentOpen .side { display: none; }
.agentSide.placed { right: auto; }
/* The same header as Comments / Clarify / Backlog: the big title, no line under it, and it moves the panel. */
.agentSide .agentTitle { padding: 10px 8px 4px 18px; border-bottom: 0; }
.agentSide .agentTitle .sideName { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
/* What's lined up, as on the Agent button. */
.agentSide .agentTitle .sideName { display: inline-flex; align-items: center; }
.agentSide .agentTitle .sideName .n { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 1; }
.agentSide .agentTitle .sideName .n[hidden] { display: none; }
.agentList { flex: 1; overflow: auto; padding: 6px 8px 10px; }
.agentList h4 { margin: 10px 6px 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.agentItem { display: flex; align-items: center; gap: 10px; padding: 7px 6px; border-radius: 8px; cursor: pointer; }
.agentItem:hover { background: var(--hover); }
.agentItem .num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.agentItem .num.question { background: var(--ink); color: var(--panel); }
.agentItem .num.task { background: var(--ink); color: var(--panel); }
/* The agent at work (thinking-orbs): the item it's on, the ones waiting their turn, the toolbar button. */
.agentItem .num.orbNum { background: none; color: var(--accent); }
.agentItem .num.orbNum.wait { color: var(--ink-2); }
/* The item the agent is on: a light moving across its words. Waiting their turn: a bit dimmer. */
.agentItem.working .t { font-weight: 600; color: transparent; background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 38%, var(--accent) 50%, var(--ink) 62%, var(--ink) 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: textShimmer 1.8s linear infinite; }
@keyframes textShimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .agentItem.working .t { animation: none; background: none; color: var(--ink); } }
.agentItem.waiting .t { color: var(--ink-2); }
.agentItem .s.step { color: var(--ink-3); font-size: 12px; margin-top: 1px; }
/* While a run goes: "Generating vN" on top, with how far along it is and what the agent does now. */
/* While a run goes: "Generating vN" on top of the queue, the items it took as a deck under it (the
   one it's on in front, the next ones' edges behind). Done, a card drops into its row in the history.
   It opens and closes by its height, so nothing under it jumps. */
.runDeck { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .6s cubic-bezier(.45, 0, .2, 1), opacity .4s ease; position: relative; z-index: 2; }
.runDeck > div { min-height: 0; overflow: visible; }
.runDeck.dkShut { grid-template-rows: 0fr; opacity: 0; }
.runDeck.dkShut > div { overflow: hidden; }
.dkHead { display: flex; align-items: center; gap: 8px; padding: 4px 6px 0; }
.dkHead .o { width: 30px; height: 30px; margin-left: -4px; display: grid; place-items: center; color: var(--accent); flex: none; }
.dkHead .o .orb { width: 28px; height: 28px; }
.dkHead .t { flex: 1; font-weight: 600; font-size: 14px; }
.dkHead .n { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.dkStage { position: relative; height: 76px; margin: 10px 6px 6px; }
/* Every card handed over while the run still pushes: no empty space where they were. */
.dkStage { transition: height .4s cubic-bezier(.45, 0, .2, 1), margin .4s cubic-bezier(.45, 0, .2, 1); }
.dkStage:empty { height: 0; margin-top: 0; margin-bottom: 0; }
.dkCard { position: absolute; left: 0; right: 0; top: 0; height: 56px; box-sizing: border-box; display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); transition: transform .7s cubic-bezier(.45, 0, .2, 1), opacity .5s ease, box-shadow .4s; }
.dkCard .num { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; }
.dkCard .num.task, .dkCard .num.question { background: var(--ink); color: var(--panel); }
.dkCard .m { flex: 1; min-width: 0; }
.dkCard .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.dkCard.on { box-shadow: 0 1px 2px rgb(0 0 0 / .05), 0 4px 14px rgb(0 0 0 / .07); }
.dkCard.on .tt { font-weight: 600; color: transparent; background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 38%, var(--accent) 50%, var(--ink) 62%, var(--ink) 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; animation: textShimmer 1.8s linear infinite; }
.dkCard .st { height: 17px; overflow: hidden; position: relative; font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.dkCard .st span { position: absolute; inset: 0 0 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform .4s cubic-bezier(.45, 0, .2, 1), opacity .4s ease; }
.dkCard .st span.out { transform: translateY(-100%); opacity: 0; }
.dkCard .st span.in { transform: translateY(100%); opacity: 0; }
/* Pushing: the words stay still, only the dots come and go. */
.dkDots i { font-style: normal; animation: dkDot 1.2s infinite both; }
.dkDots i:nth-child(2) { animation-delay: .2s; }
.dkDots i:nth-child(3) { animation-delay: .4s; }
@keyframes dkDot { 0%, 20% { opacity: .15; } 40% { opacity: 1; } 80%, 100% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) {
  .runDeck, .dkCard, .dkCard .st span { transition: none; }
  .dkCard.on .tt { animation: none; background: none; color: var(--ink); }
  .dkDots i { animation: none; opacity: 1; }
}
.agentItem .s.asks { color: var(--ink-2); white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 1px; }
.agentItem .s.asks b { color: var(--warn); font-weight: 600; margin-right: 4px; }
.agentItem.needs .num { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--warn); }
/* The history under the queue: what the agent fixed, a divider per version, each a step lighter. */
.agentHist { margin-top: 10px; }
.histV { display: flex; align-items: center; gap: 8px; margin: 12px 6px 4px; font-size: 11px; font-weight: 600; letter-spacing: .04em; color: var(--ink-3); opacity: var(--fade, 1); }
/* Its label can roll ("Pushing…" to the version). */
.histV { overflow: hidden; }
.histV span { display: inline-block; }
.histV::before, .histV::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.histGroup .agentItem { opacity: var(--fade, 1); transition: opacity .15s; }
.histGroup .agentItem:hover { opacity: 1; }
.agentItem.done .t { color: var(--ink-2); }
/* A fix not checked yet: Resolve shows on hover, in a small bar on top of the row (as on comments). */
.agentHist .agentItem { position: relative; }
.histActs { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: flex; padding: 3px; border-radius: 10px; background: var(--panel); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 2px 10px rgb(0 0 0 / .1); opacity: 0; pointer-events: none; transition: opacity .15s; }
.agentHist .agentItem:hover .histActs, .histActs:focus-within { opacity: 1; pointer-events: auto; }
.histActs .rowIco { width: 30px; height: 28px; border-radius: 8px; }
.histActs .rowIco:hover { background: var(--hover); color: var(--done); }
@media (hover: none) { .histActs { opacity: 1; pointer-events: auto; position: static; transform: none; box-shadow: none; background: none; padding: 0; margin-left: auto; } }
.agentItem .num { position: relative; }
.doneTick { position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; padding: 1px; border-radius: 50%; background: var(--ink-3); box-shadow: 0 0 0 1.5px var(--panel); fill: none; stroke: var(--panel); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
/* Grey while it waits to be checked, green once it's resolved. */
.doneTick.ok { background: var(--done); }
.histMore { display: block; margin: 12px auto 4px; font-size: 12px; color: var(--ink-3); opacity: .7; }
.orb, .orb * { fill: currentColor; stroke: none; }
.agentToggle .tbOrb { display: none; width: 18px; height: 18px; color: var(--accent); }
.agentToggle.busy .tbOrb { display: block; }
.agentToggle.busy > svg:first-child { display: none; }
.agentItem.task { cursor: default; }
.agentItem.task .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.taskForm { display: flex; align-items: flex-end; gap: 6px; margin-bottom: 10px; padding: 4px 4px 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.taskForm:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.taskForm textarea { flex: 1; min-width: 0; border: 0; outline: 0; background: none; resize: none; font: inherit; font-size: 13px; color: var(--ink); padding: 5px 0; field-sizing: content; max-height: 140px; }
.agentItem .main2 { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.agentItem .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agentItem .s { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agentItem .iconBtn { opacity: 0; }
.agentItem:hover .iconBtn, .agentItem .iconBtn:focus-visible { opacity: 1; }
/* How long it's been queued: in the ✕'s place, which shows on hover instead. */
/* Both in one spot, so swapping them doesn't move anything. */
.agentItem .end { flex: none; display: grid; place-items: center end; }
.agentItem .end > * { grid-area: 1 / 1; }
.agentItem .age { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; transition: opacity .1s; }
.agentItem:hover .age, .agentItem:focus-within .age { opacity: 0; pointer-events: none; }
/* Faded, the time is painted above the ✕: the ✕ goes on top so it gets the click. */
.agentItem .end .iconBtn { position: relative; z-index: 1; }
.agentList .empty { padding: 24px 12px; }
.agentList .empty svg.inl { width: 14px; height: 14px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; }
.agentAll { display: block; margin: 10px auto 0; }
.agentFoot { padding: 12px 14px 14px; border-top: 1px solid var(--line); }
.agentFoot .btn { width: 100%; justify-content: center; padding: 8px 12px; }
.agentFoot .btn[disabled] { opacity: .45; pointer-events: none; }
.agentFoot .btn + .btn { margin-top: 8px; }
/* The orb by "Process with agent" (and in the empty queue): it's waiting for something to do. */
.agentFoot .btn.primary { display: flex; align-items: center; gap: 8px; }
.agentFoot .btn.primary .ctaOrb { width: 18px; height: 18px; color: var(--accent-ink); }
.agentList .empty .emptyOrb { display: block; width: 56px; height: 56px; margin: 0 auto 14px; color: var(--accent); }
/* Working: the button stays readable (not faded like a disabled one), with a waiting orb. */
/* Ready to process: no fill, the beam's ring and glow (as on the Agent button) and the accent text. */
.agentFoot .btn.primary.beam { background: var(--panel); color: var(--accent); }
.agentFoot .btn.primary.beam:hover { filter: none; background: color-mix(in srgb, var(--accent) 6%, var(--panel)); }
/* Copy for your agent: a quiet ghost button under it. */
.agentFoot .btn.ghost { background: none; border-color: transparent; color: var(--ink-2); font-weight: 600; }
.agentFoot .btn.ghost:hover { background: var(--hover); color: var(--ink); }
.agentFoot .btn.running { opacity: 1; display: flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.agentFoot .btn.running .ctaOrb { width: 18px; height: 18px; color: var(--accent); }
.agentFoot p { margin: 8px 0 0; font-size: 12px; color: var(--ink-2); }
/* The robot on comments and questions: outline, filled in the accent when queued. */
.queueIco { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--ink-3); padding: 0; }
.queueIco svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
button.queueIco:hover { background: var(--hover); color: var(--accent); }
.queueIco.on { color: var(--accent-ink); background: var(--accent); }
button.queueIco.on:hover { background: var(--accent); color: var(--accent-ink); opacity: .85; }
.queueIco.busy { background: var(--progress-soft); color: var(--progress); }
.queueIco.off { opacity: .35; cursor: not-allowed; }
/* A row's actions: send to the agent (robot) and resolve (✓), always there, quiet until hovered. */
.rowIco { display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border: 0; border-radius: 6px; background: none; color: var(--ink-3); padding: 0; }
.rowIco svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.rowIco.done:hover { background: var(--done-soft); color: var(--done); }
@media (max-width: 819px) { .agentSide { top: 8px; right: 8px; bottom: 8px; max-width: calc(100% - 16px); } .agentToggle .lbl { display: none; } }

/* ---------- the open comment: conversation first ---------- */
.card.open { padding: 0; cursor: default; }
.list .card.open { padding: 0; }
.card.open .hd { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 12px; background: var(--panel); border-radius: 12px 12px 0 0; border-bottom: 1px solid var(--line); }
.card.open .hd > b { font-size: 13px; margin-right: 2px; }
.card.open .grow { flex: 1; }
.card.open .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--hover); color: var(--ink-2); white-space: nowrap; }
.card.open .chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.card.open .chip.queued { color: var(--queued); background: var(--queued-soft); }
.card.open .chip.in_progress { color: var(--progress); background: var(--progress-soft); }
.card.open .chip.review { color: var(--accent); background: var(--accent-soft); }
.card.open .chip.resolved { color: var(--done); background: var(--done-soft); }
.card.open .icon { border: 0; background: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); padding: 0; }
.card.open .icon:hover { background: var(--hover); color: var(--ink); }
.card.open .icon svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.card.open .icon.done { color: var(--done); }
.card.open .quiet { border: 0; background: none; color: var(--ink-2); font-size: 13px; font-weight: 600; padding: 4px 8px; border-radius: 6px; }
.card.open .quiet:hover { background: var(--hover); color: var(--ink); }
.card.open .moreWrap { position: relative; }
.card.open .moreMenu { position: absolute; right: 0; top: 32px; z-index: 3; min-width: 190px; padding: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-menu); display: none; }
.card.open .moreWrap.open .moreMenu { display: block; }
.card.open .moreMenu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 7px; font-size: 13px; font-weight: 500; }
.card.open .moreMenu button:hover { background: var(--hover); }
.card.open .moreMenu .danger { color: var(--danger); }
.card.open .msgs { padding: 2px 14px 4px; display: flex; flex-direction: column; gap: 14px; }
.card.open .msg { display: grid; grid-template-columns: 24px 1fr; gap: 0 9px; }
.card.open .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.card.open .msg .top { display: flex; align-items: baseline; gap: 6px; font-size: 13px; min-width: 0; }
.card.open .msg .who { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card.open .msg .t { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.card.open .msgMore { position: relative; margin-left: auto; align-self: center; }
.card.open .msgDots { width: 24px; height: 22px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 6px; background: none; color: var(--ink-3); cursor: pointer; opacity: 0; transition: opacity .12s; }
.card.open .msgDots svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.card.open .msg:hover .msgDots, .card.open .msgMore.open .msgDots, .card.open .msgDots:focus-visible { opacity: 1; }
.card.open .msgDots:hover, .card.open .msgMore.open .msgDots { background: var(--hover); color: var(--ink); }
@media (hover: none) { .card.open .msgDots { opacity: .8; } }
.card.open .msgMenu { position: absolute; right: 0; top: 26px; z-index: 5; min-width: 130px; padding: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-menu); display: none; }
.card.open .msgMore.open .msgMenu { display: block; }
.card.open .msgMenu button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 500; color: var(--ink); cursor: pointer; }
.card.open .msgMenu button:hover { background: var(--hover); }
.card.open .msgMenu .danger { color: var(--danger); }
.card.open .msg .body.editing { display: grid; gap: 6px; margin-top: 4px; }
.card.open .msg .body.editing textarea { width: 100%; min-height: 40px; max-height: 200px; resize: none; field-sizing: content; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; color: var(--ink); background: var(--panel); }
.card.open .msg .body.editing textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.card.open .editActs { display: flex; align-items: center; gap: 6px; }
.card.open .editActs .hint { margin-right: auto; color: var(--ink-3); font-size: 12px; }
@media (hover: none) { .card.open .editActs .hint { visibility: hidden; } }
.card.open .mark { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.card.open .mark.agent { color: var(--agent); }
.card.open .msg .body { grid-column: 2; margin-top: 1px; overflow-wrap: anywhere; }
.card.open .msg.agent .body { color: var(--ink); }
.card.open .shot { margin-left: 33px; margin-top: -6px; width: fit-content; max-width: calc(100% - 33px); }
.card.open .shot img { height: 56px; width: auto; max-width: 100%; max-height: none; }
.card.open .ev { font-size: 12px; color: var(--ink-3); padding-left: 33px; margin-top: -6px; }
.card.open .whereNote { margin: 10px 14px 0; font-size: 13px; color: var(--ink-2); }
.card.open .checkStrip { margin: 10px 12px 0; padding: 9px 11px; border-radius: 8px; background: var(--accent-soft); font-size: 13px; display: flex; flex-direction: column; gap: 8px; }
.card.open .checkStrip.gone { background: var(--queued-soft); }
.card.open .checkStrip.wait { background: var(--hover); color: var(--ink-2); }
.card.open .checkStrip .acts { display: flex; gap: 6px; }
.card.open .foot { padding: 12px; display: flex; align-items: flex-end; gap: 8px; }
.card.open .send { position: relative; flex: 1; min-width: 0; }
.card.open .queueBtn { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink-2); display: grid; place-items: center; padding: 0; }
.card.open .queueBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.card.open .queueBtn:hover { border-color: var(--accent); color: var(--accent); }
.card.open .queueBtn.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.card.open .queueBtn.on:hover { opacity: .9; color: var(--accent-ink); }
.card.open .send textarea { display: block; width: 100%; min-height: 40px; max-height: 160px; resize: none; border: 1px solid var(--line); border-radius: 10px; padding: 9px 70px 9px 11px; font: inherit; color: var(--ink); background: var(--panel); field-sizing: content; }
.card.open .send textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.card.open .send .go { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; padding: 0; }
.card.open .send .go svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

.list .card.open { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); }


/* ---------- comment settings: the ▾ next to the toolbar's Agent button ---------- */
.agentMenu { position: absolute; right: 0; bottom: calc(100% + 8px); width: 300px; padding: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-menu); z-index: 7; }
.agentMenu[hidden] { display: none; }
.tools.below .agentMenu { bottom: auto; top: calc(100% + 8px); }
.amHead { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 4px 8px; }
.amHead b { font-size: 13px; }
.amRow { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px; border-radius: 8px; color: var(--ink); }
.amRow:hover { background: var(--hover); }
.amRow:disabled { opacity: .5; cursor: not-allowed; }
.amRow b { display: block; font-size: 13px; font-weight: 600; }
.amRow small { display: block; font-size: 12px; color: var(--ink-2); margin-top: 1px; }
.amRow .sw { flex: none; position: relative; width: 30px; height: 17px; margin-top: 1px; border-radius: 999px; background: var(--line); transition: background .15s; }
.amRow .sw::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / .2); transition: transform .15s; }
.amRow[aria-checked="true"] .sw { background: var(--accent); }
.amRow[aria-checked="true"] .sw::after { transform: translateX(13px); }

/* The queue control on an open comment: the robot with a word, outline → filled. */
.queuePill { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); border-radius: 999px; padding: 3px 10px 3px 8px; font-size: 12px; font-weight: 600; margin-right: 2px; white-space: nowrap; }
.queuePill svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
button.queuePill:hover { border-color: var(--accent); color: var(--accent); }
.queuePill.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
button.queuePill.on:hover { color: var(--accent-ink); opacity: .9; }
.queuePill.busy { background: var(--progress-soft); border-color: transparent; color: var(--progress); }

/* Checking a new version in place: what changed, and how it looked before. */
.changedTag { font-size: 11px; font-weight: 600; border-radius: 999px; padding: 1px 7px; background: var(--queued-soft); color: var(--queued); }
.card.open .beforeCap { margin: -4px 0 -8px 33px; font-size: 12px; color: var(--ink-2); }
.card.open .beforeCap b { color: var(--ink); }
.card.open .checkStrip .acts { flex-wrap: wrap; }

/* The status steps between the messages: what happened, who, when. */
.card.open .step { margin: -6px 0 0 33px; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.card.open .step i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; background: var(--ink-3); }
.card.open .step.q i { background: var(--accent); }
.card.open .step.f i { background: var(--done); }
.card.open .step.o i { background: var(--queued); }
.card.open .step b { color: var(--ink); font-weight: 600; }

/* The bar above the reply box: where the comment stands and what to do next. */
.card.open .statusBar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 12px 0; padding: 9px 11px; border-radius: 8px; background: var(--accent-soft); font-size: 13px; color: var(--ink); }
.card.open .statusBar.fix { background: var(--done-soft); }
.card.open .statusBar.open { background: var(--queued-soft); }
.card.open .statusBar.wait, .card.open .statusBar.done { background: var(--hover); color: var(--ink-2); }
.card.open .statusBar b { font-weight: 600; color: var(--ink); }
.card.open .statusBar .grow { flex: 1; }
.card.open .statusBar .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.card.open .statusBar .btn { display: inline-flex; align-items: center; gap: 5px; }
.card.open .statusBar .btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.card.open .statusBar .quiet { padding: 2px 6px; }


/* A card flying into the Agent button when it's queued (flyToAgent). */
/* !important: the copy keeps its classes (a card is position: relative), and must never take room in the page. */
.flyGhost { position: fixed !important; z-index: 1000; margin: 0 !important; pointer-events: none; transform-origin: center; border-radius: 12px; overflow: hidden; background: var(--panel); box-shadow: 0 12px 32px rgb(0 0 0 / .22); will-change: transform, opacity; }

/* ---------- Activity: comments, clarify and tasks in one panel ---------- */
/* A large title on top, the tab bar at the bottom: as tall as the toolbar and on its bottom edge. */
.side .sideTitle { border-bottom: 0; padding: 10px 8px 4px 18px; }
.side .actTitle { font-size: 20px; font-weight: 700; letter-spacing: -.015em; }
.side #sideMin svg { width: 16px; height: 16px; }
.side .cFilter svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.side .cFilter:hover { background: var(--hover); color: var(--ink); }
.side .cFilter.on { color: var(--accent); background: var(--accent-soft); }
.side .cFilter[hidden] { display: none; }
.actPane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.actPane[hidden] { display: none; }
.actPane > .list { flex: 1; min-height: 0; overflow: auto; }
.actFoot { padding: 8px 12px; border-top: 1px solid var(--line); }
.actFoot .taskForm { margin: 0; }
.actTabs { flex: none; display: flex; height: var(--toolbar-h, 46px); border-top: 1px solid var(--line); padding: 0 6px; }
.actTabs button { flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; padding: 0; font-size: 10px; font-weight: 600; color: var(--ink-3); }
.actTabs button[hidden] { display: none; }
.actTabs button:hover { color: var(--ink-2); }
.actTabs button.on { color: var(--accent); }
.actTabs svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.need { display: inline-grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--badge); color: var(--accent-ink); font-size: 10px; font-weight: 700; font-style: normal; line-height: 1; }
.need[hidden] { display: none; }
/* Open items, none of them waiting on you: a quiet count instead of the red one. */
/* A teammate on a project whose clickroom runs on someone else's computer: no Agent (see runsHere). */
body.notLinked #agentToggle, body.notLinked #agentSide { display: none !important; }
.need.calm, #actNeed.calm { background: var(--ink-3); color: var(--panel); }
.actTabs .need { position: absolute; top: 4px; left: calc(50% + 5px); box-shadow: 0 0 0 2px var(--panel); }
.actToggle { position: relative; }
.actToggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.actToggle .need { position: absolute; top: -6px; right: -6px; box-shadow: 0 0 0 2px var(--panel); }
/* Comments in sections: To check, This page, Other pages, Resolved (folded). */
/* Section headers, the same in Comments and Clarify: in line with the cards' text. */
.list .sec, .cqSec { display: flex; align-items: center; gap: 4px; width: 100%; border: 0; background: none; padding: 10px 6px 4px; font-size: 12px; font-weight: 600; color: var(--ink-3); text-align: left; }
.list .sec .n, .cqSec .n { font-weight: 500; margin-left: 2px; }
/* Clarify inside the panel: its list, or one item at a time. */
.side .qSheet { display: block; position: static; flex: 1; min-height: 0; width: auto; max-height: none; overflow: auto; padding: 4px 12px 12px; border: 0; border-radius: 0; box-shadow: none; background: none; }
/* The card at the panel's width: keyboard hints off (the shortcuts still work), nothing wraps in the top row. */
.side .qSheet .kbd { display: none; }
/* Clarify: Open / Resolved, then a card per question (the number with the faces, who and when, the
   question, how many replies); a question opens as a conversation, like an open comment. */
.cqTabs { display: flex; align-items: center; gap: 14px; margin: 0 0 4px; padding: 0 6px 0 5px; box-shadow: inset 0 -1px 0 var(--line); }
.cqTabs [role="tab"] { border: 0; background: none; padding: 8px 0 7px; font-size: 13px; font-weight: 600; color: var(--ink-3); box-shadow: inset 0 -2px 0 transparent; }
.cqTabs [role="tab"][aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.cqTabs .n { font-weight: 500; margin-left: 4px; }
.cqTabs .cqSpark { margin-left: auto; color: var(--accent); }
.cqTabs .cqSpark + .cqPlus { margin-left: 0; }
.cqTabs .cqSpark svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linejoin: round; stroke-linecap: round; }
.cqTabs .cqPlus { margin-left: auto; color: var(--accent); }
.cqTabs .cqPlus.on { background: var(--accent-soft); }
.cqTabs .cqPlus svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; }
.cqAsk { margin: 8px 0 4px; border: 0 !important; box-shadow: none !important; background: none !important; }
.cqAsk .foot { padding: 0 !important; }
.cqSec .hint { font-weight: 500; margin-left: 2px; }
.cqSec .link { margin-left: auto; font-size: 12px; }
/* Empty: one style in every pane. */
.cqEmpty, .side .empty { padding: 40px 20px; text-align: center; color: var(--ink-2); }
.cq { position: relative; margin: 2px -6px; padding: 10px 12px 12px; border: 1px solid transparent; border-radius: 12px; cursor: pointer; }
.cq:hover { background: var(--hover); }
.cq .top { display: flex; align-items: center; min-height: 30px; }
.cq .num { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--ink); color: var(--panel); font-size: 12px; font-weight: 700; }
.cq .avs { display: flex; }
.cq .avs .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); font-size: 10px; font-weight: 700; box-shadow: 0 0 0 2px var(--panel); }
/* A photo fills its circle, wherever an avatar is. */
.av.pic { overflow: hidden; }
.av.pic img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* The agent's face: the logo on a light circle. */
.av.agentAv { background: var(--hover) !important; overflow: hidden; }
.av.agentAv img { width: 68%; height: auto; display: block; }
.cq:hover .avs .av { box-shadow: 0 0 0 2px var(--hover); }
.cq .avs .av + .av { margin-left: -6px; }
/* Hovering a card: its actions sit on a white bar, as a comment row's do. */
.cq .acts { margin: 0 -4px 0 auto; display: flex; gap: 2px; padding: 3px; border-radius: 10px; transition: background .12s, box-shadow .12s; }
.cq:hover .acts { background: var(--panel); box-shadow: 0 1px 2px rgb(0 0 0 / .08), 0 2px 10px rgb(0 0 0 / .1); }
.cq .acts button { width: 30px; height: 28px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); display: grid; place-items: center; padding: 0; }
.cq .acts button:hover { background: var(--hover); color: var(--ink); }
.cq .acts button[data-q="resolve"]:hover { color: var(--done); }
.cq .acts button[data-q="delete"]:hover, .cq .acts button.sure { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.cq .acts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cq .by { margin-top: 8px; font-size: 13px; color: var(--ink); }
.cq .by span { color: var(--ink-3); }
.cq .by .dr { font-style: normal; color: var(--accent); font-weight: 600; }
/* Unread, quietly: a small dot after when. */
.cq .nd { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: var(--accent); vertical-align: 1px; }
.cq .tx { font-size: 14px; line-height: 1.45; color: var(--ink); overflow-wrap: anywhere; }
.cq .tx b { font-weight: 600; }
.cq .rc { display: flex; gap: 10px; margin-top: 6px; font-size: 13px; color: var(--accent); }
.cq .rc .pg, .cq .rc .end, .cq .rc .tabchip, .cq .rc .detached { color: var(--ink-3); }
/* Made while watching a walkthrough: how far into it (share.js momentChip). */
.cq .rc .recAt { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.cq .rc .recAt svg { width: 10px; height: 10px; fill: currentColor; stroke: none; }
/* Comments as the same cards: the number keeps its pin, in the author's colour. */
.cq .thumb { margin-top: 2px; }
.cq .num.pin { border-radius: 50% 50% 50% 2px; color: var(--accent-ink); }
.cq.cmt .cardHead { gap: 0; }
.cq.cmt .by b { font-weight: 600; }
/* A task's number: a rounded square (a question's is a circle, a comment's a pin). */
.cq .num.tk { border-radius: 6px; }
.cq.task .tx { white-space: pre-wrap; }
.cq.cmt .by { display: flex; align-items: baseline; gap: 6px; }
.cq.cmt .by .badge { align-self: center; }
.cq .preview { margin: 0; -webkit-line-clamp: 3; }
.cq .top > .badge { margin-left: auto; }
.cq .acts .queueIco, .cq .acts .rowIco { width: 30px; height: 28px; border-radius: 8px; }
.cq .acts .queueIco.on { background: var(--accent); color: var(--accent-ink); }
.cq .acts .rowIco.done:hover { background: var(--hover); color: var(--done); }
/* The same inset in every pane: tabs, sections and cards line up across Comments, Clarify and Tasks. */
.side .actPane > .list { padding: 4px 12px 12px; }
/* The title in a question: ‹ Clarify, its number, n of m and ‹ ›. */
.side .actTitle.cqNav { flex: 1; display: flex; align-items: center; gap: 2px; min-width: 0; font-size: 13px; font-weight: 500; letter-spacing: 0; }
.cqNav .cqBack { display: inline-flex; align-items: center; border: 0; background: none; padding: 4px 6px 4px 0; border-radius: 8px; color: var(--accent); font-size: 15px; font-weight: 600; }
.cqNav .cqBack svg, .cqNav .iconBtn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.cqNav .cqPos { margin-left: auto; margin-right: 2px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.cqNav .iconBtn[disabled] { opacity: .3; }
/* The question, open. */
.side .qSheet.detail { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.cqScroll { flex: 1; min-height: 0; overflow: auto; padding: 8px 18px 12px; }
.cqHead { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.cqHead .av { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.cqHead .num { flex: none; display: grid; place-items: center; width: 24px; height: 24px; margin-right: -1px; border-radius: 50%; background: var(--ink); color: var(--panel); font-size: 12px; font-weight: 700; }
.cqHead .who { font-weight: 600; }
.cqHead .t { font-size: 12px; color: var(--ink-3); }
.cqTag { font-size: 11px; font-weight: 600; color: var(--accent); }
.cqCorner { margin-left: auto; color: var(--ink-3); }
.cqCorner + .cqCorner { margin-left: 2px; }
.cqCorner svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.cqCorner.ok:hover { color: var(--done); background: var(--done-soft); }
.cqCorner.del:hover, .cqCorner.sure { color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
button.quiet.cqCorner { border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--accent); }
.cqText { margin: 8px 0 12px; font-size: 17px; line-height: 1.4; font-weight: 500; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cqText b { font-weight: 600; }
.cqText.editable { cursor: text; transition: opacity .12s; }
.cqText.editable:hover { opacity: .72; }
.cqNow { display: flex; gap: 8px; padding: 10px 0 0; border-top: 1px solid var(--line); font-size: 13px; }
.cqNow b { flex: none; font-weight: 600; }
.cqNow span { color: var(--ink-2); }
.cqThread { margin-top: 10px; padding: 12px 0 0 !important; border: 0 !important; border-top: 1px solid var(--line) !important; border-radius: 0 !important; box-shadow: none !important; background: none !important; cursor: default; }
.cqNow + .cqThread { border-top: 0 !important; padding-top: 4px !important; }
.cqThread .msgs { padding: 0 !important; }
.cqThread .msg .body { white-space: pre-wrap; }
.cqNote { margin-top: 14px; font-size: 13px; color: var(--ink-3); }
.cqEditor { display: flex; flex-direction: column; gap: 8px; margin: 8px 0 4px; }
.cqEditor textarea, .cqEditor input { width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; resize: vertical; }
.cqEditor textarea:focus, .cqEditor input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.cqEditor label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.cqEditor label span { font-weight: 500; color: var(--ink-3); }
.cqEditor .row { display: flex; justify-content: flex-end; gap: 6px; }
.cqActs { flex: none; display: grid; gap: 6px; padding: 10px 12px 12px; border-top: 1px solid var(--line); }
.cqActs .btn { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px 12px; font-size: 13px; }
.cqActs .btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.cqField { padding: 0 !important; border: 0 !important; box-shadow: none !important; background: none !important; }
.cqField .foot { padding: 0 !important; }
.cqActs .btn + .cqField { margin-top: 4px; }
/* Queued comments hidden from the list (experiment): one row that opens the Agent queue. */
.withAgent { display: flex; align-items: center; gap: 8px; width: calc(100% - 4px); margin: 10px 2px 4px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 10px; background: none; color: var(--ink-2); font-size: 13px; font-weight: 600; text-align: left; }
button.withAgent:hover { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.withAgent svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.withAgent span { flex: 1; }
.withAgent .chev { width: 14px; height: 14px; color: var(--placeholder); }
.flyNote { padding: 10px 12px; color: var(--ink); font-size: 14px; }
.flyNote .h { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.flyNote .av { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: var(--accent-ink); font-size: 10px; font-weight: 700; }
.flyNote .av img { width: 100%; height: 100%; object-fit: cover; }
.flyNote p { margin: 0; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }

/* Beam (after libraries.dev/beam: pulse-outside, colorful): while the agent queue has items, a
   rainbow ring rides the Agent button's edge and a soft glow pulses around the outside of it; the
   Agent panel's Process with agent has the same, as they go together. */
@property --beam-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
.agentToggle.beam, .beamCta.beam { position: relative; isolation: isolate; border-color: transparent; }
.agentToggle.beam::before, .beamCta.beam::before, .agentToggle.beam::after, .beamCta.beam::after {
  content: ''; position: absolute; pointer-events: none;
  background: conic-gradient(from var(--beam-a), #ff5f6d, #ffc371, #f9f871, #47e891, #3fb8ff, #7c6cff, #f15bb5, #ff5f6d);
  animation: beamSpin 3.2s linear infinite;
}
/* The ring: the gradient shows only in a 1.5px band along the edge. */
.agentToggle.beam::before, .beamCta.beam::before {
  inset: 0; border-radius: inherit; padding: 1px; z-index: 1;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
/* The glow: a blurred band just outside the edge (the button itself stays clear), breathing out and in. */
.agentToggle.beam::after, .beamCta.beam::after {
  inset: -4px; border-radius: 12px; padding: 4px; z-index: -1; filter: blur(3px);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: beamSpin 3.2s linear infinite, beamPulse 2.4s ease-in-out infinite;
}
.agentToggle.beam > *, .beamCta.beam > * { position: relative; z-index: 2; }
@keyframes beamSpin { to { --beam-a: 360deg; } }
/* Opacity only: scaling it opened a gap at the ends of a wide button (2% of 330px is 3px a side). */
@keyframes beamPulse { 0%, 100% { opacity: .15; } 50% { opacity: .45; } }
/* Less motion: the ring and a steady glow, nothing moving. */
@media (prefers-reduced-motion: reduce) { .agentToggle.beam::before, .beamCta.beam::before, .agentToggle.beam::after, .beamCta.beam::after { animation: none; } .agentToggle.beam::after, .beamCta.beam::after { opacity: .3; } }

/* Clarify, empty: Claude finds what it can't know, in the background. */
.gapsEmpty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 36px 14px 20px; color: var(--ink-2); }
.gapsEmpty .ic { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 4px; }
.gapsEmpty svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.gapsEmpty b { color: var(--ink); font-size: 15px; }
.gapsEmpty p { margin: 0; font-size: 13px; line-height: 1.45; }
.gapsEmpty .btn { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 8px 14px; font-size: 13px; }
.gapsEmpty .btn svg { width: 15px; height: 15px; }
.gapsEmpty .hint { font-size: 13px; color: var(--ink-3); max-width: 290px; }
.gapsEmpty .link { font-size: 13px; }
.gapsEmpty .or { margin-top: 10px; font-size: 12px; color: var(--ink-3); }
.gapsEmpty code, .gapsCard code { font: 12px var(--mono); background: var(--hover); padding: 0 4px; border-radius: 4px; }
/* When it's done (or failed, or there's no terminal): a card above the list. */
.gapsCard { display: flex; align-items: center; gap: 8px; margin: 8px 0 6px; padding: 10px 10px 10px 12px; border-radius: 10px; background: var(--hover); font-size: 13px; color: var(--ink-2); }
.gapsCard > span { flex: 1; min-width: 0; }
.gapsCard b { color: var(--ink); font-weight: 600; }
.gapsCard.ok { background: var(--done-soft); }
.gapsCard .iconBtn svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
/* The Agent queue being processed: the same card at the top of the list, with a shimmering bar. */
.agentList .gapsCard { margin: 6px 4px 8px; flex-wrap: wrap; }
.gapsCard.bad { background: color-mix(in srgb, var(--danger) 9%, var(--panel)); }
.agentFoot p .link { font-size: inherit; }

/* Claude looking for gaps: a skeleton card where the next draft comes, and each draft animating in. */
.cq.skel { cursor: default; }
.cq.skel:hover { background: none; }
.cq.skel .num { background: var(--hover); }
.cq.skel .bar { display: block; height: 10px; margin: 6px 0; border-radius: 999px; background: linear-gradient(90deg, var(--hover) 25%, color-mix(in srgb, var(--hover) 40%, var(--panel)) 50%, var(--hover) 75%); background-size: 200% 100%; animation: skel 1.3s ease-in-out infinite; }
.cq.skel .by .bar { height: 9px; margin: 2px 0 8px; }
.cq.skel .note { margin-top: 8px; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.cq.skel .note .link { margin-left: auto; font-size: 13px; color: var(--ink-2); }
.cq.skel .note .link:hover { color: var(--ink); }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.cq.arrive { animation: cqArrive .35s ease-out both; }
.cq.arrive .by, .cq.arrive .tx { animation: cqWrite .7s .12s cubic-bezier(.3, .7, .3, 1) both; }
.cq.arrive .tx { animation-delay: .25s; animation-duration: .9s; }
@keyframes cqArrive { from { opacity: 0; transform: translateY(6px); } }
@keyframes cqWrite { from { clip-path: inset(0 100% 0 0); opacity: .3; } to { clip-path: inset(0 0 0 0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cq.skel .bar, .cq.arrive, .cq.arrive .by, .cq.arrive .tx { animation: none; } }

/* ---------- phones ---------- */
/* The comment box: a sheet at the bottom, above the keyboard (--kb, set from visualViewport). */
.composeSheet { display: none; }
@media (max-width: 819px) {
  body { overscroll-behavior: none; }
  .composeSheet:not([hidden]) { display: block; position: fixed; left: 0; right: 0; bottom: var(--kb, 0px); z-index: 15; padding: 0 14px calc(12px + env(safe-area-inset-bottom)); background: var(--panel); color: var(--ink); border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgb(0 0 0 / .16); animation: sheetUp .22s cubic-bezier(.2, .8, .3, 1); }
  .composeSheet .composer { position: static; width: auto; }
  .composeSheet .ch { display: flex; margin-bottom: 6px; }
  .composeSheet .ch .av { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: var(--accent-ink); font-size: 11px; font-weight: 700; overflow: hidden; flex: none; }
  .composeSheet .ch .av img { width: 100%; height: 100%; object-fit: cover; }
  .composeSheet .ch .x { margin-left: auto; width: 36px; height: 36px; border: 0; border-radius: 999px; background: var(--hover); display: grid; place-items: center; color: var(--ink-2); padding: 0; }
  .composeSheet .ch .x svg { width: 16px; height: 16px; stroke-width: 2.2; }
  .composeSheet textarea { display: block; width: 100%; min-height: 84px; max-height: 32dvh; resize: none; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 16px/1.4 var(--font); color: var(--ink); background: var(--bg); }
  .composeSheet textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
  .composeSheet .cr { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
  .composeSheet .cr { flex-wrap: wrap; }
  .composeSheet .cr .grow { display: none; }
  .composeSheet .cr button { flex: 1; justify-content: center; }
  .composeSheet .cr button { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--ink); font: 600 15px var(--font); white-space: nowrap; }
  .composeSheet .cr button svg { width: 16px; height: 16px; stroke-width: 2; }
  .composeSheet .cr .post { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
  .composeSheet .cr .soft { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
  .composeSheet .cr button:disabled { opacity: .6; }
  .composeSheet .askField.on textarea { padding-bottom: 50px; }
  .composeSheet .askRow { background: var(--bg); }
  .composeSheet .askChip { height: 32px; }
  .composeSheet .askField .askChip .askCount { height: 32px; padding: 0 2px 0 10px; font-size: 13px; }
  .composeSheet .askField .askChip .askOff { width: 28px; height: 28px; }
  /* While writing, nothing else floats over the sheet. */
  body.composing .qInvite, body.composing .toast:not(.show) { display: none; }
  body.composing .threadPop { display: none; }

  /* iOS zooms into any field under 16px: every field on a phone is 16px. */
  textarea, input, select { font-size: 16px !important; }

  /* The clarify nudge waits while a comment or a panel is open. */
  body:has(#threadPop:not([hidden])) .qInvite, body:not(.sideMin) .qInvite, body.agentOpen .qInvite { display: none; }
}
@keyframes sheetUp { from { transform: translateY(100%); } }
@media (prefers-reduced-motion: reduce) { .composeSheet { animation: none !important; } }

/* ---------- phones: an app shell ---------- */
/* A bar at the top (page, version, who's here), the prototype, a tab bar at the bottom; panels,
   menus, comments and the comment box are sheets from the bottom (share.js: layoutForScreen,
   dragSheet). */
.mTop, .scrim, .grab, .clarifyTab { display: none; }
.meAv .meFace { display: contents; }
body.team .client-only { display: none !important; }
@media (max-width: 819px) {
  .main { flex-direction: column; }
  .mTop { display: flex; order: 0; flex: none; align-items: center; gap: 2px; min-width: 0; height: calc(48px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left)); background: var(--panel); border-bottom: 1px solid var(--line); z-index: 7; }
  .mTop .homeLink { padding: 6px; flex: none; }
  .mTop .projBtn { min-width: 0; flex: 0 1 auto; padding: 8px 6px; }
  .mTop .projBtn strong { display: block; max-width: none; font-size: 16px; }
  .mTop .verBtn { flex: none; padding: 8px 6px; }
  .mTop .pushPill { flex: none; padding: 4px 9px; }
  .mTop .presence { display: flex; margin-left: auto; padding: 0 4px 0 10px; flex: none; }
  .mTop .presence:empty { display: none; }
  /* Share: an icon at the right end (after who's here, when anyone is). */
  .mTop #shareBtn { flex: none; margin-left: auto; padding: 8px; border-color: transparent; background: none; }
  .mTop .presence:not(:empty) + #shareBtn { margin-left: 0; }
  .mTop #shareBtn .lbl { display: none; }
  .mTop .avatar { width: 28px; height: 28px; }
  .stage { order: 1; flex: 1; min-height: 0; }

  /* The tab bar: Browse · Activity · Comment · Agent (team) or Clarify (clients) · You. */
  #tools { order: 2; position: relative; left: auto !important; top: auto !important; bottom: auto; transform: none; flex: none; max-width: none; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; padding-bottom: env(safe-area-inset-bottom); z-index: 8; }
  .toolRow { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; align-items: stretch; height: 56px; gap: 0; padding: 0 max(4px, env(safe-area-inset-left)); white-space: normal; }
  .tools .grip, .tools .divider, .tools #vpBtn, .tools .presence { display: none !important; }
  #modeSeg { display: contents; }
  #modeSeg button[data-mode="browse"] { order: 1; }
  #sideToggle { order: 2; }
  #modeSeg button[data-mode="comment"] { order: 3; }
  #agentToggle, #clarifyTab { order: 4; }
  #meChip { order: 5; }
  .clarifyTab { display: flex; }
  /* Every tab: an icon over a word, the accent when it's the one open. */
  .tools .toolRow > button, #modeSeg button { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; padding: 4px 0 2px; border: 0; border-radius: 0; background: none !important; box-shadow: none; color: var(--ink-2); font: 600 10px/1.1 var(--font); }
  .tools .toolRow > button svg, #modeSeg button svg { width: 24px; height: 24px; stroke-width: 1.8; }
  #modeSeg button::after { content: attr(data-label); }
  .tools .lbl { display: block !important; font: inherit; }
  .tools .toolRow > button.on, #modeSeg button[data-mode="browse"].on { color: var(--accent); }
  /* Comment: the big round button in the middle, filled while commenting. */
  #modeSeg button[data-mode="comment"] svg { width: 50px; height: 50px; margin-top: -20px; padding: 13px; border-radius: 50%; background: var(--panel); color: var(--accent); border: 1.5px solid var(--line); box-shadow: 0 4px 14px rgb(0 0 0 / .14); stroke-width: 2; }
  #modeSeg button[data-mode="comment"].on { color: var(--accent); }
  #modeSeg button[data-mode="comment"].on svg { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  /* You: your avatar, a little smaller than an icon, with its word below. */
  #meChip { width: auto; height: auto; box-shadow: none; overflow: visible; }
  #meChip { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-2); background: none !important; }
  #meChip .meFace img { width: 100%; height: 100%; object-fit: cover; }
  #meChip::after { content: attr(data-label); font: 600 10px/1.1 var(--font); }
  #meChip .meFace { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; color: var(--accent-ink); font-size: 10px; font-weight: 700; box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px var(--line); }
  #meChip.down .meFace { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--danger); }
  /* Counts sit on the icon's corner. */
  #agentBadge, #actNeed, #clarifyNeed { position: absolute; top: 4px; left: calc(50% + 6px); right: auto; box-shadow: none; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--badge); color: var(--accent-ink); font: 700 10px/17px var(--font); text-align: center; }
  #agentBadge { background: var(--accent); }
  #agentBadge[hidden], #actNeed[hidden], #clarifyNeed[hidden] { display: none; }
  .agentToggle.beam::before, .agentToggle.beam::after { display: none; }

  /* Sheets. */
  .grab { display: block; flex: none; height: 22px; touch-action: none; cursor: grab; }
  .grab::before { content: ''; display: block; width: 38px; height: 5px; margin: 9px auto 0; border-radius: 999px; background: var(--line); }
  .sideTitle, .agentTitle, .threadPop .popHead, .amHead { touch-action: none; }
  .side, .agentSide { position: fixed; z-index: 12; left: 0 !important; right: 0; top: auto !important; bottom: var(--kb, 0px); width: auto !important; max-width: none; max-height: none !important; height: min(58dvh, calc(100dvh - var(--kb, 0px) - env(safe-area-inset-top) - 10px)); padding-bottom: env(safe-area-inset-bottom); border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgb(0 0 0 / .18); animation: sheetUp .26s cubic-bezier(.2, .8, .3, 1); transition: height .22s cubic-bezier(.2, .8, .3, 1); }
  .side.full, .agentSide.full { height: calc(100dvh - var(--kb, 0px) - env(safe-area-inset-top) - 10px); }
  .side.dragging, .agentSide.dragging, .threadPop.dragging, .menu.dragging, .composeSheet.dragging, .agentMenu.dragging { transition: none; animation: none; }
  .sideTitle { cursor: default; padding-top: 0; border-bottom: 0; }
  .agentTitle { padding-top: 0; }
  .actTabs button { min-height: 52px; }
  .threadPop:not([hidden]) { position: fixed; z-index: 12; left: 0 !important; right: 0; top: auto !important; bottom: var(--kb, 0px); width: auto; max-height: min(72dvh, calc(100dvh - var(--kb, 0px) - env(safe-area-inset-top) - 10px)); padding-bottom: env(safe-area-inset-bottom); border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgb(0 0 0 / .18); animation: sheetUp .26s cubic-bezier(.2, .8, .3, 1); }
  .threadPop { touch-action: pan-y; } /* sideways swipes go to the next comment (bindSwipe) */
  .threadPop .grab { position: sticky; top: 0; z-index: 2; background: var(--panel); }
  .threadPop .grab[data-pos] { height: 30px; }
  .threadPop .grab[data-pos]::after { content: attr(data-pos); display: block; margin-top: 4px; text-align: center; font-size: 11px; color: var(--ink-3); }
  .threadPop .popHead { top: 30px; }
  .menu:not([hidden]), .agentMenu:not([hidden]) { position: fixed; z-index: 21; left: 0 !important; right: 0; top: auto !important; bottom: var(--kb, 0px); width: auto; min-width: 0; max-width: none; max-height: min(80dvh, calc(100dvh - var(--kb, 0px) - env(safe-area-inset-top) - 10px)); padding: 0 8px calc(10px + env(safe-area-inset-bottom)); border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgb(0 0 0 / .18); animation: sheetUp .24s cubic-bezier(.2, .8, .3, 1); transform: none; }
  .menu .grab { position: sticky; top: 0; z-index: 2; margin: 0 -8px; background: var(--panel); }
  .menu .item { min-height: 50px; padding: 8px 10px; font-size: 15px; }
  .menu .item .s { font-size: 13px; }
  .menu .verList { max-height: calc(50px * 3.5); } .menu .verPush { min-height: 0; padding: 8px 14px 8px 12px; }
  /* A comment's and a reply's ⋯ menus too, over a scrim: a tap on it lands outside the ⋯ button,
     which closes them (share.js). */
  .card.open .moreWrap.open::before, .card.open .msgMore.open::before { content: ''; position: fixed; inset: 0; z-index: 20; background: rgb(0 0 0 / .32); animation: fadeIn .2s ease; }
  .card.open .moreMenu, .card.open .msgMenu { position: fixed; z-index: 21; left: 0; right: 0; top: auto; bottom: var(--kb, 0px); min-width: 0; padding: 22px 8px calc(10px + env(safe-area-inset-bottom)); border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -10px 30px rgb(0 0 0 / .18); animation: sheetUp .24s cubic-bezier(.2, .8, .3, 1); }
  .card.open .moreMenu::before, .card.open .msgMenu::before { content: ''; position: absolute; top: 9px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 999px; background: var(--line); }
  .card.open .moreMenu button, .card.open .msgMenu button { min-height: 50px; padding: 8px 10px; font-size: 15px; }
  .scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 11; background: rgb(0 0 0 / .32); animation: fadeIn .2s ease; }
  .scrim.top { z-index: 20; }
  /* Larger targets inside sheets. */
  .iconBtn { min-width: 36px; min-height: 36px; }
  .rowIco, .queueIco { width: 36px; height: 36px; }
  .agentItem .iconBtn { opacity: 1; }
  .agentItem .end { display: flex; align-items: center; gap: 4px; }
  .agentItem:hover .age, .agentItem:focus-within .age { opacity: 1; }
  .cqTabs button { min-height: 40px; }

  .hint { top: 10px; }
  /* On a phone the hint covers the page's own header; Browse in the tab bar ends commenting, a hold marks an area. */
  #hint { display: none !important; }
  .hint.touch { display: flex; align-items: center; gap: 8px; padding: 5px 5px 5px 14px; pointer-events: auto; white-space: nowrap; max-width: calc(100vw - 16px); }
  .hint.touch span { overflow: hidden; text-overflow: ellipsis; }
  .hint.touch button { flex: none; min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: rgb(255 255 255 / .16); color: inherit; font-weight: 600; }
  .hint.touch button[aria-pressed="true"] { background: var(--panel); color: var(--ink); }
  body:not(.commenting) .hint.touch { pointer-events: none; }
  .toast { top: calc(56px + env(safe-area-inset-top)); }
  body.commenting .toast { top: calc(104px + env(safe-area-inset-top)); }
  .oldBanner { top: 8px; left: 8px; right: 8px; flex-wrap: wrap; }
  /* The bar spans the top and wraps: ‹ A › and Use stay on one row, the variant's title drops to its
     own full-width line below, so on a phone nothing is truncated or squeezed off the edge. */
  .variantBar { top: 8px; left: 8px; right: 8px; max-width: none; flex-wrap: wrap; row-gap: 4px; }
  .variantBar .vbBack { flex: 0 1 auto; min-width: 0; }
  .variantBar .vbBack span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .variantBar .vbUse { order: 4; margin-left: auto; }
  .vbTitle { order: 5; flex-basis: 100%; max-width: 100%; white-space: normal; padding: 2px 6px 0; }
  body.onVariant .oldBanner { top: 60px; }
}
@keyframes fadeIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .side, .agentSide, .threadPop, .menu, .agentMenu, .scrim, .moreMenu, .msgMenu, .moreWrap::before, .msgMore::before { animation: none !important; transition: none !important; } }

/* ---------- empty Comments: a bit of the toolbar, a cursor picks Comment ---------- */
.cmEmpty { padding: 56px 16px 36px; }
.cmEmpty b { display: block; color: var(--ink); margin-bottom: 4px; }
.cmEmpty p { margin: 0 auto; max-width: 250px; font-size: 13px; line-height: 1.5; }
.cmEmpty p b { display: inline; margin: 0; }
.tbDemo { display: flex; justify-content: center; margin: 0 0 26px; pointer-events: none; }
/* As .tools / .toolRow look. */
.tbBar { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px 5px 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); white-space: nowrap; }
.tbBar .seg button { position: relative; padding: 6px 8px; cursor: default; }
.tbBar .divider { width: 1px; align-self: stretch; margin: 4px 2px; background: var(--line); }
.tbBar .meAv { margin-left: 2px; cursor: default; }
.tbBar .tbB { animation: tbOff 4.5s infinite; }
.tbBar .tbC { animation: tbOn 4.5s infinite; }
.tbCursor { position: absolute; left: 17px; top: 15px; width: 22px !important; height: 22px !important; fill: var(--ink) !important; stroke: var(--panel) !important; stroke-width: 1.6 !important; filter: drop-shadow(0 1px 1.5px rgb(0 0 0 / .25)); animation: tbMove 4.5s infinite; pointer-events: none; }
@keyframes tbMove {
  0% { transform: translate(46px, 26px); opacity: 0; }
  8% { opacity: 1; }
  34% { transform: translate(0, 0) scale(1); }
  38% { transform: translate(0, 0) scale(.82); }
  42%, 82% { transform: translate(0, 0) scale(1); opacity: 1; }
  92%, 100% { transform: translate(0, 0); opacity: 0; }
}
@keyframes tbOn {
  0%, 38% { background: transparent; color: var(--ink-2); }
  40%, 92% { background: var(--accent); color: var(--accent-ink); }
  100% { background: transparent; color: var(--ink-2); }
}
@keyframes tbOff {
  0%, 38% { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
  40%, 92% { background: transparent; color: var(--ink-2); box-shadow: none; }
  100% { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgb(0 0 0 / .12); }
}
/* Empty Backlog: a comment's ⋯ menu, a cursor picks Move to backlog. */
.blMenu { width: 190px; padding: 2px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-menu); text-align: left; }
.blItem { position: relative; display: block; padding: 7px 8px; border-radius: 7px; font-size: 13px; font-weight: 500; color: var(--ink); }
.blItem.danger { color: var(--danger); }
.blItem.blPick { animation: blHover 4.5s infinite; }
.blItem .tbCursor { left: 112px; top: 14px; }
@keyframes blHover {
  0%, 30% { background: transparent; }
  32%, 36% { background: var(--hover); }
  38%, 44% { background: var(--accent-soft); color: var(--accent); }
  46%, 92% { background: var(--hover); color: var(--ink); }
  100% { background: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .tbCursor, .tbBar .tbB, .tbBar .tbC { animation: none; }
  .blItem.blPick { animation: none; background: var(--hover); }
  .tbBar .tbC { background: var(--accent); color: var(--accent-ink); }
  .tbBar .tbB { background: transparent; color: var(--ink-2); box-shadow: none; }
}

/* ---------- files on messages: 📎, chips waiting under a field, and on the message ---------- */
.attachBtn { border: 0; background: none; color: var(--ink-3); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; padding: 0; cursor: pointer; flex: none; }
.attachBtn svg { width: 17px; height: 17px; }
.attachBtn:hover { color: var(--ink); background: var(--hover); }
.card.open .send .attachBtn { position: absolute; right: 38px; bottom: 6px; }
[data-drop].dropping { outline: 2px dashed var(--accent); outline-offset: 2px; border-radius: 10px; }
.tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px 8px; }
.tray[hidden] { display: none; }
.card.open .tray { padding: 0 12px; margin-bottom: -4px; }
.actFoot .tray, .agentFoot .tray { padding: 0 0 8px; }
.pchip, .att > .open:not(:has(img)) { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 4px 6px; border-radius: 8px; background: var(--hover); font-size: 12px; color: var(--ink); text-decoration: none; }
.pchip img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; flex: none; }
.pchip .ext, .att .ext { flex: none; min-width: 26px; height: 26px; padding: 0 4px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); display: grid; place-items: center; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ink-2); }
.pchip .nm, .att .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; }
.pchip .sz, .att .sz { color: var(--ink-3); flex: none; }
.pchip button { border: 0; background: none; padding: 2px; border-radius: 6px; color: var(--ink-3); display: grid; place-items: center; cursor: pointer; }
.pchip button svg { width: 12px; height: 12px; }
.pchip button:hover { color: var(--ink); background: var(--line); }
.atts { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att { position: relative; display: inline-flex; min-width: 0; max-width: 100%; }
.att > .open { border: 0; font: inherit; cursor: pointer; }
.att > .open:not(:has(img)):hover { background: var(--line); }
.att > .open.busy { opacity: .6; cursor: progress; }
.att.pic .open { display: block; padding: 0; background: none; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.att.pic img { display: block; height: 72px; width: auto; max-width: 160px; object-fit: cover; }
.att .del { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); color: var(--ink-2); display: none; place-items: center; padding: 0; cursor: pointer; box-shadow: var(--shadow); }
.att .del svg { width: 11px; height: 11px; }
.att:hover .del { display: grid; }
.att .del:hover { color: var(--accent-ink); background: var(--danger); border-color: var(--danger); }
@media (hover: none) { .att .del { display: grid; } }
.rp.fl { display: inline-flex; align-items: center; gap: 2px; }
.rp.fl svg { width: 12px; height: 12px; }
.att.vid video { display: block; width: 240px; max-width: 100%; max-height: 180px; border-radius: 8px; border: 1px solid var(--line); background: #000; }

/* Someone tagged in a comment (share.js: bodyHtml); you, more so. */
.pageLink { color: var(--accent); font-weight: 500; text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 2px; cursor: pointer; }
.pageLink:hover { text-decoration-color: currentColor; }
.placeLink { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 4px; padding: 0 3px; text-decoration: none; cursor: pointer; }
.placeLink:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); }
.mention { color: var(--accent); font-weight: 600; background: color-mix(in srgb, var(--accent) 10%, transparent); border-radius: 4px; padding: 0 2px; }
.mention.me { background: var(--accent-soft); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent); }

/* ---------- ⌘K: go to a page, state or comment (palette.js) ---------- */
.pal { position: fixed; inset: 0; z-index: 40; display: flex; justify-content: center; align-items: flex-start; padding-top: min(14vh, 120px); background: var(--scrim); }
.palBox { display: flex; width: min(860px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 160px)); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-modal); overflow: hidden; }
.palMain { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.palInRow { display: flex; align-items: center; border-bottom: 1px solid var(--line); }
.palIn { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border: 0; background: none; color: var(--ink); font: 400 16px/1 var(--font); outline: none; }
/* Gone into a page: its name before the box, a click (or Backspace) goes back out. */
.palScope { flex: none; display: flex; align-items: center; gap: 6px; margin-left: 14px; padding: 4px 8px; border-radius: 8px; background: var(--hover); color: var(--ink); font: 500 13px/1 var(--font); white-space: nowrap; cursor: pointer; }
.palScope[hidden] { display: none; }
.palScope:not([hidden]) + .palIn { padding-left: 10px; }
.palMore { flex: none; margin-left: 8px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font: 500 12px/16px var(--font); white-space: nowrap; }
.palMore:hover, .palRow.on .palMore { border-color: var(--accent); color: var(--accent); }
.palRow.state .palS { font: 12px var(--font); }
.palIn::placeholder { color: var(--placeholder); }
.palList { flex: 1; overflow: auto; padding: 6px; }
.palGroup { padding: 10px 10px 4px; font: 600 11px/14px var(--font); letter-spacing: .02em; text-transform: uppercase; color: var(--ink-3); }
.palRow { display: flex; align-items: center; gap: 8px; min-height: 38px; padding: 6px 10px; border-radius: 8px; color: var(--ink); cursor: pointer; }
.palRow.on { background: var(--accent-soft); }
.palRow .placeCode { flex: none; }
.palT { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.palT mark { background: none; color: var(--accent); font-weight: 650; }
.palS { margin-left: auto; padding-left: 12px; flex: none; max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 12px var(--mono); color: var(--ink-3); }
.palNum { flex: none; min-width: 26px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 50% 50% 50% 3px; background: var(--ink-2); color: var(--panel); font: 700 11px/1 var(--font); }
.palIco { flex: none; width: 26px; text-align: center; color: var(--ink-3); }
.palRow.action .palS { font: 12px var(--font); }
.palTag { flex: none; font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.palNone { padding: 24px 12px; color: var(--ink-3); text-align: center; }
.palPeek { flex: none; width: 300px; padding: 14px; border-left: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; gap: 8px; }
.palPic { aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--ink-3); font-size: 12px; }
.palPic img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.palPeekT { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.palPeekS { font: 12px var(--mono); color: var(--ink-3); overflow-wrap: anywhere; }
@media (max-width: 720px) { .palPeek { display: none; } }

/* "Make variants…" from a page's ⋯ in All pages (share.js openVariants). */
.varDlg { width: min(480px, calc(100vw - 32px)); }
.varDlg form { gap: 18px; }
.vHead { display: flex; align-items: flex-start; gap: 12px; }
.vHead h2 { flex: 1; min-width: 0; font-size: 18px; line-height: 24px; text-wrap: balance; }
.vHead .vClose { flex: none; margin: -4px -6px 0 0; }
.vSub { margin: -10px 0 0; color: var(--ink-2); font-size: 14px; line-height: 20px; }
.vCode { display: inline-block; margin-right: 4px; padding: 0 6px; border-radius: 5px; background: var(--ink); color: var(--panel); font: 600 13px/22px var(--mono); vertical-align: 2px; }
.vRow { display: flex; flex-direction: column; gap: 8px; }
.vRow > span { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.vChips { display: flex; flex-wrap: wrap; gap: 6px; }
.vChip { height: 32px; min-width: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--panel); color: var(--ink); font: 500 13px/1 var(--font); cursor: pointer; }
.vChip:hover { background: var(--hover); }
.vChip[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.varDlg textarea { min-height: 84px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font: inherit; line-height: 1.45; background: var(--panel); color: var(--ink); outline: none; }
.varDlg textarea::placeholder { color: var(--placeholder); }
.varDlg textarea:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.vFoot { display: flex; align-items: center; gap: 8px; }
.vFoot .grow { flex: 1; }
.vCancel { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--hover); color: var(--ink); font-weight: 600; }
.vCancel:hover { background: var(--line); }
.varDlg .primary:disabled { opacity: .6; cursor: progress; }
@media (max-width: 480px) { .vFoot { flex-wrap: wrap; } .vFoot .vCopy { order: 2; width: 100%; } .vFoot .grow { display: none; } .vFoot .vCancel, .vFoot .primary { flex: 1; } }

/* clickroom isn't running, or is too old, for what Claude was asked (share.js terminalDialog): the
   command in the dark box of the dashboard's first-project block, with Copy. */
.tCmd { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 18px; border-radius: 12px; background: #121214; }
.tCmd code { flex: 1; min-width: 0; color: #fff; font: 13px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tCmd code span { color: #4ade80; }
.tCopy { height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 14px var(--font); cursor: pointer; }
.termDlg .vSub { margin: -8px 0 0; }
@media (max-width: 480px) { .termDlg .vFoot .vCopy { flex: 1 1 100%; } }

/* A stress test scenario open on the page: what it is, why it's real, and the way back (share.js). */
.stressBar { position: absolute; top: 16px; left: 50%; z-index: 4; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; max-width: calc(100% - 24px); }
.stressBar[hidden], .stage:has(.ovw) .stressBar { display: none; }
.stage:has(.stressBar:not([hidden])) .hint { top: 64px; }
.stressPill { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: 999px; background: var(--ink); color: var(--panel); font: 600 13px/1 var(--font); box-shadow: var(--shadow-menu); white-space: nowrap; }
.stressPill > svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stressPill b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.stressPill button { height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: rgb(127 127 127 / .28); color: inherit; font: 500 13px/1 var(--font); }
.stressPill button:hover { background: rgb(127 127 127 / .45); }
.stressCount { padding: 4px 8px; border-radius: 999px; font: 500 12px/1 var(--font); }
.stressCount.bad { background: #dc2626; color: #fff; }
.stressCount.busy { opacity: .7; }
.stressActs { display: flex; justify-content: flex-end; gap: 6px; margin-top: 14px; }
.stressActs button { height: 32px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink); font: 600 13px/1 var(--font); }
.stressActs button.post { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.stressQueued { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.stressShort { margin: 14px 0 0 !important; font-size: 12px !important; }
.menu .stressItem .r.bad { color: #dc2626; }
@media (max-width: 820px) {
  /* At the bottom: on top of the page it would cover what it's about. Its cards open above it. */
  .stressBar { top: auto; bottom: 16px; flex-direction: column-reverse; width: calc(100% - 16px); max-width: none; }
  .stage:has(.stressBar:not([hidden])) .hint { top: 16px; }
  .stressPill { flex-wrap: wrap; justify-content: center; gap: 6px 8px; max-width: 100%; box-sizing: border-box; padding: 10px; border-radius: 16px; white-space: normal; }
  .stressPill b { flex: 1 1 calc(100% - 24px); }
  .stressPill button { height: 36px; }
  .stressNote { border-radius: 12px; }
  .stressWhy { width: 100%; }
}
.stressPart[hidden] { display: none; }
.stressNote { margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--panel); color: var(--ink-2); font-size: 12px; box-shadow: var(--shadow-menu); }
.stressWhy { width: 420px; max-width: 100%; max-height: 60vh; overflow: auto; box-sizing: border-box; padding: 20px; border-radius: 12px; background: var(--panel); color: var(--ink); box-shadow: var(--shadow-menu); }
.stressWhy h3 { margin: 0 0 8px; font-size: 17px; }
.stressWhy p { margin: 0 0 14px; font-size: 13px; color: var(--ink-2); }
.stressChange { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; font-size: 13px; overflow-wrap: anywhere; }
.stressChange b { font-weight: 600; }
.stressChange code { font: 12px var(--mono); color: var(--ink-3); }
.vpBtn.stressOn { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.menu .menuLabel { padding: 6px 8px 4px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.menu .stressItem .t { font-weight: 500; }
.menu .stressItem:disabled { opacity: .55; cursor: default; }
.menu .stressItem .r { font-family: var(--font); }
.menu .stressItem .chev { width: 14px; height: 14px; margin-left: -4px; color: var(--ink-3); }
.menu .stressBack .t { font-weight: 600; }

/* A comment that asks for variants: the chip in the field (share.js variantSuggest).
   The comment box in the prototype has the same, in its own styles (share.js). */
.askField { position: relative; }
.askField textarea { display: block; }
.askField.on textarea { padding-bottom: 40px; }
.askRow { position: absolute; left: 2px; right: 18px; bottom: 2px; display: flex; padding: 6px 9px; border-radius: 0 0 0 6px; background: var(--panel); pointer-events: none; }
.askRow[hidden] { display: none; }
.askChip { display: inline-flex; align-items: center; height: 24px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); pointer-events: auto; }
.askField .askChip button { display: flex; align-items: center; border: 0; background: none; color: inherit; font: 500 12px var(--font); cursor: pointer; padding: 0; }
.askField .askChip .askCount { gap: 4px; height: 24px; padding: 0 2px 0 8px; }
.askField .askChip .askOff { justify-content: center; width: 20px; height: 20px; margin-right: 2px; border-radius: 50%; }
.askField .askChip .askOff:hover { background: rgb(80 70 229 / .14); }
.askField .askChip svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.card.open .statusBar > span > svg { width: 15px; height: 15px; margin: 0 6px -3px 0; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vtag.vars { font: 600 11px/16px var(--font); color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 0 6px; }

/* ---------- "Claude found 5 states on A2 About" (share.js openStatesReview; Figma: Review dialog · F) ---------- */
/* A tree of where each state opens from, a box ticked to add; the selected one previewed beside it. */
.stDlg { width: min(840px, calc(100vw - 32px)); }
.stDlg form { padding: 20px; gap: 18px; }
.stBody { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); min-height: 340px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stTree { padding: 8px 6px; overflow: auto; max-height: 52vh; border-right: 1px solid var(--line); }
.stRoot { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; color: var(--ink-2); font-size: 13px; font-weight: 500; }
.stRoot svg, .stKind svg { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.stRow { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 8px 0 calc(8px + var(--d) * 22px); border-radius: 7px; color: var(--ink); font-size: 14px; cursor: pointer; outline: none; }
.stRow:hover { background: var(--hover); }
.stRow[aria-selected="true"] { background: var(--hover); }
.stRow:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.stRow.off .stName, .stRow.off .stKind { color: var(--ink-3); }
.stLine { width: 12px; flex: none; color: var(--line-strong); font: 13px/1 var(--mono); text-align: center; }
.stCheck { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.stKind { flex: none; display: grid; place-items: center; color: var(--ink-2); }
.stName { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stTag { flex: none; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-2); font-size: 12px; line-height: 20px; }
.stPreview { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: var(--bg); min-width: 0; }
.stShot { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.stShot iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; pointer-events: none; opacity: 0; transition: opacity .2s; }
.stShot iframe.on { opacity: 1; }
.stTodo { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 8px; background: var(--panel); color: var(--ink-3); font-size: 13px; outline: 1.5px dashed var(--line-strong); outline-offset: -8px; border-radius: 8px; }
.stTodo svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stInfo { display: flex; flex-direction: column; gap: 6px; }
.stTitle { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.stWhat { color: var(--ink-2); font-size: 13px; }
.stInfo p { font-size: 14px; line-height: 20px; }
.stInfo .stHow { color: var(--ink-3); font-size: 13px; }
.stDlg .vFoot .primary { width: auto; padding: 0 20px; }
.stDiscard { height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--hover); color: var(--ink); font-weight: 600; cursor: pointer; }
.stDiscard:hover { background: var(--line); }
@media (max-width: 640px) {
  .stBody { grid-template-columns: 1fr; }
  .stTree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 36vh; }
}

/* ---------- a walkthrough, played (share.js openRecording, replay.js) ---------- */
/* The prototype at the size it was recorded at, scaled to fit the stage (replay.js sets the box),
   so the recorder's cursor points at the same things for everyone. */
/* Over the prototype: the recorder's cursor and face. Below a comment's popover, which is how the
   viewer answers what they're shown. */
.recLayer { position: absolute; z-index: 6; overflow: hidden; pointer-events: none; --c: var(--accent); } /* over All pages (.ovw: 5) */
/* A walkthrough playing: its video over the stage, as it was recorded. Away (Comment), the prototype underneath. */
.recLayer.play { display: flex; align-items: center; justify-content: center; background: var(--stage); pointer-events: auto; }
.recLayer.play.away { display: none; }
.recVideo { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.recLayer.play.pinning .recVideo { cursor: crosshair; }
body.replaying .threadPop { z-index: 8; } /* a comment opened on the video: over it */
/* Comments pinned on the video (replay.js drawPins), and the one being written: like .pin, standing
   on their spot (the bottom-left corner), the number in the author's colour with a white edge. */
.recPins { position: absolute; inset: 0; pointer-events: none; }
.recPin { position: absolute; z-index: 7; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 7px; transform: translateY(-100%); border: 2px solid #fff; border-radius: 14px 14px 14px 3px; background: var(--c, var(--accent)); color: #fff; font: 700 12px/1 var(--font); box-shadow: 0 2px 8px rgb(0 0 0 / .25); pointer-events: auto; cursor: pointer; }
.recPin[hidden] { display: none; }
.recPin.draft { pointer-events: none; }
.recPin.draft::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.vidCompose { position: absolute; z-index: 7; width: 320px; padding: 8px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-menu); }
.vidCompose textarea { width: 100%; min-height: 72px; resize: vertical; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font: 14px/1.45 var(--font); color: var(--ink); background: var(--panel); outline: none; }
.vidCompose textarea:focus { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.vidCompose .cr { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.vidCompose .grow { flex: 1; }
.vidCompose .when { font: 500 12px/1 var(--mono); color: var(--ink-3); }
.vidCompose button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: 600 13px/1 var(--font); cursor: pointer; }
.vidCompose button svg { width: 16px; height: 16px; }
.vidCompose button.post { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vidCompose button:disabled { opacity: .5; }
.recSpeed { flex: none; min-width: 44px; height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: 600 12px/1 var(--mono); }
.recSpeed:hover { background: var(--hover); color: var(--ink); }
/* Recording: the stage alone is what is recorded (recorder.js captureTab). Element capture wants it to
   be a stacking context and a backdrop root, or Chrome stops sending frames ("lost restriction
   eligibility"): the Safari bar's glass (backdrop-filter) inside did that. A filter that changes
   nothing makes it one. */
body.recording .stage { isolation: isolate; filter: opacity(1); }
/* And the stage ends above the floating toolbar while recording: where Chrome records the stage's
   region (when element capture sends nothing), whatever lies over it is in the video too. */
body.recording .stage { margin-bottom: 68px; }
.recCursor[hidden], .recFace[hidden] { display: none; }
.recCover { position: absolute; inset: 0; }
.recLayer.covered .recCover { pointer-events: auto; cursor: pointer; } /* playing: a click anywhere pauses */
.recDim { position: absolute; inset: 0; background: rgb(15 15 20 / .55); opacity: 0; transition: opacity .4s ease; }
.recLayer.intro .recDim { opacity: 1; }
.recCursor { position: absolute; left: 0; top: 0; will-change: transform; transition: opacity .2s; }
/* The arrow of clickroom's mark as the cursor. Its tip (top left, inside the rim) is the spot it points at. */
.recCursor svg { display: block; width: 20px; height: 24px; transform: translate(-11.1%, -7.3%); filter: drop-shadow(0 1px 2px rgb(0 0 0 / .3)); }
.recCursor .rim { fill: #fff; stroke: #fff; stroke-width: 6; stroke-linejoin: round; }
.recCursor .ink { fill: #18181b; }
.recCursor .face { fill: #fff; }
.recLayer.intro .recCursor { opacity: 0; }
.recCursor::after { content: ""; position: absolute; left: -14px; top: -14px; width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--c); opacity: 0; }
.recCursor.click::after { animation: recClick .45s ease-out; }
@keyframes recClick { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.3); } }
.recFace { position: absolute; left: 0; top: 0; width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: #1c1c22; box-shadow: 0 0 0 2px var(--c), 0 6px 18px rgb(0 0 0 / .28); will-change: transform; transition: opacity .2s; }
.recFace video { width: 100%; height: 100%; object-fit: cover; display: block; }
.recFace.morph { transition: transform .45s ease, width .45s ease, height .45s ease; }
/* Voice only: the recorder's name beside the cursor, as with the people in the review now. */
.recFace.name { width: auto; height: auto; border-radius: 0 9px 9px 9px; background: var(--c); color: #fff; font: 600 12px/1 var(--font); padding: 4px 8px; white-space: nowrap; box-shadow: 0 1px 3px rgb(0 0 0 / .25); }
body.commenting .recFace, body.commenting .recCursor { opacity: .35; } /* out of the way of what gets pinned */
.recStart { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); pointer-events: auto; display: flex; align-items: center; gap: 8px; height: 44px; max-width: calc(100% - 24px); padding: 0 18px 0 14px; border: 0; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font: 600 14px var(--font); box-shadow: var(--shadow); white-space: nowrap; }
.recStart span { overflow: hidden; text-overflow: ellipsis; }
.recStart svg { flex: none; }
.recStart[hidden] { display: none; }
.recRow .fill, .recStart .fill { fill: currentColor; stroke: none; }
.recNote { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 7; width: max-content; max-width: calc(100% - 24px); background: var(--ink); color: var(--panel); padding: 7px 14px; border-radius: 16px; font-size: 13px; text-align: center; box-shadow: var(--shadow); }
.recNote[hidden] { display: none; }
.stage:has(.recNote:not([hidden])) .hint { top: 56px; }
/* Below "Viewing v1. The latest is v2." when that shows: it stays while a walkthrough of v1 plays. */
.oldBanner:not([hidden]) ~ .recNote { top: 61px; }
.oldBanner:not([hidden]) ~ .recNote:not([hidden]) ~ .hint { top: 105px; }
/* A message ("Link copied") while a walkthrough is open: below where the note and the hint go, never over them. */
body.replaying .toast { top: 100px; }
body.replaying:has(.oldBanner:not([hidden])) .toast { top: 149px; }

/* The toolbar while one is open: play or pause, where it is, Comment, close. */
.recRow { display: flex; align-items: center; gap: 8px; padding: 5px 6px; white-space: nowrap; }
.recRow[hidden] { display: none; }
body.replaying .tools .toolRow, body.replaying .qInvite { display: none; }
.recPlay { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink); flex: none; }
.recPlay svg { display: none; }
.recRow[data-state="off"] .recPlay .play, .recRow[data-state="on"] .recPlay .pause, .recRow[data-state="ended"] .recPlay .again { display: block; }
.recTime { font: 500 12px var(--mono); color: var(--ink-2); min-width: 84px; text-align: center; font-variant-numeric: tabular-nums; }
.recSeekWrap { position: relative; display: flex; align-items: center; flex: none; width: 240px; height: 32px; }
.recSeek { width: 100%; margin: 0; accent-color: var(--accent); }
/* Comments made while watching: a dot above the line, at their moment. The line's ends are half a thumb in. */
.recMarks { position: absolute; left: 8px; right: 8px; top: 0; height: 0; pointer-events: none; }
.recMark { position: absolute; top: 2px; width: 9px; height: 9px; margin-left: -4.5px; padding: 0; border: 1.5px solid var(--panel); border-radius: 50%; background: var(--accent); pointer-events: auto; cursor: pointer; }
.recMark::before { content: ""; position: absolute; inset: -5px -4px; }
.recMark:hover, .recMark:focus-visible { transform: scale(1.35); }
.recRow.draft .recMarks { display: none; }
.recComment { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 600; }
.recComment:hover { background: var(--hover); }
body.commenting .recComment { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.recRow .iconBtn { width: 32px; height: 32px; }
.recRow.dead .recPlay, .recRow.dead .recSeekWrap { opacity: .4; pointer-events: none; }
@media (max-width: 819px) {
  .recRow { height: 56px; padding: 0 max(10px, env(safe-area-inset-left)); gap: 10px; }
  .recPlay { width: 40px; height: 40px; border-radius: 10px; }
  .recTime { min-width: 76px; }
  .recSeekWrap { flex: 1; width: auto; min-width: 0; height: 40px; }
  .recComment { width: 40px; height: 40px; padding: 0; justify-content: center; }
  .recComment span { display: none; }
  .recRow .iconBtn { width: 40px; height: 40px; }
}

/* ---------- a walkthrough, recorded (share.js beginTake, recorder.js) ---------- */
/* With a mouse, on a screen wide enough to show on. */
@media (max-width: 819px), (hover: none) and (pointer: coarse) { #recBtn { display: none !important; } }
/* The sheet under Record: does the microphone hear you, with or without your camera, Start. */
.recSheet { width: 280px; }
.rsBody { display: flex; flex-direction: column; gap: 10px; padding: 4px 8px 8px; }
.rsBody p { margin: 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.rsBody p:only-child, .rsBody p:first-child { font-size: 13px; color: var(--ink); }
.rsBody .btn { height: 36px; }
.rsSelf { align-self: center; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: #1c1c22; }
.rsSelf[hidden], .rsNote[hidden] { display: none; }
.rsSelf video { transform: scaleX(-1); } /* yourself, as in a mirror; on the stage as the video has you (text reads the right way round) */
.rsSelf video { width: 100%; height: 100%; object-fit: cover; display: block; }
.rsMic { display: flex; align-items: center; gap: 8px; color: var(--ink-2); }
.rsMic svg { flex: none; width: 16px; height: 16px; }
.rsMeter { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rsMeter i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
/* Which microphone, which camera: a field like the others (40px, radius 10). */
.rsPick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--ink-2); }
.rsPick[hidden] { display: none; }
.rsSelect { position: relative; display: block; }
.rsSelect select { width: 100%; height: 40px; padding: 0 32px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; appearance: none; -webkit-appearance: none; text-overflow: ellipsis; cursor: pointer; }
.rsSelect select:disabled { cursor: default; color: var(--ink-2); opacity: 1; }
.rsSelect select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rsSelect svg { position: absolute; right: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); pointer-events: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-2); }
.rsSelect select:disabled + svg { display: none; }
.rsBody .amRow { width: auto; margin: 0 -8px; }
/* While recording, over the prototype: yourself, large to say hello, then beside your cursor. */
.recLayer.take.covered .recCover { cursor: pointer; }
.recLayer.take.loading .recCover { cursor: progress; }
.recTip { position: absolute; left: 50%; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 7px 14px; border-radius: 16px; background: var(--ink); color: var(--panel); font-size: 13px; text-align: center; box-shadow: var(--shadow); }
/* The toolbar while recording: that it is, for how long, Stop. */
body.recording .tools .toolRow, body.recording .qInvite { display: none; }
.takeDot { flex: none; width: 10px; height: 10px; margin: 0 2px 0 8px; border-radius: 50%; background: var(--ink-3); }
.takeRow[data-state="on"] .takeDot { background: var(--danger); animation: takeOn 1.4s ease-in-out infinite; }
/* The preview: nothing records yet. Start recording instead of Stop, and what the microphone hears. */
.takeRow #takeGo, .takeRow[data-state="ready"] #takeStop, .takeRow[data-state="starting"] #takeStop, .takeMeter, .takeRow[data-state="ready"] .recTime, .takeRow[data-state="starting"] .recTime { display: none; }
.takeRow[data-state="ready"] #takeGo, .takeRow[data-state="starting"] #takeGo { display: flex; }
/* All pages while recording: only once it records (before that, the page it starts on is set). */
.takeRow:not([data-state="on"]) #takeOvw { display: none; }
.takeRow #takeOvw.on { background: var(--hover); }
.takeRow[data-state="ready"] .takeMeter, .takeRow[data-state="starting"] .takeMeter { display: block; flex: none; width: 64px; }
#takeGo svg { color: var(--danger); fill: currentColor; }
@keyframes takeOn { 50% { opacity: .3; } }
.takeLabel { font-size: 13px; font-weight: 600; }
.recRow .btn { display: flex; align-items: center; gap: 6px; height: 32px; }
.recRow .btn svg { width: 14px; height: 14px; }
.recRow .btn:disabled { opacity: .5; cursor: default; }
/* Just recorded: it plays here first, and only Save and share sends it anywhere. */
.recRow:not(.draft) .draftOnly, .recRow.draft .recComment, .recRow.draft .recClose, .recRow.draft .savedOnly { display: none; }

/* ---------- a walkthrough to find (share.js renderRecBar, renderRecList) ---------- */
/* Over the page, on the version it was recorded on: who made it, how long it is, Play. Below "Viewing v2" when that shows. */
.recBanner { position: absolute; top: 12px; left: 12px; z-index: 4; display: flex; align-items: center; gap: 2px; max-width: calc(100% - 24px); padding: 3px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); }
.recBanner[hidden], body.replaying .recBanner, body.recording .recBanner { display: none; }
.oldBanner:not([hidden]) ~ .recBanner { top: 61px; }
body.onVariant .recBanner { top: 64px; }
body.onVariant .oldBanner:not([hidden]) ~ .recBanner { top: 113px; }
@media (max-width: 819px) {
  /* On a phone the bars over the page start 8px in, and "Viewing v1" spans the width. */
  .recBanner { top: 8px; left: 8px; max-width: calc(100% - 16px); }
  .oldBanner:not([hidden]) ~ .recBanner, .oldBanner:not([hidden]) ~ .recNote { top: 57px; }
  body.onVariant .recBanner { top: 60px; }
  body.onVariant .oldBanner:not([hidden]) ~ .recBanner { top: 109px; }
  .recNote { max-width: calc(100% - 16px); }
  body.replaying .toast { top: calc(104px + env(safe-area-inset-top)); }
  body.replaying:has(.oldBanner:not([hidden])) .toast { top: calc(153px + env(safe-area-inset-top)); }
}
.rbPlay { display: flex; align-items: center; gap: 8px; min-width: 0; height: 30px; padding: 0 8px 0 3px; border: 0; border-radius: 7px; background: none; color: inherit; font: inherit; text-align: left; }
.rbPlay:hover { background: var(--hover); }
.rbIcon { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); }
.rbIcon svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.rbText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rbTime { flex: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.rbTeam { flex: none; padding: 1px 7px; border-radius: 999px; background: var(--hover); color: var(--ink-2); font-size: 11px; font-weight: 600; }
.recBanner .iconBtn, .rsItem .iconBtn { flex: none; width: 28px; height: 28px; }
.recBanner .iconBtn svg, .rsItem .iconBtn svg { width: 15px; height: 15px; }
/* Under Record, below the microphone check: the ones saved, to play, to send and to delete. */
.rsList { margin-top: 2px; padding: 6px 2px 2px; border-top: 1px solid var(--line); max-height: 184px; overflow-y: auto; }
.rsList[hidden] { display: none; }
.rsHead { padding: 2px 6px 4px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.rsItem { display: flex; align-items: center; gap: 2px; }
.rsItem .rbPlay { flex: 1; height: 42px; }
/* In Activity's Walkthroughs tab each one is a card: its cover (16:9, the page it starts on) is the
   Play button, with how long it is; who recorded it is under it. Without a cover: a plain tile. */
.rcCard { margin: 2px 6px 18px; }
.rcCover { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--hover); cursor: pointer; }
.rcCover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.rcCover.none { background: var(--accent-soft); border-color: transparent; }
.rcPlay { position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgb(0 0 0 / .28); transition: transform .12s ease; }
.rcPlay svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.rcCover:hover .rcPlay { transform: scale(1.08); }
.rcTime { position: absolute; right: 4px; bottom: 4px; padding: 2px 6px; border-radius: 6px; background: rgb(0 0 0 / .72); color: #fff; font-size: 12px; font-weight: 600; line-height: 1.4; font-variant-numeric: tabular-nums; }
.rcCard.on .rcCover, .rcCover:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.rcMeta { display: flex; align-items: center; gap: 2px; min-height: 36px; padding: 6px 0 0 2px; }
.rcMeta .rsWhat { flex: 1; }
.rcMeta .iconBtn { flex: none; width: 32px; height: 32px; }
.rcMeta .iconBtn svg { width: 16px; height: 16px; }
.rsWhat { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.rsWhat b { font-size: 13px; font-weight: 600; }
.rsWhat small { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
