/* ============================================================
   Workflow infographics — the scroll-driven stage on /for/ pages.
   Behaviour: /assets/workflow.js · scenes: /assets/wf-<scene>.js
   Page tokens come from persona.css (--bg, --ink, --rule, --accent…);
   the window inside the stage is a replica of the Doza Assist app and
   uses the app's own tokens (core/static/style.css), prefixed --da-.

   Desktop: steps on the left, the stage sticky on the right.
   ≤880px: the stage sticks under the header and the steps slide
   beneath it, read in the band below.
   Without JS the stage is hidden and the steps read as a plain list.
   ============================================================ */
.wf{
  --wf-top: 96px;
  --wf-green: #3F9D75;
  --wf-amber: #E9BE5E;
  margin: 30px 0 48px;
  position: relative;
}
.wf-body{
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 4.5vw, 72px);
  align-items: start;
}

/* ---- steps ---- */
.wf-steps{ grid-column: 1; grid-row: 1; list-style: none; padding: 0; margin: 0; max-width: none; position: relative; }
.wf-step{ margin: 0; padding: 0; }
.wf-step-k{
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--accent-bright); margin-bottom: 12px; display: flex; align-items: center; gap: 12px;
}
.wf-step-k::before{ content: ""; width: 22px; height: 1px; background: currentColor; opacity: .7; }
.wf-step h3{
  font-family: var(--font-display); font-weight: 400; font-size: clamp(21px, 2vw, 26px); line-height: 1.25;
  letter-spacing: -0.005em; color: var(--ink); margin: 0 0 12px;
}
.wf-step h3 em{ font-style: italic; font-weight: 300; color: var(--accent-bright); }
.wf-step p{ font-size: 15.5px; line-height: 1.62; color: var(--ink-mute, rgba(244,241,234,0.72)); margin: 0 0 12px; max-width: 46ch; }
.wf-step p strong{ color: var(--ink); font-weight: 500; }
.wf-facts{ list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: none; }
.wf-facts li{
  margin: 0; padding: 5px 10px; border: 1px solid var(--rule); border-radius: 999px;
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--ink-mute, rgba(244,241,234,0.72)); line-height: 1.3;
}

.wf--live .wf-step{ min-height: 82vh; display: flex; flex-direction: column; justify-content: center; }
.wf--live .wf-step:first-child{ min-height: 82vh; }
/* tall enough that the stage stays pinned while the last step is read */
.wf--live .wf-step:last-child{ min-height: 100vh; min-height: 100svh; }
.wf--live .wf-step-in{ opacity: .26; transition: opacity .5s ease; }
.wf--live .wf-step.is-active .wf-step-in{ opacity: 1; }
/* No JS: the steps are the whole story. */
.wf:not(.wf--live) .wf-stage{ display: none; }
.wf:not(.wf--live) .wf-body{ display: block; }
.wf:not(.wf--live) .wf-step{ padding: 18px 0; border-bottom: 1px solid var(--rule); }

