/* Signal editor skin. Loaded beside the original editor sheets; removing the
   server's data-app-theme attribute restores those sheets without a release.
   Palette follows source-v7/editor3.py. Only presentation is overridden here:
   panel geometry, mobile sheets, media, captions and editing behavior stay put. */
html[data-app-theme="signal"] .v3 {
  --bg: var(--cm-editor-bg);
  --bg-2: var(--cm-editor-panel);
  --bg-3: var(--cm-editor-raised);
  --bg-4: var(--cm-editor-hover);
  --bg-out: var(--cm-bg);
  --ink: var(--cm-editor-text);
  --ink-2: var(--cm-editor-muted);
  --ink-3: var(--cm-editor-faint);
  --line: var(--cm-editor-line);
  --line-2: var(--cm-editor-line-2);
  --line-3: var(--cm-editor-line-3);
  --ok: var(--cm-soft);
  --warn: var(--cm-warn);
  --err: var(--cm-danger);
  --sage: var(--cm-editor-selection);
  --accent: var(--cm-editor-selection);
  --accent-rgb: var(--cm-editor-selection-rgb);
  --accent-soft: var(--cm-editor-selection-soft);
  --surface: var(--cm-editor-raised);
  --font: var(--cm-font-editor);
  --mono: var(--cm-font-mono);
}
html[data-app-theme="signal"] .v3 :is(h1, h2, h3, h4) { font-family: var(--cm-font-editor); }

/* Header and preview surround from the landing's product editor. */
html[data-app-theme="signal"] .v3-hd { background: var(--cm-editor-bg); }
html[data-app-theme="signal"] .v3 .v3-mid { background: var(--cm-editor-stage); }
html[data-app-theme="signal"] .v3 .v3-styles .v3-pv { background: var(--cm-editor-preview); }
html[data-app-theme="signal"] .v3 .v3-styles .v3-pv.v3-bpv { background: var(--cm-editor-raised); }
html[data-app-theme="signal"] .v3 .v3-lg-pv { background: var(--cm-editor-hover); }

/* Rounded actions use the same neutral CTA treatment as the landing. */
html[data-app-theme="signal"] .v3 .v3-btn { border-radius: var(--cm-radius-pill); }
html[data-app-theme="signal"] .v3 .v3-btn.v3-primary {
  background: var(--cm-accent);
  color: var(--cm-accent-ink);
}
html[data-app-theme="signal"] .v3 .v3-btn.v3-primary:hover { background: var(--cm-text); }
html[data-app-theme="signal"] .v3 .v3-btn.v3-ghost { background: var(--cm-editor-raised); }
html[data-app-theme="signal"] .v3 .v3-btn.v3-ghost:hover { background: var(--cm-editor-hover); }
html[data-app-theme="signal"] .v3 :is(.v3-seg, .v3-srch, .v3-tpl, .v3-in, .v3-stock-picker) {
  border-radius: var(--cm-radius-sm);
}
html[data-app-theme="signal"] .v3 :is(.v3-ib, .v3-tb):hover,
html[data-app-theme="signal"] .v3 .v3-rail button:hover:not(.v3-on) {
  background: var(--cm-editor-hover);
}
html[data-app-theme="signal"] .v3 :is(.v3-seg, .v3-srch, .v3-ta, .v3-tm2 input),
html[data-app-theme="signal"] .v3 .v3-hd :is(.v3-nav, .v3-fmt) {
  background: var(--cm-editor-raised);
}
html[data-app-theme="signal"] .v3 .v3-seg button.v3-on,
html[data-app-theme="signal"] .v3.v3-scale .v3-seg button.v3-on,
html[data-app-theme="signal"] .v3 .v3-hd .v3-fmt button.v3-on {
  background: var(--cm-accent);
  color: var(--cm-accent-ink);
}
html[data-app-theme="signal"] .v3 .v3-seg button:hover:not(.v3-on):not(:disabled),
html[data-app-theme="signal"] .v3 :is(.v3-rail button.v3-on, .v3-tb.v3-on) {
  background: var(--cm-editor-hover);
}
html[data-app-theme="signal"] .v3 .v3-tg input:checked + i,
html[data-app-theme="signal"] .v3 .v3-tg i::after,
html[data-app-theme="signal"] .v3 .v3-pb i,
html[data-app-theme="signal"] .v3 .v3-tabs button.v3-on::after {
  background: var(--cm-accent);
}
html[data-app-theme="signal"] .v3 .v3-tg input:checked + i::after { background: var(--cm-accent-ink); }
html[data-app-theme="signal"] .v3 :is(.v3-tg i, .v3-sl input, .v3-zoomc input, .v3-pb) { background: var(--cm-editor-line-2); }
html[data-app-theme="signal"] .v3 .v3-sl input::-webkit-slider-thumb,
html[data-app-theme="signal"] .v3 .v3-zoomc input::-webkit-slider-thumb { background: var(--cm-accent); }
html[data-app-theme="signal"] .v3 .v3-sl input::-moz-range-thumb,
html[data-app-theme="signal"] .v3 .v3-zoomc input::-moz-range-thumb { background: var(--cm-accent); }
html[data-app-theme="signal"] .v3 .v3-cb input:checked + span {
  background: var(--cm-accent);
  border-color: var(--cm-accent);
}
html[data-app-theme="signal"] .v3 .v3-cb input:checked + span::after { border-color: var(--cm-accent-ink); }
html[data-app-theme="signal"] .v3 .v3-spin {
  border-color: var(--cm-editor-line-2);
  border-top-color: var(--cm-accent);
}
html[data-app-theme="signal"] .v3 :is(button, a, select, input, textarea):focus-visible {
  outline-color: var(--cm-editor-selection);
}
html[data-app-theme="signal"] .v3 :is(.v3-srch, .v3-ta, .v3-in):focus-within {
  border-color: var(--cm-editor-selection);
}

