/* ==========================================================================
   Product versions (2026-10-04) — versions.js. V1 · V2 tabs on a product, a version's page, the compare view.
   Same system: yellow = waiting for someone, black = the one open / done.
   ========================================================================== */

/* ── the strip: V1 · V2 · … ─────────────────────────────────────────────── */
.pv-strip { display: flex; flex-direction: row; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 12px; }
.pv-tabs { display: flex; flex-direction: row; align-items: stretch; gap: 8px; flex-wrap: wrap; flex: 1 1 320px; min-width: 0; }
.pv-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 0; max-width: 100%;
  padding: 8px 14px; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface);
  color: var(--ink); font: inherit; cursor: pointer; text-align: left;
}
.pv-tab b { font-size: 13px; overflow-wrap: anywhere; }
.pv-tab span { font-size: 11.5px; color: var(--ink-3); overflow-wrap: anywhere; }
.pv-tab:hover { border-color: var(--ink-3); }
.pv-tab.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.pv-tab.on span { color: var(--on-ink); opacity: .75; }
.pv-tab:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pv-strip-act { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── a version's page ───────────────────────────────────────────────────── */
.pv-head .cpb-head { flex-wrap: wrap; }
.pv-notes { margin: 0 0 10px; font-size: 13px; line-height: 1.55; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.pv-funnel { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pv-fstep { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); min-width: 0; }
.pv-fstep b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pv-fstep span { font-size: 11.5px; color: var(--ink-3); overflow-wrap: anywhere; }

.pv-scripts { display: flex; flex-direction: column; gap: 10px; }
.pv-row { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 16px; border: 1px solid var(--border); min-width: 0; }
.pv-row-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pv-row-head b { font-size: 14px; }
.pv-row-act { margin-left: auto; }
.pv-hook { font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.pv-shared { margin-bottom: 8px; }
.pv-check { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 4px 0 8px; }

/* ── pick the scripts ───────────────────────────────────────────────────── */
.pv-pick-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.pv-pick { display: flex; flex-direction: column; gap: 12px; max-height: min(46vh, 460px); overflow: auto; padding: 2px; margin-bottom: 12px; }
.pv-pick-g { display: flex; flex-direction: column; gap: 6px; }
.pv-pick-g > b { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); overflow-wrap: anywhere; }
.pv-pick-row { display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 12px; background: var(--surface-2); cursor: pointer; min-width: 0; }
.pv-pick-row input { margin-top: 3px; flex-shrink: 0; }
.pv-pick-row.is-in { opacity: .6; cursor: default; }
.pv-pick-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; line-height: 1.45; overflow-wrap: anywhere; }
.pv-pick-txt [dir="auto"] { unicode-bidi: plaintext; }

/* ── compare ────────────────────────────────────────────────────────────── */
.modal.pv-cmp-modal { width: min(1100px, calc(100vw - 32px)); }
.pv-cmp { display: flex; flex-direction: column; gap: 10px; max-height: 70vh; overflow: auto; }
.pv-cmp-row { display: grid; gap: 10px; align-items: start; min-width: 0; }
.pv-cmp-headrow { position: sticky; top: 0; z-index: 1; background: var(--surface); padding: 4px 0 8px; }
.pv-cmp-headrow b { display: flex; flex-direction: column; gap: 1px; font-size: 14px; min-width: 0; }
.pv-cmp-headrow .hint { font-weight: 400; overflow-wrap: anywhere; }
.pv-cmp-sid { font-size: 13px; padding-top: 6px; overflow-wrap: anywhere; }
.pv-cmp-cell { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-cmp-cell video { width: 100%; aspect-ratio: 9 / 16; max-height: 52vh; border-radius: 12px; background: #000; object-fit: contain; }
.pv-cmp-cell.is-empty { align-items: center; justify-content: center; min-height: 80px; border-radius: 12px; border: 1px dashed var(--border-strong); }
.pv-cmp-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .pv-funnel { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-cmp-row { grid-template-columns: 52px repeat(auto-fit, minmax(0, 1fr)) !important; }
}

/* ── modern pass (2026-10-04): the strip as a segmented control, a pill that slides to the open version (pvPill) ── */
.pv-strip { padding: 10px; gap: 14px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border-color: var(--border-strong); }
.pv-tabs {
  position: relative; flex: 0 1 auto; gap: 4px; padding: 4px; border-radius: 18px;
  background: var(--plane); box-shadow: inset 0 0 0 1px var(--border);
}
.pv-strip-act { margin-left: auto; }
.pv-tab {
  position: relative; z-index: 1; border: 0; background: transparent; padding: 9px 16px; border-radius: 14px; gap: 2px;
  transition: color .25s ease, background .2s ease, transform .2s cubic-bezier(.22, 1, .36, 1);
}
.pv-tab b { font-size: 13.5px; font-weight: 700; letter-spacing: -.005em; }
.pv-tab:hover { background: var(--wash); }
.pv-tab:active { transform: scale(.97); }
.pv-tab.on { background: var(--ink); color: var(--on-ink); }
.pv-tab.on span { transition: color .25s ease; }
.pv-pill {
  position: absolute; left: 0; top: 0; z-index: 0; width: 0; height: 0; border-radius: 14px; pointer-events: none; opacity: 0;
  background: var(--ink); box-shadow: 0 8px 22px -10px rgba(0, 0, 0, .55);
}
.pv-tabs.has-pill .pv-pill { opacity: 1; }
.pv-tabs.has-pill .pv-tab.on { background: transparent; }
.pv-tabs.has-pill .pv-tab.on:hover { background: transparent; }
.pv-pill.is-moving { transition: transform .45s cubic-bezier(.22, 1, .36, 1), width .45s cubic-bezier(.22, 1, .36, 1), height .45s cubic-bezier(.22, 1, .36, 1); }
.pv-strip-act .btn { transition: background .2s ease, border-color .2s ease, transform .2s cubic-bezier(.22, 1, .36, 1); }
.pv-strip-act .btn:hover { border-color: var(--ink-3); }
#pv-compare svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
#pv-compare:hover svg { transform: rotate(180deg); }
#pv-new .i { transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
#pv-new:hover .i { transform: rotate(90deg); }
@media (max-width: 720px) { .pv-tabs { flex: 1 1 100%; } .pv-strip-act { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) {
  .pv-tab, .pv-pill.is-moving, #pv-compare svg, #pv-new .i { transition: none; }
  #pv-compare:hover svg, #pv-new:hover .i { transform: none; }
}

/* ── a version's own scripts (054) ─────────────────────────────────────── */
.pv-own { display: flex; flex-direction: column; gap: 10px; }
.pv-own > .hint { margin: 0; }
.pv-files { display: flex; flex-direction: column; gap: 6px; }
.pv-file { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 12px; border-radius: 12px; background: var(--surface-2); min-width: 0; }
.pv-file b { font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.pv-file .hint { flex: 1 1 160px; min-width: 0; overflow-wrap: anywhere; }
.pv-own-list { display: flex; flex-direction: column; gap: 8px; }
.pv-own-row { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--border); min-width: 0; }
.pv-own-row .pv-row-act { display: inline-flex; gap: 4px; }
.pv-own-lines { margin: 0; padding: 0 0 0 22px; font-size: 13px; line-height: 1.6; color: var(--ink-2); unicode-bidi: plaintext; overflow-wrap: anywhere; }
.pv-write-body { font-size: 15px; line-height: 1.7; unicode-bidi: plaintext; }

/* the version's scripts by angle (057) */
.pv-angle-head { margin: 14px 0 4px; font-size: 13px; font-weight: 800; letter-spacing: -.01em; color: var(--ink); unicode-bidi: plaintext; }
.pv-angle-head:first-child { margin-top: 2px; }
.pv-angle-head .hint { font-weight: 600; margin-left: 6px; }

/* ── Progress (2026-10-07): the version's road — 1 Product · 2 Footage · 3 Scripts · 4 Voices · 5 Editing · 6 Ads ──
   yellow = your turn, lilac = someone else is on it, black = done, outlined = not started. */
.pv-prog { display: flex; flex-direction: column; gap: 14px; }
.pv-prog .pv-notes { margin: 0; }
.pv-now {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; min-width: 0; padding: 12px 16px; border-radius: 16px;
  border: 0; font: inherit; text-align: left; color: var(--ink); background: var(--surface-2); cursor: pointer;
}
.pv-now b { font-size: 15px; overflow-wrap: anywhere; flex: 1 1 200px; min-width: 0; }
.pv-now .pv-now-k { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; opacity: .75; }
.pv-now.is-you { background: var(--act); color: var(--act-ink); }
.pv-now.is-them { background: var(--motion); color: var(--motion-ink); }
.pv-now.is-done { cursor: default; }
.pv-now:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pv-road { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; counter-reset: none; }
.pv-road > li { min-width: 0; position: relative; }
.pv-road > li:not(:last-child)::after {   /* the line to the next step */
  content: ''; position: absolute; top: 25px; right: -8px; width: 8px; height: 2px; background: var(--border-strong);
}
.pv-road > li.is-done:not(:last-child)::after { background: var(--settled); }
.pv-road-a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; width: 100%; height: 100%; min-width: 0; padding: 12px;
  border-radius: 16px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer;
  transition: transform .2s cubic-bezier(.22, 1, .36, 1), border-color .2s ease;
}
.pv-road-a:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.pv-road-a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pv-road-n {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%;
  font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; border: 1.5px dashed var(--border-strong); color: var(--ink-3);
}
.pv-road-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pv-road-t b { font-size: 13.5px; }
.pv-road-t span { font-size: 12px; line-height: 1.35; color: var(--ink-3); overflow-wrap: anywhere; }
.pv-road .is-done .pv-road-n { border: 0; background: var(--settled); color: var(--settled-ink); }
.pv-road .is-you .pv-road-a { border-color: transparent; background: var(--act); color: var(--act-ink); }
.pv-road .is-you .pv-road-n { border: 0; background: var(--act-ink); color: var(--act); }
.pv-road .is-you .pv-road-t span { color: var(--act-mute); }
.pv-road .is-them .pv-road-a { border-color: transparent; background: var(--motion); color: var(--motion-ink); }
.pv-road .is-them .pv-road-n { border: 0; background: var(--motion-ink); color: var(--motion); }
.pv-road .is-them .pv-road-t span { color: var(--motion-mute); }
.pv-happened { display: flex; flex-direction: column; gap: 6px; }
.pv-happened-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.pv-happened ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.pv-happened li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: baseline; padding: 6px 0; font-size: 13px; border-top: 1px solid var(--border); }
.pv-happened li:first-child { border-top: 0; }
.pv-happened li [dir="auto"] { overflow-wrap: anywhere; unicode-bidi: plaintext; }
.pv-happened time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-prog .br-tgrow { margin: 0; }

/* the briefs to the strategist on «Scripts for V2» (076) */
.pv-briefs { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 10px; }
.pv-brief { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); min-width: 0; flex-wrap: wrap; }
.pv-brief-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 220px; font-size: 13px; }
.pv-brief-txt b { font-weight: 600; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.pv-ask-grid { display: grid; grid-template-columns: minmax(110px, 140px) minmax(0, 1fr); gap: 12px; }

@media (max-width: 900px) {
  .pv-road { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pv-road > li::after { display: none; }
}
@media (max-width: 480px) {
  .pv-road { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pv-ask-grid { grid-template-columns: 1fr; }
  .pv-happened li { grid-template-columns: 22px minmax(0, 1fr); }
  .pv-happened time { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) { .pv-road-a { transition: none; } .pv-road-a:hover { transform: none; } }

/* a version's ads: tick several, one remark for all (2026-10-07) */
.pv-ads .br-tile { position: relative; }
.pv-vsel {
  position: absolute; top: 10px; right: 10px; z-index: 3; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px 5px 8px;
  border-radius: 999px; background: rgba(15, 15, 15, .72); color: #fff; font-size: 12px; font-weight: 600; cursor: pointer; backdrop-filter: blur(6px);
}
.pv-vsel input { width: 16px; height: 16px; margin: 0; accent-color: var(--act); cursor: pointer; }
.pv-ads .br-tile.is-picked .br-thumb { outline: 3px solid var(--act); outline-offset: 2px; }
.pv-ads .br-tile.is-picked .pv-vsel { background: var(--act); color: var(--act-ink); }
.pv-selbar {
  position: sticky; top: calc(var(--topbar-h) + 64px); z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 12px; border-radius: 14px; background: var(--act); color: var(--act-ink);
}
.pv-selbar b { margin-right: auto; }
.pv-selbar .btn-ghost { color: var(--act-ink); }

/* «Scripts for V2», calmer (2026-10-07): counts, folded angles, one state per script, its words on a tap */
.pv-otally { display: flex; gap: 6px; flex-wrap: wrap; }
.pv-oadd { align-items: center; }
.pv-oadd-k { font-size: 12px; color: var(--ink-3); margin: 0 2px 0 8px; }
.pv-ogroups { display: flex; flex-direction: column; gap: 8px; }
.pv-ogroup { border: 1px solid var(--border); border-radius: 16px; min-width: 0; }
.pv-ogroup > summary {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; list-style: none;
}
.pv-ogroup > summary::-webkit-details-marker { display: none; }
.pv-ogroup > summary::before { content: '▸'; color: var(--ink-3); transition: transform .2s ease; }
.pv-ogroup[open] > summary::before { transform: rotate(90deg); }
.pv-ogroup > summary b { font-size: 14px; min-width: 0; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.pv-orows { display: flex; flex-direction: column; padding: 0 14px 10px; }
.pv-orow { display: flex; flex-direction: column; gap: 4px; padding: 8px 0; border-top: 1px solid var(--border); min-width: 0; }
.pv-orow-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-onum { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; min-width: 28px; }
.pv-orow .pv-row-act { display: inline-flex; gap: 2px; margin-left: auto; }
.pv-owords > summary { cursor: pointer; font-size: 13.5px; line-height: 1.5; color: var(--ink); unicode-bidi: plaintext; overflow-wrap: anywhere; list-style: none; }
.pv-owords > summary::-webkit-details-marker { display: none; }
.pv-owords[open] > summary { color: var(--ink-3); }
.pv-owords ol { margin: 6px 0 2px; padding: 0; padding-inline-start: 22px; font-size: 13px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
@media (prefers-reduced-motion: reduce) { .pv-ogroup > summary::before { transition: none; } }

/* the ads: what is being edited, and the strategist's remarks on an ad to approve (2026-10-07) */
.pv-editing { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; }
.pv-editing b { margin-right: 4px; }
.st-adrem { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--act); color: var(--act-ink); min-width: 0; }
.st-adrem-h { font-size: 12px; font-weight: 800; }
.st-adrem-l { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.45; min-width: 0; }
.st-adrem-l b { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.st-adrem-l span { min-width: 0; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.st-adrem-more { align-self: flex-start; border: 0; padding: 0; background: none; font: inherit; font-size: 12px; font-weight: 700; color: var(--act-ink); text-decoration: underline; cursor: pointer; }
.st-adrem-act { display: flex; gap: 6px; flex-wrap: wrap; }
.st-adrem .btn-accent { background: var(--act-ink); color: var(--act); border-color: var(--act-ink); }
.st-adrem .btn-ghost { color: var(--act-ink); }

/* the footage finder at work, under the steps (2026-10-07) */
.pv-finder { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 16px; background: var(--motion); color: var(--motion-ink); }
.pv-finder.is-you { background: var(--act); color: var(--act-ink); }
.pv-finder-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13px; }
.pv-finder-top > span { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.pv-finder-top > span > span { opacity: .8; overflow-wrap: anywhere; }
.pv-finder-pct { font-size: 18px; font-variant-numeric: tabular-nums; }
.pv-finder-bar { height: 8px; border-radius: 999px; background: rgba(15, 15, 15, .14); overflow: hidden; }
.pv-finder-bar i { display: block; height: 100%; border-radius: inherit; background: currentColor; transition: width .6s cubic-bezier(.22, 1, .36, 1); }
.pv-finder-steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; font-size: 11.5px; }
.pv-finder-steps li { padding: 2px 8px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(15, 15, 15, .2); opacity: .7; }
.pv-finder-steps li.is-done { opacity: 1; background: rgba(15, 15, 15, .12); box-shadow: none; }
.pv-finder-steps li.is-done::before { content: '✓ '; }
.pv-finder-steps li.is-cur { opacity: 1; background: currentColor; box-shadow: none; }
.pv-finder-steps li.is-cur { color: var(--motion); background: var(--motion-ink); }
.pv-finder.is-you .pv-finder-steps li.is-cur { color: var(--act); background: var(--act-ink); }
@media (prefers-reduced-motion: reduce) { .pv-finder-bar i { transition: none; } }