/* ---- stage: step bar, the app window, the headline number ---- */
.wf-stage{
  grid-column: 2; grid-row: 1;
  position: sticky; top: var(--wf-top);
  height: calc(100vh - var(--wf-top) - 20px);
  height: calc(100svh - var(--wf-top) - 20px);
  min-height: 500px; max-height: 820px;
  display: flex; flex-direction: column; gap: 10px;
  isolation: isolate;
}
.wf-stage::before{
  /* a soft accent glow behind the window */
  content: ""; position: absolute; left: 6%; right: 6%; top: 14%; height: 62%; z-index: -1;
  background: radial-gradient(closest-side, rgba(62,111,168,0.22), transparent);
  filter: blur(34px); pointer-events: none;
}
.wf-hud{
  flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 2px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--ink-soft);
}
.wf-hud-step{ min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wf-local{ display: inline-flex; align-items: center; gap: 8px; color: var(--wf-green); white-space: nowrap; }
.wf-local::before{
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
  box-shadow: 0 0 0 3px rgba(63,157,117,0.18);
}

.wf-foot{ flex: none; display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 0 2px; min-height: 58px; }
.wf-stat{ flex: none; }
.wf-stat-n{
  display: block; font-family: var(--font-display); font-weight: 300;
  font-size: clamp(30px, 3.1vw, 44px); line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums; letter-spacing: -0.01em;
}
.wf-stat-l{
  display: block; margin-top: 7px; font-family: var(--font-mono); font-size: 10px;
  letter-spacing: .18em; text-transform: uppercase; color: var(--ink-soft);
}
.wf-foot-r{ flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 9px; padding-bottom: 3px; }
.wf-cap{ position: relative; min-height: 2.6em; width: 100%; text-align: right; }
.wf-cap > span{
  position: absolute; left: 0; right: 0; bottom: 0; white-space: normal; line-height: 1.3;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; color: var(--ink-soft);
  opacity: 0; transition: opacity .45s ease;
}
.wf-cap > span.is-on{ opacity: 1; }
.wf-cap b{ color: var(--ink); font-weight: 500; }
.wf-rail{ width: 132px; height: 2px; border-radius: 2px; background: rgba(244,241,234,0.1); position: relative; overflow: hidden; }
.wf-rail i{
  position: absolute; inset: 0; border-radius: 2px; background: var(--accent-bright);
  transform-origin: left; transform: scaleX(var(--wf-p, 0));
  transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

/* ---- overlays: shown on the steps listed in data-on ---- */
.wf-ov{
  position: absolute; z-index: 3; pointer-events: none;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s ease, transform .7s cubic-bezier(.2,.7,.2,1);
}
.wf-ov.is-on{ opacity: 1; transform: none; transition-delay: .1s; }
.wf-ov[data-anchor]{ left: var(--x, 0); top: var(--y, 0); }

/* annotation voice (the site's, not the app's) */
.wf-note{ font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); line-height: 1.75; }
.wf-note b{ color: var(--ink); font-weight: 500; }
.wf-note .hot{ color: var(--wf-amber); }

/* ============================================================
   The Doza Assist window (replica). Values from the app's CSS,
   scaled to fit the stage.
   ============================================================ */
.wf-win{
  --da-bg: #0a0a0c; --da-bg2: #131316; --da-card: #1a1a1f; --da-hover: #222228; --da-input: #16161b;
  --da-border: #2a2a32; --da-border2: #3a3a44;
  --da-text: #e8e8ec; --da-text2: #8e8e9a; --da-muted: #5a5a66;
  --da-accent: #4a9eff; --da-green: #34d399; --da-purple: #a78bfa; --da-orange: #fb923c; --da-red: #f87171;
  --da-lb: rgba(96,165,250,.42); --da-lg: rgba(110,231,183,.38); --da-lp: rgba(196,181,253,.42);
  --da-lo: rgba(253,186,116,.45); --da-lr: rgba(252,165,165,.42);
  --da-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --da-mono: "SF Mono", SFMono-Regular, ui-monospace, Menlo, monospace;
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden;
  background: var(--da-bg); color: var(--da-text); font-family: var(--da-font); font-size: 11px; line-height: 1.45;
  border: 1px solid var(--da-border); border-radius: 12px;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.95), 0 0 0 1px rgba(255,255,255,.025);
  -webkit-font-smoothing: antialiased;
}
.wf-win p{ max-width: none; margin: 0; }
.wf-canvas{ position: absolute; inset: 0; z-index: 2; display: block; pointer-events: none; }

/* app header */
.da-bar{
  position: relative; z-index: 1; height: 38px; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px;
  background: var(--da-bg2); border-bottom: 1px solid var(--da-border); font-size: 12px;
}
.da-bar img{ width: 18px; height: 18px; border-radius: 5px; display: block; }
.da-bar b{ font-weight: 600; letter-spacing: -.01em; white-space: nowrap; }
.da-ver{ font-family: var(--da-mono); font-size: 8.5px; color: var(--da-muted); border: 1px solid var(--da-border); border-radius: 4px; padding: 1px 5px; }
.da-bar-r{ margin-left: auto; display: flex; gap: 5px; }
.da-pill{ font-size: 10px; font-weight: 500; padding: 4px 9px; border-radius: 7px; background: var(--da-card); border: 1px solid var(--da-border); color: var(--da-text); white-space: nowrap; }
.da-pill.dim{ color: var(--da-muted); background: transparent; }