/* Card and menu decoration; the phone's open edges keep their original shape. */
html[data-app-theme="signal"] .v3 :is(.v3-blk2, .v3-why, .v3-result, .v3-logo-tile, .v3-intro-card, .v3-insert-card) {
  background: var(--cm-editor-raised);
  border-color: var(--cm-editor-line);
  border-radius: var(--cm-radius-md);
}
html[data-app-theme="signal"] .v3 :is(.v3-scorepill, .v3-clip-card:hover, .v3-clip-card.v3-on, .v3-xdone),
html[data-app-theme="signal"] .v3 :is(.v3-scn.v3-on, .v3-lys .v3-ly.v3-on) {
  background: var(--cm-editor-hover);
}
html[data-app-theme="signal"] .v3 :is(.v3-bulk.v3-on, .v3-tz.v3-in) { background: var(--cm-editor-raised); }
html[data-app-theme="signal"] .v3 .v3-clip-card .v3-sc {
  color: var(--cm-editor-text);
  background: var(--cm-editor-hover);
}
html[data-app-theme="signal"] .v3 .v3-st.v3-published { border-color: var(--cm-editor-line-3); }
html[data-app-theme="signal"] .v3 :is(.v3-styles .v3-st.v3-on, .v3-layouts .v3-lay.v3-on) {
  border-color: var(--cm-accent);
}
html[data-app-theme="signal"] .v3.v3-scale .v3-styles .v3-st.v3-on {
  border-color: var(--cm-accent);
  background: var(--cm-editor-hover);
  box-shadow: inset 0 0 0 1px var(--cm-accent);
}
html[data-app-theme="signal"] .v3 .v3-sw i.v3-on {
  box-shadow: 0 0 0 .125rem var(--cm-editor-panel), 0 0 0 .2188rem var(--cm-accent);
}
html[data-app-theme="signal"] .v3 .v3-anch i.v3-on {
  background: var(--cm-accent);
  border-color: var(--cm-accent);
}
html[data-app-theme="signal"] .v3 .v3-lys .v3-a::after { background: var(--cm-accent); }
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv { background: var(--cm-editor-raised); }
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv i { background: var(--cm-editor-faint); }
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-auto i:nth-child(2) { background: none; border-color: var(--cm-editor-text); }
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-two i:nth-child(2),
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-cam i:nth-child(1),
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-orig i:nth-child(2) { background: var(--cm-editor-muted); }
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-cam i:nth-child(2),
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-orig i:nth-child(1) { background: var(--cm-editor-hover); }
html[data-app-theme="signal"] .v3 .v3-layouts .v3-pv.v3-lay-pip i:nth-child(2) { background: var(--cm-editor-text); }

