/* ==========================================================================
   HufanUGC Studio — AI Workflow Studio (chat, workflow graph, storyboard preview)
   Same system as the rest of the Studio: white surfaces, ink, hairlines, one accent for live states only.
   ========================================================================== */

/* The sidebar's "New" label on AI Workflow */
.sb-item .sb-tag { margin-left: auto; height: 18px; padding: 0 6px; border-radius: 6px; display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 500; background: var(--ink); color: #fff; }
.app-shell.is-collapsed .sb-tag { display: none; }

/* ------------------------------------------------------------------ Workspace */
.wf-app { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100vh; height: 100dvh; background: #fff; }   /* the phone tabs are hidden here */
.wf-top { display: flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px 0 12px; border-bottom: 1px solid var(--line); background: #fff; min-width: 0; }
.wf-back { display: inline-flex; align-items: center; gap: 2px; height: 32px; padding: 0 10px 0 6px; border-radius: 9px; font-size: 13px; color: var(--muted); transition: background-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease); flex-shrink: 0; }
.wf-back:hover { background: rgba(0, 0, 0, 0.04); color: var(--ink); }
.wf-title { min-width: 0; max-width: 46vw; height: 32px; padding: 0 10px; border-radius: 9px; font-size: 15px; font-weight: 500; letter-spacing: -0.012em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: background-color var(--t-fast) var(--ease); }
.wf-title:hover { background: rgba(0, 0, 0, 0.04); }
.wf-top-r { margin-left: auto; display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
#wfLive { margin-right: 6px; display: inline-flex; }
.wf-tabs { display: none; }
.wf-body { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(420px, 1.05fr); min-height: 0; }

.wf-chat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #fff; }
.wf-msgs { flex: 1; min-height: 0; overflow-y: auto; padding: 28px 0 16px; scroll-behavior: smooth; }
.wf-thread { max-width: 720px; margin: 0 auto; padding: 0 28px; display: grid; gap: 20px; }
.wf-composer { width: 100%; max-width: 776px; margin: 0 auto; padding: 8px 28px 14px; }

.wf-side { display: flex; flex-direction: column; min-height: 0; background: var(--s1); }
.wf-side-tabs { display: flex; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.wf-side-tabs .seg button { display: inline-flex; align-items: center; gap: 6px; }
.wf-side-b { flex: 1; min-height: 0; overflow-y: auto; padding: 20px 20px 28px; }

/* ------------------------------------------------------------------ Status chips (shared by graph, cards and rows) */
.wf-st { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--s3); color: var(--muted); flex-shrink: 0; }
.wf-st i { width: 6px; height: 6px; border-radius: 50%; background: var(--ghost); }
.wf-st.is-done { background: #eef7f1; color: #1f6e3f; }
.wf-st.is-done i { background: #2f9e5b; }
.wf-st.is-running { background: var(--accent-soft); color: var(--accent-ink); }
.wf-st.is-running i { background: var(--accent); animation: live 1.8s var(--ease) infinite; }
.wf-st.is-attention { background: #fbf4e6; color: #8a5a00; }
.wf-st.is-attention i { background: #d38b12; }
.wf-st.is-failed { background: #fdf0ee; color: #8c1d18; }
.wf-st.is-failed i { background: #c9372c; }

/* ------------------------------------------------------------------ Messages */
/* Only what is new rises in (calm, a little blur that clears); the rest of the thread never moves on a redraw */
.wf-m.is-new { animation: wfRise 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes wfRise { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes wfFade { from { opacity: 0; } to { opacity: 1; } }
.wf-m-user.is-new { transform-origin: 100% 100%; animation-name: wfSend; animation-duration: 560ms; }
@keyframes wfSend { from { opacity: 0; transform: translateY(18px) scale(0.97); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }
/* The answer: its name first, then each paragraph rises in after the one before */
.wf-m-ai.is-new:not(.is-thinking) { animation: wfFade 300ms both; }
.wf-m-ai.is-new:not(.is-thinking) .wf-md > * { animation: wfRise 640ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wf-m-ai.is-new .wf-md > :nth-child(2) { animation-delay: 110ms; }
.wf-m-ai.is-new .wf-md > :nth-child(3) { animation-delay: 220ms; }
.wf-m-ai.is-new .wf-md > :nth-child(4) { animation-delay: 330ms; }
.wf-m-ai.is-new .wf-md > :nth-child(5) { animation-delay: 440ms; }
.wf-m-ai.is-new .wf-md > :nth-child(n + 6) { animation-delay: 520ms; }
.wf-m-ai.is-new .wf-changed { animation: wfRise 560ms 260ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wf-sugg.is-new .chip-btn { animation: wfRise 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(360ms + var(--i, 0) * 70ms); }
.wf-m-user { justify-self: end; max-width: 82%; display: grid; justify-items: end; gap: 6px; }
.wf-m-user.is-pending .wf-bubble { box-shadow: none; }
.wf-bubble { background: var(--s2); padding: 11px 16px; border-radius: 20px 20px 6px 20px; font-size: 15px; line-height: 1.55; color: var(--ink); overflow-wrap: anywhere; }
.wf-bubble p + p { margin-top: 8px; }
.wf-atts-in { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wf-att { position: relative; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--canvas); }
.wf-att img { width: 100%; height: 100%; object-fit: cover; }
.wf-att em { position: absolute; left: 6px; bottom: 6px; font-style: normal; font-size: 10.5px; font-weight: 500; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: var(--ink-2); }

.wf-m-ai { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.wf-mark { width: 28px; height: 28px; border-radius: 9px; background: var(--ink); color: #fff; display: grid; place-items: center; margin-top: 1px; }
.is-thinking .wf-mark { background: var(--s3); color: var(--ink-2); }
.wf-ai { min-width: 0; }
.wf-ai-name { font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.wf-md { font-size: 15px; line-height: 1.65; color: var(--ink); overflow-wrap: anywhere; }
.wf-md p + p, .wf-md p + ul, .wf-md ul + p, .wf-md ul + ul { margin-top: 10px; }
.wf-md ul { padding-left: 18px; list-style: disc; display: grid; gap: 4px; }
.wf-md li::marker { color: var(--faint); }
.wf-md b { font-weight: 600; color: var(--ink); }
.wf-changed { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.wf-tag { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: #fff; border: 1px solid var(--line); color: var(--ink-2); transition: border-color var(--t-fast) var(--ease); }
.wf-tag:hover { border-color: var(--line-3); }
.wf-tag .i { color: #2f9e5b; }

.wf-m-ev { justify-self: center; display: grid; justify-items: center; gap: 10px; font-size: 12px; color: var(--muted); max-width: 100%; }
.wf-m-ev.is-bad, .wf-ev-line { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.wf-m-ev.is-bad > span, .wf-ev-line > span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 14px; background: var(--s2); border: 1px solid var(--line); text-align: left; line-height: 1.45; max-width: 560px; }
.wf-m-ev.is-bad > span { background: #fdf0ee; border-color: rgba(201, 55, 44, 0.2); color: #8c1d18; }
.wf-m-ev .i { flex-shrink: 0; }
.wf-m-ev time { color: var(--faint); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.wf-m-ev.has-pics { justify-self: stretch; }

/* Pictures in the chat: made right here, opened full size, downloaded */
.wf-pics { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); width: calc(100% - 40px); max-width: 460px; margin-left: 40px; justify-self: start; }
.wf-pics.n1 { grid-template-columns: minmax(0, 1fr); max-width: 300px; }
.wf-pics.n3, .wf-pics.n4 { max-width: 520px; }
.wf-pic { position: relative; margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--canvas); box-shadow: var(--sh-1); }
.wf-pic-open { display: block; width: 100%; height: 100%; padding: 0; cursor: zoom-in; }
.wf-pic-open img { width: 100%; height: 100%; object-fit: cover; display: block; }
.wf-pic figcaption { position: absolute; left: 8px; right: 8px; bottom: 8px; display: flex; align-items: center; justify-content: space-between; gap: 6px; pointer-events: none; }
.wf-pic figcaption span { font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 8px; background: rgba(255, 255, 255, 0.92); color: var(--ink-2); }
.wf-pic-dl { pointer-events: auto; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.92); color: var(--ink); border: 1px solid rgba(0, 0, 0, 0.06); }
.wf-pic-dl:hover { background: #fff; }
.wf-pic .ld-canvas { position: absolute; inset: 0; z-index: 0; }
.wf-pic-msg { position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; align-content: center; gap: 6px; padding: 12px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.4; }
.wf-pic.is-failed { background: #fffbfa; border-color: rgba(201, 55, 44, 0.2); }
.wf-pic.is-failed .wf-pic-msg { color: #8c1d18; }
.wf-pic.is-failed .wf-pic-msg span { color: var(--muted); }
.modal.wf-viewer-modal { width: min(92vw, 880px); max-width: none; padding: 0; overflow: hidden; }
.wf-viewer img { display: block; width: 100%; max-height: 76vh; object-fit: contain; background: #f6f5f3; }
.wf-viewer-f { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

.wf-think { display: flex; align-items: center; gap: 10px; min-height: 26px; font-size: 14.5px; color: var(--muted); }
/* A small mark that breathes and turns while the assistant works */
.wf-orb { flex: none; width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(from 0deg, var(--accent), #f7c2a6, #ffe7da, var(--accent));
  box-shadow: 0 0 0 4px rgba(239, 90, 42, 0.1); animation: wfOrb 2.4s ease-in-out infinite; }
@keyframes wfOrb { 0% { transform: rotate(0deg) scale(0.82); box-shadow: 0 0 0 3px rgba(239, 90, 42, 0.1); } 50% { transform: rotate(180deg) scale(1); box-shadow: 0 0 0 6px rgba(239, 90, 42, 0.06); }
  100% { transform: rotate(360deg) scale(0.82); box-shadow: 0 0 0 3px rgba(239, 90, 42, 0.1); } }
/* The words: one at a time, each rising in as the last rises away, with a soft shine passing over */
.wf-think-t { position: relative; display: inline-grid; height: 24px; overflow: hidden; }
.wf-think-t > span { grid-area: 1 / 1; line-height: 24px; white-space: nowrap; opacity: 0; transform: translateY(80%); filter: blur(2px);
  background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 38%, var(--ink) 50%, var(--muted) 62%, var(--muted) 100%); background-size: 240% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: wfShine 2.2s linear infinite;
  transition: opacity 560ms var(--ease), transform 680ms cubic-bezier(0.2, 0.8, 0.2, 1), filter 560ms var(--ease); }
.wf-think-t > span.is-on { opacity: 1; transform: none; filter: none; }
.wf-think-t > span.is-off { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(-80%); filter: blur(2px); }   /* leaving: takes no width */
@keyframes wfShine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.wf-think-s { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.wf-think-n { margin: 2px 0 0; font-size: 12.5px; line-height: 1.45; color: var(--faint); }
/* "Thought for 3m 27s" over a GPT answer, as in ChatGPT: it opens OpenAI's summary of the thinking */
.wf-thought { margin: 2px 0 6px; }
.wf-thought-b { display: inline-flex; align-items: center; gap: 4px; padding: 2px 0; font-size: 13.5px; color: var(--muted); transition: color var(--t-fast) var(--ease); }
.wf-thought-b:hover { color: var(--ink); }
.wf-thought-b .i { width: 13px; height: 13px; transition: transform 240ms var(--ease-out); }
.wf-thought.is-open .wf-thought-b .i { transform: rotate(90deg); }
.wf-thought-p { margin: 6px 0 4px 2px; padding: 2px 0 2px 14px; border-left: 2px solid var(--line-2); font-size: 13px; line-height: 1.6; color: var(--muted); animation: wfIn 240ms var(--ease-out) both; }
.wf-thought-md > * + * { margin-top: 8px; }
.wf-thought-md b { color: var(--ink-2); font-weight: 500; }
.wf-thought-f { margin-top: 8px; font-size: 11.5px; color: var(--faint); }

/* GPT's thinking levels, picked as in ChatGPT, drawn the Apple way: a frosted panel over the message box (a sheet from the
   bottom on phones), each level with what it is for, how long it usually takes, its price per answer and a check */
.wf-effp { position: fixed; z-index: 90; width: 372px; max-width: calc(100vw - 16px); padding: 8px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.86); -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04), 0 22px 54px -18px rgba(0, 0, 0, 0.32);
  opacity: 0; transform: translateY(6px) scale(0.97); transform-origin: 24px 100%; transition: opacity 180ms var(--ease), transform 260ms cubic-bezier(0.2, 0.9, 0.25, 1.12); }
.wf-effp.is-open { opacity: 1; transform: none; }
.wf-effp.is-sheet { left: 0; right: 0; bottom: 0; width: auto; max-width: none; padding: 6px 10px calc(14px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0;
  background: rgba(255, 255, 255, 0.94); transform: translateY(100%); transition: transform 340ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 200ms var(--ease); }
.wf-effp.is-sheet.is-open { transform: none; }
.wf-effp-scrim { position: fixed; inset: 0; z-index: 89; background: rgba(0, 0, 0, 0.26); opacity: 0; transition: opacity 240ms var(--ease); }
.wf-effp-scrim.is-open { opacity: 1; }
.wf-effp-grab { display: block; width: 36px; height: 5px; margin: 2px auto 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.16); }
.wf-effp-h { display: grid; gap: 2px; padding: 8px 10px 10px; }
.wf-effp-h b { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink); }
.wf-effp-h span { font-size: 12.5px; color: var(--muted); }
.wf-effp-f { margin: 10px 10px 2px; font-size: 11.5px; line-height: 1.45; color: var(--faint); text-align: center; }
.wf-effp .wf-lvl { padding: 0 6px; }

/* Medium, High and Max: one segmented control, the Apple way. A grey track, a white thumb that springs to the chosen
   level, and on each level a depth ring that fills a third, two thirds or all the way (Max adds a centre). */
.wf-lvl-seg { position: relative; display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); padding: 4px; border-radius: 18px; background: rgba(118, 118, 128, 0.12); }
.wf-lvl-thumb { position: absolute; top: 4px; bottom: 4px; left: calc(4px + var(--i, 0) * ((100% - 8px) / var(--n, 3))); width: calc((100% - 8px) / var(--n, 3)); border-radius: 14px;
  background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.04), 0 3px 10px -2px rgba(0, 0, 0, 0.16); transition: left 420ms cubic-bezier(0.3, 1.3, 0.45, 1); }
.wf-lvl-o { position: relative; display: grid; justify-items: center; align-content: center; gap: 3px; min-width: 0; padding: 13px 4px 11px; border-radius: 14px; text-align: center;
  color: var(--muted); outline: none; transition: color 200ms var(--ease), transform 160ms var(--ease); -webkit-tap-highlight-color: transparent; }
.wf-lvl-o:active { transform: scale(0.97); }
.wf-lvl-o:focus-visible { box-shadow: inset 0 0 0 2px rgba(17, 17, 17, 0.35); }
.wf-lvl-o b { margin-top: 3px; font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; color: var(--ink-2); }
.wf-lvl-o span { font-size: 11.5px; color: var(--faint); }
.wf-lvl-o.is-on b { color: var(--ink); }
.wf-lvl-o.is-on span { color: var(--muted); }
.wf-gauge { display: block; width: 28px; height: 28px; transform: rotate(-90deg); overflow: visible; }
.wf-gauge circle { fill: none; stroke-width: 3.2; }
.wf-gauge .g-tr { stroke: rgba(0, 0, 0, 0.07); }
.wf-gauge .g-fl { stroke: #9b9b9b; stroke-linecap: round; transition: stroke 240ms var(--ease); }
.wf-gauge .g-dot { fill: #9b9b9b; stroke: none; transition: fill 240ms var(--ease); }
.wf-lvl-o:hover .g-fl { stroke: #6f6f6f; } .wf-lvl-o:hover .g-dot { fill: #6f6f6f; }
.wf-lvl-o.is-on .g-fl { stroke: var(--ink); animation: wfRing 620ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.wf-lvl-o.is-on .g-dot { fill: var(--ink); animation: wfDotIn 420ms 240ms cubic-bezier(0.3, 1.4, 0.5, 1) both; transform-box: fill-box; transform-origin: center; }
@keyframes wfRing { from { stroke-dashoffset: 30; opacity: 0.4; } to { stroke-dashoffset: 0; opacity: 1; } }
@keyframes wfDotIn { from { transform: scale(0); } to { transform: scale(1); } }
/* Under the control: the level in view, what it is for, how long it usually takes and its price */
.wf-lvl-d { margin-top: 10px; min-height: 76px; padding: 12px 14px; border-radius: 16px; background: rgba(255, 255, 255, 0.72); box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.08); }
.wf-lvl-dt { animation: wfLvlIn 240ms var(--ease-out) both; }
@keyframes wfLvlIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }
.wf-lvl-say { margin: 0; font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.wf-lvl-say b { font-weight: 600; color: var(--ink); }
.wf-lvl-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 9px; font-size: 12px; color: var(--muted); }
.wf-lvl-meta span { display: inline-flex; align-items: center; gap: 5px; }
.wf-lvl-meta .i { width: 13px; height: 13px; color: var(--faint); }
.wf-lvl-meta b { font-weight: 600; color: var(--ink); }
/* Phones: a compact sheet (about a quarter of the screen), never taller than the screen, closed with a swipe down */
.wf-effp.is-sheet { max-height: 86dvh; overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px calc(10px + env(safe-area-inset-bottom)); touch-action: none; }
.wf-effp.is-sheet.is-drag { transition: none; }
.wf-effp.is-sheet .wf-effp-grab { margin: 4px auto 4px; }
.wf-effp.is-sheet .wf-effp-h { grid-auto-flow: column; justify-content: space-between; align-items: baseline; padding: 2px 4px 8px; }
.wf-effp.is-sheet .wf-effp-h b { font-size: 15px; }
.wf-effp.is-sheet .wf-effp-h span { font-size: 12px; text-align: right; }
.wf-effp.is-sheet .wf-lvl { padding: 0; }
.wf-effp.is-sheet .wf-lvl-seg { padding: 3px; border-radius: 15px; }
.wf-effp.is-sheet .wf-lvl-thumb { top: 3px; bottom: 3px; left: calc(3px + var(--i, 0) * ((100% - 6px) / var(--n, 3))); width: calc((100% - 6px) / var(--n, 3)); border-radius: 12px; }
.wf-effp.is-sheet .wf-lvl-o { gap: 1px; padding: 8px 4px 7px; border-radius: 12px; }
.wf-effp.is-sheet .wf-gauge { width: 22px; height: 22px; }
.wf-effp.is-sheet .wf-lvl-o b { margin-top: 3px; font-size: 13px; }
.wf-effp.is-sheet .wf-lvl-o span { font-size: 11px; }
.wf-effp.is-sheet .wf-lvl-d { min-height: 0; margin-top: 8px; padding: 9px 12px; border-radius: 13px; background: rgba(0, 0, 0, 0.035); box-shadow: none; }
.wf-effp.is-sheet .wf-lvl-say { font-size: 13px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wf-effp.is-sheet .wf-lvl-say b, .wf-effp.is-sheet .wf-lvl-sep { display: none; }   /* the chosen tile already says its name */
.wf-effp.is-sheet .wf-lvl-meta { margin-top: 5px; gap: 4px 12px; font-size: 11.5px; }
.wf-effp.is-sheet .wf-effp-f { margin: 7px 4px 0; font-size: 11px; }
.wf-lvl-card .wf-lvl-d { background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); }
.wf-dots { display: inline-flex; gap: 4px; }
.wf-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: wfDot 1.2s infinite ease-in-out; }
.wf-dots i:nth-child(2) { animation-delay: 0.15s; }
.wf-dots i:nth-child(3) { animation-delay: 0.3s; }
@keyframes wfDot { 0%, 80%, 100% { opacity: 0.25; transform: scale(0.8); } 40% { opacity: 1; transform: none; } }

.wf-sugg { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 40px; }
.wf-sugg .chip-btn { height: auto; min-height: 32px; padding: 6px 12px; white-space: normal; text-align: left; line-height: 1.35; }
.wf-hello { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 48px 0 12px; }
.wf-hello-mark { width: 44px; height: 44px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.wf-hello b { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.wf-hello p { font-size: 14px; color: var(--muted); max-width: 440px; line-height: 1.55; }
.wf-hello .wf-sugg { padding-left: 0; justify-content: center; margin-top: 8px; }
.wf-err { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: #fdf0ee; color: #8c1d18; font-size: 13px; line-height: 1.45; margin-left: 40px; }

/* ------------------------------------------------------------------ Composer */
.wf-comp { border: 1px solid var(--line-2); border-radius: 22px; background: #fff; box-shadow: var(--sh-2); padding: 10px 10px 8px 14px; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.wf-comp:focus-within { border-color: var(--line-3); box-shadow: var(--sh-3); }
.wf-comp textarea { display: block; width: 100%; border: 0; outline: 0; resize: none; font: inherit; font-size: 15px; line-height: 1.5; padding: 4px 2px; max-height: 220px; background: transparent; color: var(--ink); }
.wf-comp textarea::placeholder { color: var(--faint); }
.wf-atts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.wf-atts:empty { display: none; }
.wf-chipimg { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 4px 6px 4px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--s1); font-size: 12px; }
.wf-chipimg img { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; }
.wf-chipimg em { font-style: normal; font-weight: 500; color: var(--ink-2); }
.wf-chipimg button { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.wf-chipimg button:hover { background: rgba(0, 0, 0, 0.06); color: var(--ink); }
.wf-chipimg.is-loading img { animation: wfPulse 1.1s ease-in-out infinite; }
@keyframes wfPulse { 50% { opacity: 0.4; } }
.wf-comp-bar { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.wf-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); transition: background-color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.wf-icon:hover { background: rgba(0, 0, 0, 0.04); border-color: var(--line-2); }
.wf-pick { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 10px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); transition: background-color var(--t-fast) var(--ease); max-width: 100%; }
.wf-pick span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-pick:hover { background: rgba(0, 0, 0, 0.05); }
.wf-pick .i:first-child { color: var(--muted); }
.wf-comp-note { margin-left: auto; min-width: 0; font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-comp-bar > .wf-icon, .wf-comp-bar > .wf-send { flex: none; }   /* the + and the send button never shrink; the words give way first */
.wf-comp-bar > .wf-pick { min-width: 0; flex: 0 1 auto; }
.wf-eff + .wf-send { margin-left: auto; }   /* with the level pill (which shows the price) there is no note: send stays at the right end */
/* GPT's thinking level: three small bars (Medium one, High two, Max three) and its price per answer, always in view */
.wf-eff { gap: 7px; padding: 0 8px 0 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.045); }
.wf-eff:hover, .wf-eff[aria-expanded="true"] { background: rgba(0, 0, 0, 0.08); }
.wf-eff em { font-style: normal; font-size: 11.5px; font-weight: 500; line-height: 18px; padding: 0 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.055); color: var(--ink-2); }
.wf-eff .i { color: var(--muted); }
.wf-eff .wf-gauge { flex: none; width: 15px; height: 15px; }
.wf-eff .wf-gauge circle { stroke-width: 3.4; }
.wf-eff .wf-gauge .g-fl { stroke: var(--ink); } .wf-eff .wf-gauge .g-dot { fill: var(--ink); }
.wf-send { width: 34px; height: 34px; margin-left: auto; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; flex-shrink: 0; transition: background-color var(--t) var(--ease), transform var(--t-fast) var(--ease); }
.wf-send .i { width: 18px; height: 18px; stroke-width: 2.2; }
.wf-comp-note + .wf-send { margin-left: 4px; }
.wf-send:not(:disabled):active { transform: scale(0.92); }
.wf-send:disabled { background: #d9d9d9; color: #fff; cursor: default; }   /* nothing to send yet: a quiet grey, always at the right end */
.wf-disc { text-align: center; font-size: 11.5px; color: var(--faint); margin-top: 8px; line-height: 1.4; }

/* ------------------------------------------------------------------ Next-step cards */
.wf-card { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--sh-1); margin-left: 40px; }
.wf-card.is-go { border-color: var(--line-2); box-shadow: var(--sh-2); }
.wf-card.is-bad { border-color: rgba(201, 55, 44, 0.24); background: #fffbfa; }
.wf-card-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.wf-card-h b { display: block; font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; }
.wf-card-h span { font-size: 12.5px; color: var(--muted); }
.wf-card-h .link { white-space: nowrap; }
.wf-card-p { font-size: 13px; color: var(--muted); line-height: 1.5; }
.wf-card-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-strip { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.wf-strip::-webkit-scrollbar { display: none; }
.wf-strip-i { flex: 0 0 64px; border-radius: 10px; transition: transform var(--t-fast) var(--ease); }
.wf-strip-i:hover { transform: translateY(-1px); }
.wf-sum { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wf-sum > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; padding: 9px 12px; font-size: 13px; }
.wf-sum > div + div { border-top: 1px solid var(--line); }
.wf-sum > div > span:first-child { color: var(--muted); min-width: 108px; }
.wf-sum b { font-weight: 500; }
.wf-sum .link { margin-left: auto; }
.wf-sum .is-neg { color: #c9372c; }
.wf-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--s2); font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.wf-note .i { flex-shrink: 0; margin-top: 1px; }
.wf-live { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.wf-final { position: relative; width: 100%; max-width: 340px; border-radius: 12px; overflow: hidden; background: #000; }
.wf-final video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.wf-rows { display: grid; }
.wf-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; font-size: 13px; min-width: 0; }
.wf-rows .wf-row + .wf-row, .wf-node-b .wf-row + .wf-row { border-top: 1px solid var(--line); }
.wf-row-n { font-weight: 500; color: var(--ink-2); min-width: 64px; font-variant-numeric: tabular-nums; }
.wf-row-t { flex: 1; min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-row-err { font-size: 12px; color: #8c1d18; line-height: 1.45; padding-bottom: 6px; }
.wf-bar { height: 3px; border-radius: 3px; background: var(--s4); overflow: hidden; margin: -2px 0 6px; }
.wf-bar i { display: block; height: 100%; background: var(--accent); transition: width 600ms var(--ease); }

/* ------------------------------------------------------------------ Scene pictures */
.wf-media { position: relative; width: 100%; border-radius: 10px; overflow: hidden; background: var(--canvas); }
.wf-media > img, .wf-media > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.wf-media .ld-canvas { position: absolute; inset: 0; }
.wf-media-empty { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 2px; padding: 8px; text-align: center; font-size: 11px; color: var(--faint); }
.wf-media-empty b { font-size: 17px; font-weight: 500; color: var(--muted); }
.wf-media-note { position: absolute; left: 8px; bottom: 8px; right: 8px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.wf-badge { position: absolute; top: 6px; left: 6px; padding: 2px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 500; background: rgba(255, 255, 255, 0.94); color: #8a5a00; }
.wf-badge.is-bad { color: #8c1d18; }

.wf-side-b.is-canvas { padding: 0; overflow: hidden; display: flex; }
/* ------------------------------------------------------------------ Workflow canvas, drawn like n8n (the Studio's own colours) */
.wfc { position: relative; flex: 1; min-height: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab;
  background-color: #fafafa; background-image: radial-gradient(circle, #d6d6d6 1.1px, transparent 1.3px); background-size: 20px 20px; }
.wfc.is-panning { cursor: grabbing; }
.wfc-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.wfc-svg { position: absolute; left: 0; top: 0; overflow: visible; pointer-events: none; max-width: none; max-height: none; }   /* the site's base caps svg at its box's width */
/* Connections: dashed while nothing has passed, grey when ready, dark once it has passed, moving (accent) while it really flows.
   A sub-node's line is always dashed, like n8n's. */
.wfc-e { fill: none; stroke: #d2d2d2; stroke-width: 2; stroke-dasharray: 4 5; transition: stroke 300ms var(--ease); }
.wfc-e.st-ready { stroke: #b2b2b2; stroke-dasharray: none; }
.wfc-e.st-done { stroke: #6e6e6e; stroke-dasharray: none; }
.wfc-e.st-run { stroke: var(--accent); stroke-dasharray: 7 6; animation: wfcFlow 0.9s linear infinite; }
.wfc-e.is-sub { stroke-width: 1.6; stroke-dasharray: 5 5; }
.wfc-e.is-sub.st-ready { stroke: #b2b2b2; } .wfc-e.is-sub.st-done { stroke: #8a8a8a; }
@keyframes wfcFlow { to { stroke-dashoffset: -26; } }
.wfc-m { fill: #d2d2d2; } .wfc-m.st-ready { fill: #b2b2b2; } .wfc-m.st-done { fill: #6e6e6e; } .wfc-m.st-run { fill: var(--accent); }
/* What passes along a connection, written above it (n8n writes "1 item" there) */
.wfc-el { position: absolute; transform: translate(-50%, -50%); padding: 1px 7px; border-radius: 999px; background: #fafafa;
  font-size: 11px; font-weight: 500; line-height: 16px; color: var(--muted); white-space: nowrap; pointer-events: none; }
.wfc-el.st-done { color: var(--ink-2); }
.wfc-el.st-run { color: var(--accent-ink); background: #fff7f3; box-shadow: 0 0 0 1px rgba(239, 90, 42, 0.35); }
.wfc-el.is-sub { background: #fff; box-shadow: 0 0 0 1px var(--line-2); }

/* A step: a square (the trigger rounded on its left, like n8n's), or a wide step that uses a model, with its ports under it */
.wfc-node { position: absolute; cursor: pointer; outline: none; }
.wfc-box { position: relative; display: grid; place-items: center; width: 100%; height: 100%; background: #fff; border: 1.5px solid #d4d4d4; border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 6px 18px -10px rgba(0, 0, 0, 0.18); transition: border-color 260ms var(--ease), box-shadow 260ms var(--ease); }
.wfc-node.is-trigger .wfc-box { border-radius: 44px 12px 12px 44px; }
.wfc-node.is-wide .wfc-box { display: flex; align-items: center; justify-content: flex-start; gap: 12px; padding: 0 30px 0 12px; }   /* the right edge is the state's corner */
.wfc-node.is-sub .wfc-box { border-radius: 50%; }
.wfc-node:hover .wfc-box { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 12px 26px -12px rgba(0, 0, 0, 0.28); }
.wfc-node:focus-visible .wfc-box, .wfc-node.is-sel .wfc-box { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.1), 0 12px 26px -12px rgba(0, 0, 0, 0.28); }
.wfc.is-dragging .wfc-node, .wfc.is-dragging { cursor: grabbing; }
.wfc-vis { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; color: var(--ink); }
.wfc-node.is-wide .wfc-vis { flex: none; width: 52px; height: 52px; background: var(--s2); }
.wfc-node.is-sub .wfc-vis { width: 100%; height: 100%; border-radius: 50%; }
.wfc-ic { display: grid; place-items: center; color: inherit; }
.wfc-ic .i { width: 30px; height: 30px; stroke-width: 1.5; }
.wfc-node.is-wide .wfc-ic .i { width: 24px; height: 24px; stroke-width: 1.6; }
.wfc-node.is-sub .wfc-ic .i { width: 22px; height: 22px; }
.wfc-logo .brand-logo { width: 26px; height: 26px; }
.wfc-photo { width: 100%; height: 100%; object-fit: cover; }
.wfc-mosaic { display: grid; gap: 2px; width: 100%; height: 100%; grid-template-columns: 1fr 1fr; }
.wfc-mosaic.n1 { grid-template-columns: 1fr; }
.wfc-mosaic.n3 img:first-child { grid-row: span 2; }
.wfc-mosaic img { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
/* The words: inside a wide step, under a square one and under a sub-node */
.wfc-txt { display: grid; gap: 1px; min-width: 0; text-align: left; line-height: 1.25; }
.wfc-txt b, .wfc-cap b { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfc-l { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfc-3 { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wfc-cap { position: absolute; left: 50%; top: calc(100% + 9px); transform: translateX(-50%); width: 184px; display: grid; justify-items: center; gap: 1px; text-align: center; line-height: 1.25; pointer-events: none; }
.wfc-cap b { justify-content: center; max-width: 100%; }
.wfc-cap .wfc-l, .wfc-cap .wfc-3 { max-width: 100%; }
.wfc-node.is-sub .wfc-cap { top: calc(100% + 7px); width: 150px; }
.wfc-node.is-sub .wfc-cap b { font-size: 12.5px; }
.wfc-node.is-sub .wfc-cap .wfc-l { font-size: 11.5px; }
.wfc-node.is-sub .wfc-cap .wfc-3 { font-size: 11px; }
.wfc-num { flex: none; display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 6px; background: var(--s3); font-style: normal;
  font-size: 10.5px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.wfc-node.st-done .wfc-num { background: var(--ink); color: #fff; }
.wfc-node.st-running .wfc-num { background: var(--accent); color: #fff; }
/* The handles: a step's input on its left (a small bar), its output on its right (a dot), a sub-node's on its top */
.wfc-hin, .wfc-hout, .wfc-hsub { position: absolute; display: block; background: #bdbdbd; pointer-events: none; }
.wfc-hin { left: -6px; top: 50%; width: 7px; height: 18px; margin-top: -9px; border-radius: 3px; }
.wfc-hout { right: -7px; top: 50%; width: 12px; height: 12px; margin-top: -6px; border-radius: 50%; border: 2px solid #fafafa; }
.wfc-hsub { left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px; transform: rotate(45deg); border-radius: 2px; }
.wfc-node.st-done .wfc-hout, .wfc-node.st-done .wfc-hin { background: #6e6e6e; }
.wfc-node.is-sub.st-on .wfc-hsub { background: #8a8a8a; }
/* Ports under a wide step: a diamond on its edge for each sub-node it takes, with its name (* = it needs one) */
.wfc-ports { position: absolute; left: 0; right: 0; top: 100%; height: 0; pointer-events: none; }
.wfc-port { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; }
.wfc-port i { width: 9px; height: 9px; margin-top: -5px; transform: rotate(45deg); border-radius: 2px; background: #fff; border: 1.5px solid #bdbdbd; }
.wfc-port.is-fed i { background: #8a8a8a; border-color: #8a8a8a; }
.wfc-port em { margin-top: 4px; font-style: normal; font-size: 10.5px; font-weight: 500; color: var(--faint); white-space: nowrap; }
.wfc-port em sup { margin-left: 1px; font-size: 9px; color: var(--muted); }
/* The trigger's mark (n8n's lightning), where the work is now ("Now"), and each step's state at its corner */
.wfc-zap { position: absolute; left: -26px; top: 50%; margin-top: -9px; width: 18px; height: 18px; display: grid; place-items: center; color: var(--accent); }
.wfc-zap .i { width: 14px; height: 14px; stroke-width: 2; }
.wfc-now { position: absolute; left: 50%; top: -11px; transform: translateX(-50%); z-index: 1; height: 19px; padding: 0 8px; border-radius: 999px; display: grid; place-items: center; background: var(--ink); color: #fff;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.02em; box-shadow: 0 0 0 2.5px #fafafa; white-space: nowrap; }
.wfc-node.is-wide .wfc-now { left: 30px; transform: none; }
.wfc-node.is-now:not(.st-running) .wfc-box { box-shadow: 0 0 0 4px rgba(17, 17, 17, 0.07), 0 12px 26px -14px rgba(0, 0, 0, 0.28); }
.wfc-node.st-running .wfc-now { background: var(--accent); }
.wfc-badge { position: absolute; right: 6px; bottom: 6px; width: 20px; height: 20px; border-radius: 50%; display: none; place-items: center; color: #fff; }
.wfc-node.is-sub .wfc-badge { right: -4px; bottom: -2px; box-shadow: 0 0 0 2px #fafafa; }
.wfc-badge .i { width: 11px; height: 11px; stroke-width: 2.6; }
.st-done > .wfc-box .wfc-badge { display: grid; background: #2f9e5b; }
.st-failed > .wfc-box .wfc-badge { display: grid; background: #c9372c; }
.st-attention > .wfc-box .wfc-badge { display: grid; background: #d38b12; }
.st-running > .wfc-box .wfc-badge { display: grid; background: var(--accent); }
.wfc-spin { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; animation: wfcSpin 0.8s linear infinite; }
@keyframes wfcSpin { to { transform: rotate(360deg); } }
.wfc-prog { position: absolute; left: 10px; right: 10px; bottom: 5px; height: 3px; border-radius: 3px; background: rgba(0, 0, 0, 0.06); overflow: hidden; }
.wfc-prog i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width 600ms var(--ease); }
.wfc-node.st-done .wfc-box { border-color: #8fceaa; }
.wfc-node.st-on .wfc-box { border-color: #b8b8b8; }
.wfc-node.st-failed .wfc-box { border-color: #e2a39d; }
.wfc-node.st-attention .wfc-box { border-color: #e8c27a; }
.wfc-node.st-running .wfc-box { border-color: var(--accent); animation: wfcPulse 1.6s var(--ease) infinite; }
@keyframes wfcPulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(239, 90, 42, 0.16), 0 6px 18px -10px rgba(0, 0, 0, 0.18); } 50% { box-shadow: 0 0 0 9px rgba(239, 90, 42, 0.05), 0 6px 18px -10px rgba(0, 0, 0, 0.18); } }
.wfc-node.st-waiting .wfc-box { border-style: dashed; border-color: #cfcfcf; background: #fdfdfd; box-shadow: none; }
.wfc-node.st-waiting .wfc-vis { color: #a8a8a8; }
.wfc-node.is-wide.st-waiting .wfc-vis { background: #f1f1f1; }
.wfc-node.st-waiting .wfc-txt b, .wfc-node.st-waiting .wfc-cap b { color: var(--muted); }
/* n8n's toolbar over a step: ▶ starts what the step can start now (the same confirmation and price as everywhere else) */
.wfc-bar { position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); z-index: 2; display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 14px -8px rgba(0, 0, 0, 0.3); opacity: 0; pointer-events: none; transition: opacity var(--t-fast) var(--ease); }
.wfc-node:hover .wfc-bar, .wfc-node.is-sel .wfc-bar, .wfc-node:focus-within .wfc-bar { opacity: 1; pointer-events: auto; }
.wfc-node.is-now .wfc-bar { bottom: calc(100% + 14px); }
.wfc-bar button { width: 26px; height: 24px; border-radius: 7px; display: grid; place-items: center; color: var(--ink-2); }
.wfc-bar button:hover { background: var(--s3); color: var(--ink); }

/* The guide: the step happening now, and arrows to walk through the steps one by one */
.wfc-guide { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; align-items: center; gap: 2px; max-width: calc(100% - 24px); padding: 3px;
  border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.05), 0 8px 20px -12px rgba(0, 0, 0, 0.25); cursor: default; }
.wfc-gbtn { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--ink-2); transition: background-color var(--t-fast) var(--ease); }
.wfc-gbtn:hover:not(:disabled) { background: var(--s3); color: var(--ink); }
.wfc-gbtn:disabled { opacity: 0.35; cursor: default; }
.wfc-gmid { min-width: 0; display: flex; border-radius: 999px; }
.wfc-gmid .wf-st { height: 30px; padding: 0 12px; font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.wfc-gmid .wf-st.is-waiting { background: var(--s2); }
/* The canvas tools (bottom left) and the run bar (bottom centre): the next step with its price, and the logs */
/* One bar along the bottom: the tools on the left, the next step in the middle, the logs on the right */
.wfc-foot { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 3; display: flex; align-items: flex-end; gap: 10px; pointer-events: none; }
.wfc-foot > * { pointer-events: auto; }
.wfc-tools { flex: none; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 18px -8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05); }
.wfc-tools button { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: var(--ink-2); transition: background-color var(--t-fast) var(--ease); }
.wfc-tools button:hover { background: var(--s3); }
.wfc-tools .wfc-wide.is-on { background: var(--ink); color: #fff; }
.wfc-run { flex: 1; min-width: 0; display: flex; justify-content: center; cursor: default; pointer-events: none; }
.wfc-run > * { pointer-events: auto; }
.wfc-lb { flex: none; margin-left: auto; }
.wfc-go { max-width: 100%; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.45); }
.wfc.is-narrow .wfc-tools { flex-direction: column; }
.wfc.is-narrow .wfc-tools .wfc-wide { display: none; }
.wfc-run-st .wf-st { height: 34px; padding: 0 14px; font-size: 12.5px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 6px 18px -8px rgba(0, 0, 0, 0.2); }
.wfc-logs-b { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 10px; background: #fff; font-size: 12.5px; font-weight: 500; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 18px -8px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(0, 0, 0, 0.05); transition: background-color var(--t-fast) var(--ease); }
.wfc-logs-b:hover { background: var(--s1); }
.wfc-logs-b.is-on { background: var(--ink); color: #fff; }
.wfc-logs-b em { font-style: normal; font-size: 11px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; display: inline-grid; place-items: center; background: var(--s3); color: var(--ink-2); }
.wfc-logs-b.is-on em { background: rgba(255, 255, 255, 0.18); color: #fff; }
/* The logs: what really happened in this project, newest first */
.wfc-logs { position: absolute; left: 12px; right: 12px; bottom: 62px; z-index: 3; display: flex; flex-direction: column; max-height: min(46%, 340px); border-radius: 14px; background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 50px -24px rgba(0, 0, 0, 0.35); cursor: default; user-select: text; -webkit-user-select: text; animation: wfcSheet 220ms var(--ease-out) both; }
.wfc.has-panel .wfc-logs, .wfc.has-panel .wfc-foot { right: 404px; }
.wfc.is-narrow.has-panel .wfc-foot, .wfc.is-narrow.has-panel .wfc-logs { display: none; }   /* the details cover a narrow canvas */
.wfc-logs-h { display: flex; align-items: center; gap: 8px; padding: 10px 10px 8px 14px; border-bottom: 1px solid var(--line); }
.wfc-logs-h b { font-size: 13.5px; font-weight: 500; }
.wfc-logs-h span { flex: 1; font-size: 12px; color: var(--muted); }
.wfc-logs-b2 { overflow-y: auto; overscroll-behavior: contain; padding: 4px; }
.wfc-log { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 10px; text-align: left; transition: background-color var(--t-fast) var(--ease); }
.wfc-log:hover { background: var(--s1); }
.wfc-log-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--s3); color: var(--ink-2); }
.wfc-log.st-done .wfc-log-ic { background: #eaf6ef; color: #2f9e5b; }
.wfc-log.st-failed .wfc-log-ic { background: #fdf3f2; color: #c9372c; }
.wfc-log.st-attention .wfc-log-ic { background: #fdf6e8; color: #b07610; }
.wfc-log-t { display: grid; gap: 1px; min-width: 0; font-size: 12.5px; line-height: 1.4; }
.wfc-log-t b { font-size: 11px; font-weight: 500; letter-spacing: 0.03em; text-transform: uppercase; color: var(--faint); }
.wfc-log-t span { color: var(--ink-2); overflow-wrap: anywhere; }
.wfc-log-t em { font-style: normal; font-size: 12px; color: var(--muted); }
.wfc-log time { font-size: 11.5px; color: var(--faint); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.wfc-logs-e { padding: 14px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* A step's details, like n8n's: what goes in, its settings, what comes out */
.wfc-panel { position: absolute; top: 12px; right: 12px; bottom: 12px; z-index: 4; width: min(380px, calc(100% - 24px)); overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 16px; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 24px 60px -24px rgba(0, 0, 0, 0.35); cursor: default; user-select: text; -webkit-user-select: text;
  animation: wfcPanel 260ms var(--ease-out) both; }
@keyframes wfcPanel { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes wfcSheet { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
.wfc-ph { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.wfc-ph > div { display: grid; gap: 4px; min-width: 0; }
.wfc-ph b { font-size: 14.5px; font-weight: 500; }
.wfc-ph .wf-st { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.wfc-pic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); color: var(--ink-2); flex-shrink: 0; }
.wfc-pic.st-done { background: var(--ink); color: #fff; } .wfc-pic.st-running { background: var(--accent); color: #fff; }
.wfc-about { margin: 0; padding: 12px 14px 2px; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.wfc-pact { padding: 10px 14px 0; }
.wfc-tabs { display: flex; margin: 12px 14px 0; }
.wfc-tabs button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.wfc-tabs em { font-style: normal; font-size: 10.5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; display: inline-grid; place-items: center; background: rgba(0, 0, 0, 0.06); color: var(--muted); }
.wfc-none { font-size: 13px; color: var(--muted); }
.wfc-io-w { display: grid; gap: 6px; }
.wfc-io-i { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; text-align: left; transition: border-color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease); }
.wfc-io-i:hover { border-color: var(--line-3); background: var(--s1); }
.wfc-io-ic { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--s3); color: var(--muted); }
.wfc-io-i.st-done .wfc-io-ic { background: var(--ink); color: #fff; }
.wfc-io-i.st-run .wfc-io-ic { background: var(--accent); color: #fff; }
.wfc-io-t { display: grid; gap: 1px; min-width: 0; }
.wfc-io-t b { font-size: 12.5px; font-weight: 500; color: var(--ink); }
.wfc-io-t span { font-size: 12px; line-height: 1.4; color: var(--muted); }
.wfc-io-s { font-size: 11px; color: var(--faint); white-space: nowrap; }
.wfc-io-i.st-run .wfc-io-s { color: var(--accent-ink); }
/* The data on a connection, as it really is (n8n shows the items that passed) */
.wfc-data { display: grid; gap: 6px; margin: 0 0 4px 12px; padding: 8px 10px; border-left: 2px solid var(--line-2); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.wfc-data p { margin: 0; overflow-wrap: anywhere; }
.wfc-dk { font-size: 11px; font-weight: 500; color: var(--muted); }
.wfc-dthumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.wfc-dthumbs img { width: 52px; height: 52px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); }
.wfc-made { display: grid; gap: 10px; padding-bottom: 6px; }
/* The thinking levels: each with what it does and its price per answer */
.wfc-sub { margin: 16px 0 8px; font-size: 11px; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--faint); }
.wfc-sub:first-child { margin-top: 0; }
.wfc-pb.wf-node-b { padding: 12px 14px 16px; }
.wf-body.is-wide { grid-template-columns: minmax(0, 1fr); }   /* the chat is hidden, so the canvas is the only column */
.wf-body.is-wide .wf-chat { display: none; }

.wf-node-b { display: grid; gap: 10px; padding: 0 16px 16px 72px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); animation: wfIn 240ms var(--ease-out) both; min-width: 0; }
.wf-node-b p { overflow-wrap: anywhere; }
.wf-node-b .btn { justify-self: start; }
.wf-k { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.wf-k2 { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }
.wf-node-b pre, .wf-prompts pre { white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--ink-2); background: var(--s2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.wf-nd-prompt { display: grid; gap: 6px; }
.wf-nd-prompt + .wf-nd-prompt { padding-top: 10px; border-top: 1px solid var(--line); }
.wf-nd-prod { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 14px; align-items: start; }
.wf-nd-prod img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }
.wf-nd-prod > div { display: grid; gap: 6px; }
.wf-nd-prod .link { justify-self: start; }
.wf-dl { display: grid; gap: 6px; }
.wf-dl > div { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 10px; }
.wf-dl.is-wide > div { grid-template-columns: 96px minmax(0, 1fr); }
.wf-dl dt { color: var(--muted); font-size: 12.5px; }
.wf-dl dd { overflow-wrap: anywhere; }
.wf-nd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 8px; }
.wf-nd-cell { display: grid; gap: 4px; font-size: 11px; color: var(--muted); text-align: center; }
.wf-timeline { display: flex; gap: 3px; height: 30px; }
.wf-timeline span { min-width: 18px; border-radius: 7px; background: var(--ink); color: #fff; display: grid; place-items: center; font-size: 11px; }
.wf-timeline span:nth-child(even) { background: var(--ink-2); }
.wf-tl-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; margin-top: -4px; }
.wf-why { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 10px; background: var(--s2); font-size: 12.5px; line-height: 1.5; }
.wf-why .i { flex-shrink: 0; margin-top: 2px; }
.wf-engines { display: grid; gap: 8px; }
.wf-eng { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.wf-eng.is-on { border-color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }
.wf-eng.is-off { opacity: 0.6; }
.wf-eng-h { display: flex; align-items: center; gap: 10px; }
.wf-eng-h > div { display: grid; min-width: 0; }
.wf-eng-h b { font-size: 13.5px; font-weight: 500; }
.wf-eng-h span { font-size: 12px; color: var(--muted); }
.wf-eng-m { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--muted); }
.wf-eng-m b { color: var(--ink); font-weight: 500; }
.wf-eng .btn { justify-self: start; }
.wf-rec { display: inline-flex; align-items: center; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.wf-in-use { color: var(--ink); font-weight: 500; }
.wf-clip { width: 100%; max-width: 220px; border-radius: 10px; background: #000; }

/* ------------------------------------------------------------------ Storyboard preview */
.wf-prev { display: grid; gap: 16px; max-width: 760px; margin: 0 auto; }
.wf-prev-h h3 { font-size: 20px; font-weight: 500; letter-spacing: -0.022em; line-height: 1.25; }
.wf-prev-h p { font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 4px; }
.wf-set { display: flex; flex-wrap: wrap; gap: 8px; }
.wf-set .chip-btn { height: 30px; font-size: 12.5px; }
.wf-set .chip-btn .i:last-child { color: var(--faint); margin-left: -2px; }
.wf-scenes { display: grid; gap: 12px; }
.wf-scene { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 16px; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); scroll-margin: 24px; }
.wf-scene.is-editing { border-color: var(--line-3); box-shadow: var(--sh-2); }
.wf-scene-m { min-width: 0; align-self: start; }
.wf-scene-i { min-width: 0; display: grid; align-content: start; }
.wf-scene-top { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wf-scene-n { font-weight: 500; color: var(--ink-2); }
.wf-scene-t { display: block; margin-top: 4px; font-size: 15px; font-weight: 500; letter-spacing: -0.012em; }
.wf-scene-s { margin-top: 4px; font-size: 13.5px; color: var(--muted); line-height: 1.5; overflow-wrap: anywhere; }
.wf-scene blockquote { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line-2); font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.wf-scene .input, .wf-scene .textarea { margin-top: 6px; }
.wf-prompts { display: grid; gap: 6px; margin-top: 10px; }
.wf-prompts label { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; margin-top: 4px; }
.wf-prompts .textarea { font-size: 12.5px; line-height: 1.55; }
.wf-scene-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 10px; }
.wf-scene-acts .chip-btn { height: 28px; padding: 0 10px; font-size: 12px; }
.wf-prev-foot { padding-top: 4px; }
.wf-prev-foot .wf-card, .wf-prev-final .wf-card { margin-left: 0; }

.wf-empty { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 64px 16px; color: var(--muted); }
.wf-empty > .i { width: 26px; height: 26px; color: var(--faint); }
.wf-empty b { font-size: 15px; font-weight: 500; color: var(--ink); }
.wf-empty p { font-size: 13.5px; max-width: 360px; line-height: 1.5; }
.wf-empty.is-small { padding: 36px 16px; border: 1px dashed var(--line-2); border-radius: 16px; }

/* ------------------------------------------------------------------ History drawer */
.wf-hist { display: grid; gap: 8px; }
.wf-hist-i { border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: #fff; }
.wf-hist-i[open] { padding-bottom: 12px; }
.wf-hist-i summary { display: flex; align-items: center; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.wf-hist-i summary::-webkit-details-marker { display: none; }
.wf-hist-i summary > span:nth-child(2) { display: grid; min-width: 0; }
.wf-hist-i summary b { font-size: 13.5px; font-weight: 500; }
.wf-hist-i summary span span { font-size: 12px; color: var(--muted); }
.wf-hist-v { font-size: 11.5px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 28px; }
.wf-hist-i .wf-nd-prompt { margin-bottom: 10px; }

/* ------------------------------------------------------------------ Projects home */
.wf-home { max-width: 880px; }
.wf-home-h { text-align: center; max-width: 620px; margin: 12px auto 26px; display: grid; gap: 4px; justify-items: center; }
.wf-start { display: block; border: 1px solid var(--line-2); border-radius: 20px; padding: 14px; background: #fff; box-shadow: var(--sh-2); transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.wf-start:focus-within { border-color: var(--line-3); box-shadow: var(--sh-3); }
.wf-start textarea { display: block; width: 100%; min-height: 84px; border: 0; outline: 0; resize: none; font: inherit; font-size: 16px; line-height: 1.5; background: transparent; color: var(--ink); }
.wf-start textarea::placeholder { color: var(--faint); }
.wf-start-f { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.wf-lens { display: flex; gap: 4px; flex-wrap: wrap; }
.chip-btn.is-on { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 0.5px var(--ink); }
.wf-go { margin-left: auto; }
.wf-steps-h { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 18px; font-size: 12.5px; color: var(--muted); }
.wf-steps-h b { font-weight: 500; color: var(--faint); margin-right: 5px; font-variant-numeric: tabular-nums; }
.wf-steps-h i { color: var(--ghost); display: inline-flex; }
.wf-projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.wf-proj { display: flex; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t) var(--ease); min-width: 0; }
.wf-proj:hover { border-color: var(--line-2); box-shadow: var(--sh-2); transform: translateY(-1px); }
.wf-proj-m { width: 56px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--canvas); display: grid; place-items: center; color: var(--faint); flex-shrink: 0; }
.wf-proj-m img { width: 100%; height: 100%; object-fit: cover; }
.wf-proj-i { min-width: 0; display: grid; align-content: center; gap: 2px; }
.wf-proj-i b { font-size: 14px; font-weight: 500; }
.wf-proj-i span { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------------ Narrower desktops */
@media (max-width: 1180px) {
  .wf-body { grid-template-columns: minmax(340px, 1fr) minmax(360px, 1fr); }
  .wf-thread { padding: 0 20px; }
  .wf-composer { padding: 8px 20px 14px; }
  .wf-scene { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; }
}

/* ------------------------------------------------------------------ Phones and tablets: one view at a time, the page scrolls like the website */
@media (max-width: 860px) {
  /* The page itself scrolls; the chat fills the screen, so the message box sits at the bottom even when the chat is short */
  .wf-app { display: flex; flex-direction: column; height: auto; min-height: calc(100dvh - 62px); }
  .wf-top { height: 50px; padding: 0 8px; border-bottom: 0; }
  .wf-back span, .wf-hide-s { display: none; }
  .wf-title { max-width: none; flex: 1; font-size: 14.5px; }
  /* The tabs stay under the header; a white edge around them hides what scrolls beneath */
  .wf-tabs { display: flex; margin: 2px 12px 6px; position: sticky; top: 66px; z-index: 30; box-shadow: 0 0 0 8px #fff, 0 12px 18px -10px rgba(0, 0, 0, 0.22); }
  .wf-tabs button { flex: 1; }
  .wf-body { display: flex; flex-direction: column; flex: 1; }
  .wf-chat { border-right: 0; display: flex; flex: 1; }
  .wf-msgs { flex: 1; }
  .wf-app[data-tab="workflow"] .wf-chat, .wf-app[data-tab="preview"] .wf-chat { display: none; }
  .wf-app[data-tab="chat"] .wf-side { display: none; }
  .wf-side { display: block; background: #fff; }
  .wf-side-tabs { display: none; }
  .wf-side-b { overflow: visible; padding: 8px 12px 32px; }
  .wf-msgs { overflow: visible; padding: 10px 0 8px; }
  .wf-thread { padding: 0 14px; gap: 16px; }
  .wf-composer { position: sticky; bottom: 0; z-index: 20; padding: 10px 10px calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(rgba(255, 255, 255, 0), #fff 16px); }
  .wf-comp-note { display: none; }
  .wf-comp-note + .wf-send { margin-left: auto; }
  .wf-disc { display: none; }
  .wf-m-user { max-width: 90%; }
  .wf-card, .wf-sugg, .wf-err { margin-left: 0; padding-left: 0; }
  .wf-pics { margin-left: 0; width: 100%; }
  .wf-card { padding: 12px; }
  .wf-scene { grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 10px; }
  .wf-side-b.is-canvas { padding: 0; display: block; }
  .wfc { height: calc(100dvh - 150px); min-height: 440px; border-top: 1px solid var(--line); }
  .wfc-tools .wfc-wide { display: none; }
  .wfc-foot, .wfc.has-panel .wfc-foot { left: 10px; right: 10px; bottom: 10px; gap: 8px; }
  .wfc-logs, .wfc.has-panel .wfc-logs { left: 8px; right: 8px; bottom: 58px; max-height: 56%; }
  .wfc-panel { position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 72dvh; border-radius: 20px 20px 0 0; z-index: 70;
    padding-bottom: env(safe-area-inset-bottom); animation-name: wfcSheet; }
  .wf-prev-foot { padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
  .wf-home-h { margin-top: 0; }
  .wf-start-f .wf-go { width: 100%; justify-content: center; margin-left: 0; }
  .wf-steps-h { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wf-m, .wf-m.is-new, .wf-m-ai.is-new .wf-md > *, .wf-m-ai.is-new .wf-changed, .wf-sugg.is-new .chip-btn, .wf-node-b { animation: none; }
  .wf-orb, .wf-think-t > span { animation: none; }
  .wf-effp, .wf-effp-scrim, .wf-thought-p, .wf-lvl-thumb, .wf-lvl-dt, .wf-lvl-o.is-on .g-fl, .wf-lvl-o.is-on .g-dot { transition: none; animation: none; }
  .wf-think-t > span { transition: none; filter: none; color: var(--muted); background: none; }
  .wf-dots i, .wf-st.is-running i, .wfc-e.st-run, .wfc-node.st-running .wfc-box, .wfc-spin, .wfc-panel, .wfc-logs { animation: none; }
}

/* ------------------------------------------------------------------ The assistant's own mark (ChatGPT / Claude) */
.wf-mark.is-brand { background: #fff; border: 1px solid var(--line); padding: 0; overflow: hidden; }
.wf-mark.is-brand .brand-logo { width: 100%; height: 100%; border: 0; border-radius: 0; background: transparent; }
.wf-mark.is-brand .brand-logo img { width: 66%; height: 66%; }
.is-thinking .wf-mark.is-brand { animation: wfBreath 1.6s var(--ease-in-out, ease-in-out) infinite; }
@keyframes wfBreath { 0%, 100% { transform: scale(1); } 50% { transform: scale(0.92); } }
.wf-pick .brand-logo.xs { width: 18px; height: 18px; border-radius: 6px; }

/* ------------------------------------------------------------------ An offer in the chat: what will be made and its price */
.wf-m-offer { padding-left: 40px; }
.wf-off { display: grid; gap: 2px; max-width: 420px; padding: 14px 14px 12px; border: 1px solid var(--line-2); border-radius: 18px; background: #fff; box-shadow: var(--sh-2); }
.wf-off.is-closed { box-shadow: none; background: var(--s1); border-color: var(--line); }
.wf-off-h { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding-bottom: 8px; }
.wf-off-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--s2); color: var(--ink-2); }
.wf-off-h b { font-size: 14.5px; font-weight: 500; letter-spacing: -0.01em; }
.wf-off-total { font-size: 20px; font-weight: 500; letter-spacing: -0.03em; color: var(--ink); }
.wf-off-total em { font-style: normal; font-size: 11.5px; font-weight: 400; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.wf-off-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.wf-off-row b { font-weight: 500; color: var(--ink); }
.wf-off-acts { display: flex; gap: 6px; margin-top: 10px; }
.wf-off-go { flex: 1; height: 40px; border-radius: 12px; }
.wf-off-bal { margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.wf-off-bal.is-neg, .wf-pay-rows b.is-neg { color: #b3261e; }
.wf-off-done { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 12.5px; color: #2f7d4f; font-weight: 500; }
.wf-off-done.is-off { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------------ Confirm sheet before a button charges credits */
.wf-pay-in { display: grid; gap: 16px; padding: 22px 20px calc(18px + env(safe-area-inset-bottom, 0px)); }
.modal.wf-pay { width: min(420px, 100%); }
.wf-pay-h { display: grid; justify-items: center; gap: 2px; text-align: center; padding-top: 4px; }
.wf-pay-h span { font-size: 14px; color: var(--muted); }
.wf-pay-amt { font-size: 44px; font-weight: 500; letter-spacing: -0.045em; line-height: 1.05; color: var(--ink); }
.wf-pay-amt em { font-style: normal; font-size: 13px; font-weight: 400; letter-spacing: 0; color: var(--muted); margin-left: 6px; }
.wf-pay-rows { background: var(--s1); border-radius: 14px; overflow: hidden; }
.wf-pay-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; font-size: 14px; color: var(--ink-2); }
.wf-pay-rows > div + div { border-top: 1px solid var(--line); }
.wf-pay-rows b { font-weight: 500; color: var(--ink); }
.wf-pay-rows .is-sum span { color: var(--muted); }
.wf-pay-note { margin: -4px 0 0; text-align: center; font-size: 12px; color: var(--muted); }
.wf-pay-acts { display: grid; gap: 6px; }
.wf-pay-acts .btn-lg { height: 52px; border-radius: 14px; }

/* ------------------------------------------------------------------ Phones: no zoom when typing (iOS zooms on text under 16px), a calmer composer */
@media (max-width: 860px), (hover: none) {
  .wf-comp textarea { font-size: 16px; }
  .wf-comp { border-radius: 24px; padding: 8px 8px 8px 16px; }
  .wf-send { width: 38px; height: 38px; }
  .wf-send .i { width: 19px; height: 19px; }
  .wf-m-offer { padding-left: 0; }
  .wf-off { max-width: none; }
}

/* Phones: one short sentence instead of the full explanation (two() in app-workflow.js) */
.t-short { display: none; }
@media (max-width: 860px) {
  .t-long { display: none; }
  .t-short { display: inline; }
  .wf-home-h .page-sub, .wf-hello p, .wf-empty p { text-wrap: balance; }
}

/* A chat order made in its own Studio tool (Motion Control): one card that opens it */
.wf-tool { justify-self: stretch; }
.wf-tool-card { display: flex; align-items: center; gap: 12px; width: min(460px, 100%); margin: 0 auto; padding: 12px 12px 12px 14px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: left; box-shadow: var(--sh-1, 0 1px 2px rgba(0, 0, 0, 0.04)); }
.wf-tool-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--s2); color: var(--ink); }
.wf-tool-t { display: grid; gap: 2px; flex: 1; min-width: 0; }
.wf-tool-t b { font-size: 14px; font-weight: 500; color: var(--ink); }
.wf-tool-t span { font-size: 12.5px; color: var(--muted); }
.wf-tool-card .btn .i { margin-left: 4px; }

/* ------------------------------------------------------------------ The whole Studio from the chat (2026-10-20)
   Cards the chat's tools leave, built from the same pieces as the offer card, the tool card and the pictures above */
.wf-off.has-plan { max-width: 560px; }
.wf-off-facts { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0 2px; border-top: 1px solid var(--line); }
.wf-off-note { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.wf-off-more { margin-top: 6px; font-size: 12px; color: var(--muted); }
.wf-off-more summary { cursor: pointer; width: fit-content; color: var(--ink-2); font-weight: 500; }
.wf-off-more p { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: var(--s1); border: 1px solid var(--line); color: var(--ink-2);
  line-height: 1.5; white-space: pre-wrap; max-height: 180px; overflow: auto; }
.wf-off-plan { padding-top: 6px; }
.wf-off-plan .sp { width: 100%; padding: 0; border: 0; box-shadow: none; background: transparent; gap: 10px; }
.wf-off-plan .sp-list { max-height: 260px; }
.wf-off-who { display: flex; align-items: center; gap: 12px; padding: 8px 0 4px; border-top: 1px solid var(--line); }
.wf-off-who img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); flex: none; }
.wf-off-who div { display: grid; gap: 2px; min-width: 0; }
.wf-off-who b { font-size: 14px; font-weight: 500; color: var(--ink); }
.wf-off-who span { font-size: 12px; line-height: 1.45; color: var(--muted); }
.wf-pic.is-video video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.wf-pic.is-video figcaption { top: 8px; bottom: auto; }
.wf-pic.is-off { background: var(--s1); }
.wf-att.is-video video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.wf-att.is-video em { display: inline-flex; align-items: center; gap: 4px; }
.wf-chip-vid { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--s2); color: var(--ink-2); }
.wf-tool-card.is-done { background: var(--s1); box-shadow: none; }
.wf-tool-img { width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex: none; border: 1px solid var(--line); }
@media (max-width: 860px) {
  .wf-off.has-plan { max-width: none; }
  /* phones: the text gets the card's width, the button sits under it */
  .wf-tool-card { display: grid; grid-template-columns: 40px minmax(0, 1fr); row-gap: 10px; }
  .wf-tool-card .btn { grid-column: 2; justify-self: start; }
}
.wf-off-done.is-busy { color: var(--ink-2); font-weight: 400; gap: 8px; }