/* views (dashboard, project) and the panes inside a project */
.da-view, .da-pane{ position: absolute; opacity: 0; transition: opacity .5s ease; }
.da-view{ left: 0; right: 0; top: 38px; bottom: 0; z-index: 1; }
.da-view.is-on, .da-pane.is-on{ opacity: 1; }
.da-pane{ inset: 0; }

/* shared bits */
.da-cap{ font-size: 8.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--da-text2); }
.da-btn, .da-btn2{
  display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 500; line-height: 1.2;
  padding: 5px 10px; border-radius: 7px; white-space: nowrap; border: 1px solid transparent;
}
.da-btn{ background: var(--da-accent); border-color: var(--da-accent); color: #000; }
.da-btn.purple{ background: var(--da-purple); border-color: var(--da-purple); }
.da-btn.green{ background: var(--da-green); border-color: var(--da-green); }
.da-btn2{ background: var(--da-card); border-color: var(--da-border); color: var(--da-text); }
.da-chip{ font-family: var(--da-mono); font-size: 8.5px; color: var(--da-text2); border: 1px solid var(--da-border); border-radius: 5px; padding: 2px 6px; white-space: nowrap; }
.da-play{ flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--da-accent); position: relative; }
.da-play::after{ content: ""; position: absolute; left: 8.5px; top: 6.5px; border-left: 7px solid #0a0a0c; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.da-tc{ font-family: var(--da-mono); font-size: 9.5px; color: var(--da-muted); white-space: nowrap; }
.da-dot{ width: 7px; height: 7px; border-radius: 50%; flex: none; background: currentColor; }

/* dashboard */
.da-dash{ display: flex; flex-direction: column; padding: 14px 16px 12px; }
.da-dash-h{ display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.da-h{ font-size: 16px; font-weight: 600; letter-spacing: -.3px; margin: 0 0 3px; color: var(--da-text); line-height: 1.2; }
.da-sub{ font-size: 10px; color: var(--da-text2); line-height: 1.4; }
.da-dash-btns{ display: flex; gap: 6px; flex: none; }
.da-drop{ border: 1.5px dashed var(--da-border2); border-radius: 12px; background: var(--da-bg2); padding: 9px 11px 10px; margin-bottom: 10px; flex: none; }
.da-drop-row{ display: flex; gap: 8px; margin-top: 6px; }
.da-input{ flex: 1; min-width: 0; font-family: var(--da-mono); font-size: 9.5px; color: var(--da-muted); background: var(--da-input); border: 1px solid var(--da-border); border-radius: 7px; padding: 5px 9px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.da-list{ position: relative; flex: 1 1 auto; min-height: 0; }
.da-row{
  position: absolute; left: 0; right: 0; top: 0; height: 34px; display: flex; align-items: center; gap: 10px;
  padding: 0 10px; background: var(--da-card); border: 1px solid var(--da-accent); border-radius: 8px;
  box-shadow: 0 0 0 3px rgba(74,158,255,.12); opacity: 0; transition: opacity .45s ease .15s;
}
.da-row.is-on{ opacity: 1; }
.da-check{ width: 11px; height: 11px; border-radius: 3px; border: 1px solid var(--da-border2); flex: none; }
.da-row-t{ min-width: 0; flex: 1; }
.da-row-t b{ display: block; font-size: 11px; font-weight: 600; line-height: 1.2; }
.da-row-t span{ display: block; font-size: 8.5px; color: var(--da-text2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-status{ font-size: 8.5px; font-weight: 500; color: var(--da-green); background: rgba(52,211,153,.12); border-radius: 999px; padding: 2px 7px; flex: none; }

/* project */
.da-proj{ display: flex; flex-direction: column; }
.da-proj-h{ display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 11px 14px 8px; flex: none; }
.da-title{ display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: 16px; font-weight: 600; letter-spacing: -.3px; line-height: 1.2; }
.da-seg{ display: inline-flex; align-items: center; gap: 1px; padding: 2px; border-radius: 7px; background: var(--da-bg2); border: 1px solid var(--da-border); font-size: 9px; font-weight: 500; color: var(--da-text2); letter-spacing: 0; }
.da-seg i{ font-style: normal; font-size: 7.5px; letter-spacing: .08em; padding: 0 4px 0 5px; color: var(--da-muted); }
.da-seg span{ padding: 2px 6px; border-radius: 5px; }
.da-seg span.on{ background: var(--da-accent); color: #000; }
.da-meta{ font-size: 9.5px; color: var(--da-text2); margin-top: 4px; }
.da-meta a{ color: var(--da-accent); border: 0; }
.da-tabs{ display: flex; padding: 0 8px; border-bottom: 1px solid var(--da-border); flex: none; overflow: hidden; }
.da-tab{ font-size: 10px; font-weight: 500; color: var(--da-text2); padding: 7px 8px 6px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .35s ease, border-color .35s ease; }
.da-tab.is-on{ color: var(--da-accent); border-bottom-color: var(--da-accent); }
.da-cols{ flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 30% minmax(0, 1fr); gap: 14px; padding: 11px 14px 0; }
.da-left{ min-width: 0; overflow: hidden; }
.da-video{ display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 7px; border: 1px solid var(--da-border); background: #000; }
.da-player{ display: flex; align-items: center; gap: 6px; margin: 7px 0 10px; font-family: var(--da-mono); font-size: 8px; color: var(--da-text2); }
.da-player .da-play{ width: 20px; height: 20px; }
.da-player .da-play::after{ left: 7.5px; top: 5.5px; border-left-width: 6.5px; border-top-width: 4.5px; border-bottom-width: 4.5px; }
.da-scrub{ flex: 1; height: 3px; border-radius: 2px; background: var(--da-border2); }
.da-sec{ border-top: 1px solid var(--da-border); padding-top: 8px; margin-bottom: 8px; }
.da-sec .da-cap{ color: var(--da-muted); display: block; margin-bottom: 4px; }
.da-spk{ display: flex; align-items: center; gap: 7px; font-size: 9.5px; color: var(--da-text); padding: 4px 0; border-bottom: 1px solid rgba(42,42,50,.7); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-spk:last-child{ border-bottom: 0; }
.da-sum-t{ font-size: 10px; font-weight: 600; line-height: 1.35; margin: 2px 0 4px; }
.da-sum{ font-size: 9px; color: var(--da-text2); line-height: 1.45; }
.da-main{ position: relative; min-width: 0; }

/* Transcript tab */
.da-search{ display: flex; align-items: center; gap: 7px; background: var(--da-bg2); border: 1px solid var(--da-border); border-radius: 10px; padding: 5px 10px; font-size: 9.5px; color: var(--da-muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; }
.da-search svg{ flex: none; }
.da-search b{ color: var(--da-text); font-weight: 400; font-family: var(--da-mono); }
.da-labels{ display: flex; align-items: center; gap: 3px; background: var(--da-bg2); border: 1px solid var(--da-border); border-radius: 10px; padding: 3px 5px; margin-bottom: 6px; overflow: hidden; }
.da-sw{ display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--da-text2); padding: 2px 6px; border-radius: 7px; border: 1.5px solid transparent; white-space: nowrap; }
.da-sw.on{ border-color: var(--da-accent); background: rgba(74,158,255,.12); color: var(--da-text); }
.da-labels .r{ margin-left: auto; display: flex; gap: 3px; font-size: 8.5px; color: var(--da-muted); }
.da-labels .r span{ padding: 2px 6px; border-radius: 6px; }
.da-labels .r span + span{ background: var(--da-card); color: var(--da-text2); }
.da-hint{ font-size: 8.5px; color: var(--da-text2); margin-bottom: 7px !important; }
.da-para{ position: relative; margin-bottom: 8px !important; }
.da-ph{ display: flex; align-items: baseline; gap: 6px; margin-bottom: 1px; }
.da-sp{ display: grid; font-size: 10.5px; font-weight: 700; letter-spacing: -.01em; }
.da-sp > span{ grid-area: 1 / 1; transition: opacity .4s ease; white-space: nowrap; }
.da-sep{ color: var(--da-border2); font-size: 9px; }
.da-pt{ font-size: 10.5px; line-height: 1.55; color: var(--da-text); }
.da-pt mark{ color: inherit; border-radius: 3px; padding: 0 1px; background: transparent; transition: background-color .5s ease; }

/* AI Analysis tab */
.da-an-top{ display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.da-sb{ display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; background: var(--da-card); border: 1px solid var(--da-border); border-radius: 8px; padding: 7px 9px; margin-bottom: 5px; }
.da-sb b{ display: block; font-size: 10.5px; font-weight: 500; color: var(--da-text); line-height: 1.3; margin-bottom: 2px; }
.da-sb .q{ display: block; font-size: 9.5px; color: var(--da-text2); line-height: 1.45; }
.da-sb .why{ display: block; font-size: 9px; color: var(--da-muted); line-height: 1.4; margin-top: 3px; }
.da-sb .da-tc{ font-size: 8.5px; padding-top: 2px; }

/* Story Beats (AI Analysis) */
.da-beat{ display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 1px 8px; align-items: center; background: var(--da-card); border: 1px solid var(--da-border); border-radius: 8px; padding: 5px 9px 6px; margin-bottom: 5px; }
.da-beat .da-play{ width: 20px; height: 20px; grid-row: span 2; }
.da-beat .da-play::after{ left: 7.5px; top: 5.5px; border-left-width: 6.5px; border-top-width: 4.5px; border-bottom-width: 4.5px; }
.da-beat b{ font-size: 10px; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-beat .dur{ font-family: var(--da-mono); font-size: 8.5px; color: var(--da-text2); }
.da-beat .wave{ grid-column: 2 / 4; height: 13px; }

/* Clips tab: the Clip Library bar */
.da-clips{ display: flex; flex-direction: column; }
.da-clips > *{ flex: none; }
.da-cl-bar{ display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 2px 0 8px; }
.da-cl-bar em{ font-style: normal; color: var(--da-muted); font-weight: 500; letter-spacing: 0; text-transform: none; margin-left: 6px; }

/* Export tab */
.da-deliver{ display: flex; align-items: center; gap: 8px; background: var(--da-bg2); border: 1px solid var(--da-border); border-radius: 10px; padding: 5px 9px; margin-bottom: 7px; }
.da-deliver .da-seg{ font-size: 9px; }
.da-deliver .da-seg span{ padding: 3px 7px; }
.da-deliver .da-seg span.on{ background: var(--da-card); color: var(--da-text); box-shadow: 0 0 0 1px var(--da-border2); }
.da-card2{ background: var(--da-bg2); border: 1px solid var(--da-border); border-radius: 10px; padding: 9px 11px 10px; }
.da-card2 > .da-cap{ display: block; margin-bottom: 3px; }
.da-card2 .d{ font-size: 9px; color: var(--da-text2); line-height: 1.45; margin-bottom: 7px !important; }
.da-inc{ display: flex; align-items: center; gap: 7px; font-size: 9.5px; padding: 2px 0; color: var(--da-text); }
.da-inc i{ width: 11px; height: 11px; border-radius: 3px; border: 1px solid var(--da-border2); flex: none; position: relative; }
.da-inc i.on{ background: var(--da-accent); border-color: var(--da-accent); }
.da-inc i.on::after{ content: ""; position: absolute; left: 3.5px; top: 1px; width: 3px; height: 6px; border: solid #0a0a0c; border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); }
.da-fields{ display: flex; gap: 10px; margin-top: 7px; }
.da-fields > div{ flex: 1; min-width: 0; }
.da-select{ margin-top: 3px; font-size: 9.5px; background: var(--da-input); border: 1px solid var(--da-border); border-radius: 6px; padding: 3px 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* timeline preview (drawn by the particles; labels here) */
.da-tl{ position: relative; margin-top: 9px; }
.da-tl-h{ display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.da-ruler{ display: flex; justify-content: space-between; font-family: var(--da-mono); font-size: 8px; color: var(--da-muted); border-bottom: 1px solid var(--da-border); padding-bottom: 2px; }
.da-tracks{ position: relative; }
.da-tracks > span{ position: absolute; left: 0; font-family: var(--da-mono); font-size: 8px; color: var(--da-muted); }

/* swaps: children share one cell and cross-fade by step */
.da-swap{ display: grid; }
.da-swap > *{ grid-area: 1 / 1; min-width: 0; }
.da-bar-r .da-swap > *{ justify-self: end; }
.da-fade{ transition: opacity .45s ease; }
.da-fade:not(.is-on){ opacity: 0; }

/* transcript pane: search, labels, hint, readable rows, then the particle skeleton */
.da-tr{ display: flex; flex-direction: column; }
.da-tr > *{ flex: none; }
.da-rows{ height: 168px; overflow: hidden; align-content: start; }
.da-skel{ flex: 1 1 auto; min-height: 0; }
.da-sp .s-may{ color: var(--da-accent); }
.da-sp .s-int{ color: #7bc46c; }
.da-sp .s-pan{ color: #f97162; }
.da-sp .g{ color: var(--da-text2); }
mark.lb{ background: var(--da-lb); } mark.lg{ background: var(--da-lg); } mark.lp{ background: var(--da-lp); }
mark.lo{ background: var(--da-lo); } mark.lr{ background: var(--da-lr); }

/* the transcript editor's popup (double-click a word) */
.da-fix{ position: relative; border-radius: 2px; }
.da-edit{
  position: absolute; left: -6px; top: calc(100% + 5px); z-index: 2; display: flex; flex-direction: column; gap: 5px;
  padding: 6px; background: var(--da-card); border: 1px solid var(--da-border2); border-radius: 8px;
  box-shadow: 0 12px 28px -8px rgba(0,0,0,.8); opacity: 0; transform: translateY(-4px);
  transition: opacity .35s ease .25s, transform .45s ease .25s; pointer-events: none; white-space: nowrap;
}
.da-edit-in{ font-size: 10.5px; padding: 3px 7px; border-radius: 5px; background: var(--da-input); border: 1px solid var(--da-accent); box-shadow: 0 0 0 2px rgba(74,158,255,.15); color: var(--da-text); }
.da-edit-in::after{ content: ""; display: inline-block; width: 1px; height: 11px; margin-left: 1px; vertical-align: -1px; background: var(--da-accent); }
.da-edit-b{ display: flex; gap: 3px; font-size: 8.5px; color: var(--da-text2); }
.da-edit-b > *{ padding: 2px 6px; border-radius: 5px; background: var(--da-bg2); border: 1px solid var(--da-border); }
.da-edit-b b{ font-weight: 500; background: var(--da-accent); border-color: var(--da-accent); color: #000; }

/* AI Analysis: caption row, interview map */
.da-capline{ display: flex; justify-content: space-between; align-items: center; margin: 2px 0 6px; }
.da-an{ overflow: hidden; }
.da-mapwrap{ position: absolute; left: 0; right: 0; bottom: 12px; }
.da-map-h{ display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.da-map-h .wf-note, .da-tl-h .wf-note{ font-size: 8.5px; letter-spacing: .12em; }
.da-map{ height: 64px; }
.da-map-t, .da-ruler{ position: relative; height: 12px; font-family: var(--da-mono); font-size: 8px; color: var(--da-muted); }
.da-map-t{ margin-top: 3px; border-top: 1px solid var(--da-border); }
.da-map-t span, .da-ruler span{ position: absolute; top: 2px; }
.da-ruler{ border-bottom: 1px solid var(--da-border); margin-bottom: 12px; }
.da-ruler span{ top: 0; }
.da-tracks{ height: 58px; }
.da-clipname{
  font-size: 8px; font-weight: 600; color: #fff; letter-spacing: .01em; white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-width: var(--w, 80px); text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* a file being dragged onto a drop zone (position it per scene) */
.da-dragfile{
  display: flex; align-items: center; gap: 8px; padding: 7px 11px 7px 8px;
  background: #1a1a1f; border: 1px solid #3a3a44; border-radius: 9px;
  box-shadow: 0 18px 40px -12px rgba(0,0,0,.85); font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  font-size: 9px; color: #8e8e9a; transform: translate(10px, -14px) rotate(-3deg);
}
.da-dragfile.is-on{ transform: rotate(-3deg); }
.da-dragfile b{ display: block; font-size: 10px; font-weight: 600; color: #e8e8ec; }
.da-fileicon{ width: 18px; height: 22px; border-radius: 3px; background: linear-gradient(#4a9eff, #2f6fc0); position: relative; flex: none; }
.da-fileicon::after{ content: ""; position: absolute; left: 6px; top: 7px; border-left: 7px solid rgba(255,255,255,.9); border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; }
.da-cursor{ position: absolute; right: -9px; bottom: -12px; width: 14px; height: 14px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 2px #0a0a0c; }
.da-cursor::before, .da-cursor::after{ content: ""; position: absolute; background: #0a0a0c; left: 6px; top: 3px; width: 2px; height: 8px; }
.da-cursor::after{ transform: rotate(90deg); }

@media (prefers-reduced-motion: reduce){
  .wf-ov, .wf--live .wf-step-in, .wf-rail i, .wf-cap > span, .da-view, .da-pane, .da-tab, .da-row, .da-sp > span, .da-fade, .da-edit{ transition-duration: .01s; transition-delay: 0s; }
}

/* ---- phones & small tablets: the stage sticks on top, steps slide under ---- */
@media (max-width: 880px){
  .da-map-t span:last-child{ display: none; }
  .wf{ --wf-top: 64px; }
  .wf-body{ display: block; }
  .wf-stage{
    position: sticky; top: var(--wf-top); z-index: 5;
    height: 56vh; height: 56svh; min-height: 370px; max-height: 540px;
    gap: 6px; padding: 8px 0 6px; background: var(--bg);
    box-shadow: 0 22px 26px -6px var(--bg);
  }
  .wf-stage::before{ display: none; }
  .wf-hud{ font-size: 9px; letter-spacing: .14em; }
  .wf-foot{ min-height: 40px; gap: 10px; }
  .wf-stat-n{ font-size: 26px; }
  .wf-stat-l{ font-size: 8.5px; margin-top: 5px; letter-spacing: .12em; }
  .wf-cap{ display: none; }
  .wf-rail{ width: 72px; }
  .wf-win{ border-radius: 10px; }
  .da-bar{ height: 32px; }
  .da-view{ top: 32px; }
  .da-bar-r .da-pill:not(:last-child){ display: none; }
  .da-cols{ grid-template-columns: minmax(0, 1fr); padding: 9px 10px 0; }
  .da-left{ display: none; }
  .da-proj-h{ padding: 8px 10px 6px; }
  .da-proj-h .da-btn{ display: none; }
  .da-title{ font-size: 14px; }
  .da-tab:nth-child(3), .da-tab:nth-child(4), .da-tab:nth-child(5){ display: none; }
  .da-meta{ display: none; }
  .da-dash{ padding: 10px 10px 8px; }
  .da-dash-btns, .da-sub{ display: none; }
  .wf--live .wf-step{ min-height: 72vh; min-height: 72svh; justify-content: center; }
  .wf--live .wf-step:first-child{ min-height: 56svh; padding-top: 8svh; }
  .wf--live .wf-step:last-child{ min-height: 90svh; }
  .wf--live .wf-step-in{ opacity: .18; }
  .wf-step p{ font-size: 15px; }
}