/* Transcript and timeline selection, independent of colors in subtitle previews. */
html[data-app-theme="signal"] .v3 .v3-tr .v3-w:hover { background: var(--cm-editor-hover); }
html[data-app-theme="signal"] .v3 .v3-tr .v3-w.v3-now { background: var(--cm-editor-line-2); }
html[data-app-theme="signal"] .v3 .v3-tr .v3-w.v3-sel,
html[data-app-theme="signal"] .v3 .v3-tr .v3-w[contenteditable="true"] { background: var(--cm-editor-selection-soft); }
html[data-app-theme="signal"] .v3 .v3-past .v3-gon,
html[data-app-theme="signal"] .v3 .v3-blk.v3-sc,
html[data-app-theme="signal"] .v3 .v3-blk.v3-ins,
html[data-app-theme="signal"] .v3 .v3-blk.v3-ly:not(.v3-hook),
html[data-app-theme="signal"] .v3 .v3-lane.v3-inserts .v3-blk,
html[data-app-theme="signal"] .v3 .v3-blk.v3-intro {
  background: var(--cm-editor-selection-soft);
  border-color: color-mix(in srgb, var(--cm-editor-selection) 40%, transparent);
  color: var(--cm-editor-text);
}
html[data-app-theme="signal"] .v3 .v3-blk.v3-on,
html[data-app-theme="signal"] .v3 .v3-blk.v3-ly.v3-on,
html[data-app-theme="signal"] .v3 .v3-lane.v3-inserts .v3-blk.v3-on {
  border-color: var(--cm-editor-selection);
  background: color-mix(in srgb, var(--cm-editor-selection) 20%, transparent);
}
html[data-app-theme="signal"] .v3 .v3-mini-scenes i:not(.v3-hook) { background: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .v3-selr {
  background: var(--cm-editor-selection-soft);
  border-color: var(--cm-editor-selection);
}
html[data-app-theme="signal"] .v3 .v3-edge::before,
html[data-app-theme="signal"] .v3 .v3-edge::after,
html[data-app-theme="signal"] .v3 .v3-splitm,
html[data-app-theme="signal"] .v3 .v3-past .v3-ghead { background: var(--cm-accent); }
html[data-app-theme="signal"] .v3 .v3-edge[data-more]:not([data-more=""])::before { color: var(--cm-accent-ink); }

/* Intro, stock inserts, framing controls and emoji UI were added after the
   reference editor. They use its neutral surfaces and blue selection too. */
html[data-app-theme="signal"] .v3 :is(.v3-stock-picker, .v3-insert-search input, .v3-emoji-picker, .v3-emoji-actions) {
  background: var(--cm-editor-raised);
  border-color: var(--cm-editor-line-2);
}
html[data-app-theme="signal"] .v3 .v3-emoji-picker button {
  background: var(--cm-editor-hover);
  color: var(--cm-editor-text);
}
html[data-app-theme="signal"] .v3 .v3-insert-card a { color: var(--cm-editor-muted); }
html[data-app-theme="signal"] .v3 .v3-intro-card.is-selected {
  border-color: var(--cm-editor-selection);
  box-shadow: 0 0 0 1px var(--cm-editor-selection-soft);
}
html[data-app-theme="signal"] .v3 .v3-intro-card input { accent-color: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 :is(.v3-insert-card:hover, .v3-insert-card:focus-within) { border-color: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 :is(.v3-intro-toggle:focus-within, .v3-emoji-hit:hover, .v3-emoji-hit:focus-visible) { outline-color: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .v3-zone-box { border-color: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .v3-zone-box b { color: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .v3-zone-box .v3-hdl { background: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .v3-pv9 { --accent: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .ev-cap.is-selected.can-width .ev-cap-side { background: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 :is(.ev-cap.is-selected, .ev-logo.is-selected) { outline-color: var(--cm-editor-selection); }
html[data-app-theme="signal"] .v3 .v3-intro-sample { background: var(--cm-editor-raised); }
html[data-app-theme="signal"] .v3 .v3-intro-play { background: color-mix(in srgb, var(--cm-editor-raised) 90%, transparent); }
html[data-app-theme="signal"] .v3 .v3-ovl { background: color-mix(in srgb, var(--cm-editor-bg) 92%, transparent); }
html[data-app-theme="signal"] .v3 .v3-layer:not(.v3-pass) { background: color-mix(in srgb, var(--cm-bg) 60%, transparent); }
html[data-app-theme="signal"] .v3 ::-webkit-scrollbar-thumb { background: var(--cm-editor-line-2); }

/* Explicit v2 recovery keeps its current layout and adopts the same palette.
   Media swatches, filter illustrations and rendered subtitle colors are intact. */
html[data-app-theme="signal"] .ev {
  --bg: var(--cm-editor-bg);
  --surface: var(--cm-editor-panel);
  --raised: var(--cm-editor-raised);
  --text: var(--cm-editor-text);
  --muted: var(--cm-editor-muted);
  --faint: var(--cm-editor-faint);
  --line: var(--cm-editor-line);
  --line-strong: var(--cm-editor-line-2);
  --accent: var(--cm-editor-selection);
  --accent-rgb: var(--cm-editor-selection-rgb);
  --accent-soft: var(--cm-editor-selection-soft);
  --sans: var(--cm-font-editor);
  font-family: var(--cm-font-editor);
}
html[data-app-theme="signal"] .ev :is(.ev-left, .ev-right, .ev-lanes, .ev-centre) { border-radius: var(--cm-radius-md); }
html[data-app-theme="signal"] .ev .ev-status.is-saved { background: var(--cm-editor-hover); color: var(--cm-soft); }
html[data-app-theme="signal"] .ev :is(.ev-insert:not(.is-hook), .ev-scene.layout-blur) { background: var(--cm-editor-selection-soft); }
html[data-app-theme="signal"] .ev .ev-hook-look { background: var(--cm-editor-hover); }
/* These islands describe output, not the surrounding UI. The v2 renderer uses
   Nunito for hooks/logos; keeping its original type and sample color preserves
   preview/export parity when the application font changes to Inter/Geist. */
html[data-app-theme="signal"] .ev :is(.ev-frame, .ev-preset-sample, .ev-hook-look-sample) {
  --sans: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html[data-app-theme="signal"] .ev .preset-karaoke .ev-preset-sample { color: rgb(152 181 131); }
