@font-face {
  font-family: "Montserrat";
  src: url("/font/montserrat.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --lightbox: #eef2f5;
  --sheet: #f9fbfc;
  --ink: #22262c;
  --ink-soft: #5b6470;
  --rule: #d6dde4;
  --frame: #17191d;
  --marker: #f2c230;
  --marker-ink: #6b4f00;
  --action: #2f5e9e;
  --action-ink: #ffffff;
  --warn: #b4432f;
  --caution: #9a6110;
  --ok: #2e7d5b;
  --radius-frame: 14px;
  --radius-ui: 8px;
  --head: "Montserrat", -apple-system, system-ui, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --lightbox: #1b1f25;
    --sheet: #232830;
    --ink: #e7eaee;
    --ink-soft: #a3acb8;
    --rule: #353c46;
    --frame: #0d0f12;
    --marker-ink: #f2c230;
    --action: #82aeea;
    --action-ink: #0d1422;
    --warn: #e5826c;
    --caution: #e2a650;
    --ok: #71c9a1;
  }
}

* { box-sizing: border-box; }

html { background: var(--lightbox); }

body {
  margin: 0;
  font: 15px/1.5 var(--body);
  color: var(--ink);
  background: var(--lightbox);
  font-variant-numeric: tabular-nums;
}

h1, h2, h3 {
  font-family: var(--head);
  line-height: 1.15;
  margin: 0 0 .4em;
}
h1 { font-size: 30px; font-weight: 750; letter-spacing: -.01em; }
h2 { font-size: 21px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .7em; max-width: 72ch; }
a { color: var(--action); }
small, .soft { color: var(--ink-soft); }

:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; border-radius: 4px; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 8px; background: var(--sheet); padding: 6px 10px; z-index: 10; }

/* ------------------------------------------------------------------ bar: brand, Create / Productions / Review, More */
.bar {
  display: flex;
  align-items: center;
  gap: 8px 26px;
  padding: 10px 28px;
  min-height: 62px;
  border-bottom: 1px solid var(--rule);
  background: var(--lightbox);
  position: sticky;
  top: 0;
  z-index: 15;
}
.brand {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  justify-self: start;
  align-items: center;
  column-gap: 10px;
  flex: none;
  color: var(--ink);
  text-decoration: none;
}
.brand-mark { grid-row: 1 / span 2; width: 13px; height: 23px; margin: 0 2px; border-radius: 4px; background: var(--frame); box-shadow: 0 0 0 2px var(--marker); }
.brand-name { font: 800 17px/1.1 var(--head); letter-spacing: -.01em; white-space: nowrap; }
.brand-sub { font: 700 9.5px/1.35 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); white-space: nowrap; }
.brand:focus-visible { outline-offset: 5px; }

.nav { display: flex; align-items: center; gap: 2px; flex: none; }
.nav > a, .bar .more-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--ink-soft);
  font: 620 14.5px/1 var(--body);
  text-decoration: none;
  white-space: nowrap;
}
.nav > a:hover, .bar .more-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--sheet) 70%, transparent); }
.nav > a[aria-current="page"], .bar .more-btn.is-current { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.nav svg { flex: none; }
.nav-plus { width: 14px; height: 14px; margin: 0 -2px 0 -3px; color: var(--action); }
.nav-count { min-width: 20px; height: 20px; padding: 0 6px; margin-right: -4px; border-radius: 999px; background: var(--marker); color: #2a2100; font: 750 12px/20px var(--body); text-align: center; }
.nav-count[hidden] { display: none; }

.nav-more { position: relative; }
.bar .more-btn svg { width: 14px; height: 14px; margin-right: -4px; transition: transform .15s ease; }
.bar .more-btn[aria-expanded="true"] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 0 0 1px var(--rule); }
.bar .more-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.more-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -6px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(2, minmax(186px, 1fr));
  gap: 6px;
  padding: 8px;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 14px;
  box-shadow: 0 22px 44px -16px rgb(14 20 30 / .32), 0 2px 8px rgb(14 20 30 / .08);
}
.more-menu[hidden] { display: none; }
.more-col { display: grid; align-content: start; gap: 1px; min-width: 0; }
.more-col + .more-col { border-left: 1px solid var(--rule); padding-left: 6px; }
.more-h { margin: 6px 10px 5px; font: 750 10.5px/1.2 var(--body); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-soft); }
.more-menu a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 560; line-height: 1.25; }
.more-menu a[hidden] { display: none; }
.more-menu a:hover { background: var(--lightbox); }
.more-menu a:focus-visible { outline-offset: -2px; background: var(--lightbox); }
.more-menu a[aria-current="page"] { background: color-mix(in srgb, var(--marker) 26%, var(--sheet)); font-weight: 680; }

.health { margin-left: auto; display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-soft); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); display: inline-block; flex: none; }
.dot.off { background: var(--warn); }
.bar .who { flex-wrap: nowrap; }
@media (max-width: 1180px) {
  .health-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 1024px) {
  .bar { gap: 8px 14px; padding: 10px 20px; }
  .nav > a, .bar .more-btn { padding: 9px 11px; }
}

main { padding: 28px; max-width: 1480px; margin: 0 auto; }
main:focus { outline: none; }

/* ------------------------------------------------------------------ buttons & forms */
button, .btn {
  font: 600 14px/1 var(--body);
  border: 1px solid var(--rule);
  background: var(--sheet);
  color: var(--ink);
  padding: 9px 14px;
  border-radius: var(--radius-ui);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
button:hover { border-color: var(--ink-soft); }
button.primary { background: var(--action); color: var(--action-ink); border-color: var(--action); }
button.approve[aria-pressed="true"] { background: var(--marker); border-color: var(--marker); color: #2a2100; }
button.reject[aria-pressed="true"] { background: transparent; border-color: var(--warn); color: var(--warn); }
button.danger { border-color: var(--warn); color: var(--warn); }
button:disabled { opacity: .5; cursor: not-allowed; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label { display: block; font-weight: 600; font-size: 13px; margin: 10px 0 4px; }
input[type="text"], input[type="password"], input[type="datetime-local"], input[type="number"], select, textarea {
  width: 100%;
  font: 15px/1.4 var(--body);
  color: var(--ink);
  background: var(--lightbox);
  border: 1px solid var(--rule);
  border-radius: var(--radius-ui);
  padding: 9px 10px;
}
textarea { min-height: 84px; resize: vertical; }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }

.panel {
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 20px 22px;
  margin-bottom: 18px;
}

/* ------------------------------------------------------------------ inbox */
.drop {
  border: 2px dashed var(--rule);
  border-radius: 18px;
  padding: 44px 32px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--sheet);
  margin-bottom: 30px;
  transition: border-color .15s, background .15s;
}
.drop.over { border-color: var(--marker); background: color-mix(in srgb, var(--marker) 10%, var(--sheet)); }
.drop h1 { font-size: 34px; }
.drop .path { font: 600 14px var(--body); background: var(--lightbox); padding: 3px 8px; border-radius: 6px; }
.upload-progress { height: 6px; border-radius: 3px; background: var(--rule); overflow: hidden; margin-top: 12px; }
.upload-progress > div { height: 100%; background: var(--marker); width: 0; }

.jobs { display: grid; gap: 12px; }
.job {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 18px;
  align-items: center;
  background: var(--sheet);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 12px 16px;
  color: inherit;
  text-decoration: none;
}
.job:hover { border-color: var(--ink-soft); }
.thumb {
  width: 64px;
  aspect-ratio: 9 / 16;
  background: var(--frame);
  border-radius: 8px;
  object-fit: cover;
}
.job .name { font-weight: 650; font-size: 16px; }
.steps { list-style: none; margin: 8px 0 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; }
.steps li {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
}
.steps li.done { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, var(--rule)); }
.steps li.active { color: var(--ink); border-color: var(--ink); font-weight: 650; }
.state { font-weight: 650; font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--lightbox); }
.state.review { background: var(--marker); color: #2a2100; }
.state.failed { color: var(--warn); }
.empty { color: var(--ink-soft); padding: 26px; text-align: center; border: 1px dashed var(--rule); border-radius: 12px; }

/* ------------------------------------------------------------------ review */
.review-head {
  display: grid;
  grid-template-columns: minmax(200px, 300px) 1fr;
  gap: 26px;
  margin-bottom: 26px;
}
.source video, .cut video {
  width: 100%;
  aspect-ratio: 9 / 16;
  background: var(--frame);
  border-radius: var(--radius-frame);
  display: block;
  object-fit: contain;
}
.brief dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 12px 0; }
.brief dt { color: var(--ink-soft); font-size: 13px; }
.brief dd { margin: 0; }
.transcript { max-height: 160px; overflow: auto; font-size: 14px; background: var(--lightbox); border-radius: 8px; padding: 10px 12px; }
.transcript span.t { color: var(--ink-soft); font-size: 12px; margin-right: 6px; }
.keyframes { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; }
.keyframes figure { margin: 0; flex: 0 0 auto; width: 74px; }
.keyframes img { width: 74px; border-radius: 6px; display: block; }
.keyframes figcaption { font-size: 11px; color: var(--ink-soft); }

.sheet {
  display: grid;
  grid-template-columns: repeat(5, minmax(200px, 1fr));
  gap: 22px;
  align-items: stretch;
}
.cut { position: relative; display: flex; flex-direction: column; }
.cut .actions { margin-top: auto; }
.cut .frame-wrap { position: relative; padding: 10px; }
.cut .marker {
  position: absolute;
  inset: -6px -8px;
  width: calc(100% + 16px);
  height: calc(100% + 12px);
  pointer-events: none;
  overflow: visible;
}
.cut .marker path {
  fill: none;
  stroke: var(--marker);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 2600;
  stroke-dashoffset: 2600;
  opacity: 0;
}
.cut.approved .marker path { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .7s ease-out; }
.cut.rejected .frame-wrap video { filter: grayscale(1) brightness(.6); }
.cut.rejected h3 { text-decoration: line-through; text-decoration-color: var(--warn); }
.cut h3 { margin-top: 10px; }
.cut .num { font-family: var(--head); font-weight: 800; color: var(--ink-soft); margin-right: 6px; }
.cut .hyp { font-size: 13.5px; }
.cut .revnote { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 4px; }
.facts { font-size: 13px; color: var(--ink-soft); margin: 6px 0 8px; }
.flags { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 5px; }
.flags li { font-size: 12.5px; padding-left: 14px; position: relative; }
.flags li::before { content: ""; position: absolute; left: 0; top: .5em; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-soft); }
.flags li.warning::before { background: var(--caution); }
.flags li.error::before { background: var(--warn); }
.flags li.info::before { background: var(--rule); }
.cut .actions { display: flex; gap: 6px; padding-top: 8px; }
.cut .actions button { flex: 1; justify-content: center; }
.cut button.more { width: 100%; justify-content: center; margin-top: 6px; background: transparent; }

.detail { margin-top: 26px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; flex-wrap: wrap; }
.tabs button { border: none; border-radius: 8px 8px 0 0; background: transparent; color: var(--ink-soft); }
.tabs button[aria-selected="true"] { color: var(--ink); box-shadow: inset 0 -3px 0 var(--marker); }
.timeline { font-size: 13px; background: var(--lightbox); border-radius: 8px; padding: 10px 12px; white-space: pre-wrap; }
.checks { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.checks td, .checks th { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.ok-yes { color: var(--ok); font-weight: 650; }
.ok-no { color: var(--warn); font-weight: 650; }
details.cmd summary { cursor: pointer; font-weight: 600; font-size: 13px; }
details.cmd pre { font-size: 11.5px; white-space: pre-wrap; word-break: break-all; background: var(--lightbox); padding: 10px; border-radius: 8px; max-height: 260px; overflow: auto; }
.zones { font-size: 13px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ publishing */
.locks { list-style: none; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: lock; }
.locks li { background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 18px; counter-increment: lock; position: relative; }
.locks li::before {
  content: counter(lock);
  font: 800 13px var(--head);
  width: 26px; height: 26px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: var(--lightbox); margin-bottom: 8px;
}
.locks li.done::before { background: var(--marker); color: #2a2100; }
.locks li.locked { opacity: .65; }
.status-line { font-weight: 650; margin: 4px 0 10px; }
table.queue { width: 100%; border-collapse: collapse; font-size: 14px; }
table.queue th, table.queue td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.queue th { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.pill { font-size: 12px; font-weight: 650; padding: 3px 9px; border-radius: 999px; background: var(--lightbox); white-space: nowrap; }
.pill.published, .pill.dry_run_done { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); color: var(--ok); }
.pill.overdue, .pill.failed, .pill.blocked { background: color-mix(in srgb, var(--warn) 14%, var(--sheet)); color: var(--warn); }
.pill.scheduled { background: color-mix(in srgb, var(--action) 14%, var(--sheet)); color: var(--action); }
.explain { font-size: 13px; color: var(--ink-soft); margin-top: 4px; max-width: 60ch; }

/* ------------------------------------------------------------------ results */
table.metrics { width: 100%; border-collapse: collapse; font-size: 14px; }
table.metrics th, table.metrics td { padding: 7px 8px; border-bottom: 1px solid var(--rule); text-align: right; }
table.metrics th:first-child, table.metrics td:first-child { text-align: left; }
.m-measured { font-weight: 650; }
.m-calculated { font-style: italic; }
.m-unavailable { color: var(--ink-soft); }
.legend { display: flex; gap: 18px; font-size: 13px; color: var(--ink-soft); flex-wrap: wrap; margin: 8px 0 14px; }
.conf { font-weight: 650; }

/* ------------------------------------------------------------------ misc */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
table.plain { width: 100%; border-collapse: collapse; font-size: 14px; }
table.plain th, table.plain td { text-align: left; padding: 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.plain th { font-size: 12.5px; color: var(--ink-soft); font-weight: 600; }
.blocked-note { color: var(--caution); font-weight: 650; }
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%) translateY(140%);
  background: var(--ink);
  color: var(--lightbox);
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform .2s, opacity .2s;
  max-width: min(640px, 92vw);
  z-index: 20;
  opacity: 0;
  visibility: hidden;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }
.toast.error { background: var(--warn); color: #fff; }

@media (max-width: 1100px) {
  .sheet { grid-template-columns: repeat(5, 230px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
  .cut { scroll-snap-align: start; }
  .locks { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  main { padding: 18px 16px; }
  /* two rows: brand, engine dot and the signed-in name; then the four sections across the whole width */
  .bar { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "brand health who" "nav nav nav"; gap: 6px 12px; padding: 9px 16px 7px; min-height: 0; }
  .brand { grid-area: brand; min-width: 0; column-gap: 9px; }
  .brand-name { font-size: 16px; }
  .brand-sub { font-size: 9px; }
  .health { grid-area: health; margin: 0; }
  .bar .who { grid-area: who; gap: 8px; }
  .nav { grid-area: nav; justify-content: space-between; margin: 0 -8px; }
  .nav > a, .bar .more-btn { padding: 8px 10px; font-size: 14px; gap: 6px; }
  .nav-more { position: static; }
  .more-menu { top: calc(100% - 2px); left: 10px; right: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: calc(100dvh - 120px); overflow-y: auto; }
}
@media (max-width: 359px) {
  .nav > a, .bar .more-btn { padding: 8px 6px; font-size: 13.5px; gap: 4px; }
  .nav-plus { display: none; }
  .bar .who button { padding: 5px 8px; }
  .more-menu { grid-template-columns: 1fr; }
  .more-col + .more-col { border-left: 0; border-top: 1px solid var(--rule); padding: 6px 0 0; }
}
@media (max-width: 760px) {
  .drop { grid-template-columns: 1fr; padding: 28px 20px; }
  .review-head, .grid2 { grid-template-columns: 1fr; }
  .brief dl { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---------------------------------------------------------------- V2 creative director */
.tag-v2 {
  font-family: var(--head); font-weight: 800; font-size: 0.72em; letter-spacing: 0.02em;
  padding: 2px 7px; border-radius: 6px; background: var(--marker); color: #2a2100; vertical-align: 0.12em;
}
.rights {
  border: 1.5px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--sheet));
  color: var(--ink); border-radius: var(--radius-ui); padding: 12px 14px; margin: 10px 0 16px;
}
.cut .hook { font-family: var(--head); font-weight: 650; font-size: 13.5px; margin: 4px 0 2px; }
.pill.revised { background: color-mix(in srgb, var(--action) 14%, var(--sheet)); color: var(--action); font-size: 11px; }
.ins-mini { display: flex; gap: 8px; align-items: center; margin: 6px 0 0; font-size: 12px; color: var(--ink-soft); }
.ins-mini img { width: 34px; height: 60px; object-fit: cover; border-radius: 5px; }
.inserts { display: flex; gap: 14px; flex-wrap: wrap; }
.inserts figure { margin: 0; width: 200px; }
.inserts img { width: 200px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-frame); display: block; background: var(--frame); }
.inserts figcaption { font-size: 12.5px; margin-top: 6px; }
.ins-fail { font-size: 13px; color: var(--caution); max-width: 360px; }
.storyboard { width: 100%; max-width: 560px; border-radius: var(--radius-ui); margin-top: 8px; display: block; }
.compare summary { cursor: pointer; }
.v1grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.v1grid figure { margin: 0; }
.v1grid video { width: 100%; aspect-ratio: 9 / 16; border-radius: 10px; background: var(--frame); display: block; }
.v1grid figcaption { font-size: 12px; margin-top: 4px; }
details > summary { cursor: pointer; }

/* ---------------------------------------------------------------- AI comparisons */
.cmp-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px 24px; flex-wrap: wrap; }
.cmp-head p { color: var(--ink-soft); margin-bottom: 0; }
.cmp-run { min-width: 220px; }
.offline {
  border: 1.5px solid var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--sheet));
  border-radius: var(--radius-ui); padding: 12px 14px; margin: 16px 0 20px;
}
.offline strong { color: var(--warn); }
.cmp-layout { display: grid; grid-template-columns: minmax(200px, 250px) minmax(0, 1fr); gap: 22px; align-items: start; }
.cmp-source { position: sticky; top: 74px; padding: 16px; }
.cmp-source h2 { font-size: 17px; }
.cmp-source video { width: 100%; aspect-ratio: 9 / 16; background: var(--frame); border-radius: var(--radius-frame); display: block; object-fit: contain; }
.cmp-source .transcript { max-height: 180px; margin-top: 6px; }
.active-line { margin: 14px 0; font-size: 14px; display: grid; gap: 5px; justify-items: start; }
.active-line .soft { font-size: 12.5px; }
.badge-active { font: 700 11.5px/1 var(--body); padding: 4px 9px; border-radius: 999px; background: var(--marker); color: #2a2100; white-space: nowrap; }
.picks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
button.linkish { background: none; border: none; padding: 0; color: var(--action); font: 600 13px/1.35 var(--body); text-align: left; }
.cmp-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.slotbar { display: flex; align-items: center; gap: 4px; }
.slotbar span { font-weight: 600; font-size: 13px; color: var(--ink-soft); margin-right: 6px; }
.slotbar button { min-width: 38px; justify-content: center; padding: 8px 0; }
.slotbar button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--lightbox); }
label.check { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; font-size: 13.5px; }
.cmp-main > .hint { margin: 8px 0 14px; }
.cmp-grid { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; align-items: start; }
.mcol {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 14px; padding: 14px 14px 10px;
  display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.mcol.active { box-shadow: inset 0 4px 0 var(--marker); }
.mcol.earlier { background: color-mix(in srgb, var(--lightbox) 55%, var(--sheet)); border-style: dashed; }
.mhead h2 { font-size: 19px; margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mtag { font-size: 12px; color: var(--ink-soft); word-break: break-all; }
.mfacts { display: flex; gap: 16px; margin: 8px 0 0; flex-wrap: wrap; }
.mfacts div { display: grid; }
.mfacts dt { font-size: 11.5px; color: var(--ink-soft); }
.mfacts dd { margin: 0; font-weight: 650; font-size: 14px; }
.mslots { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.mslots button {
  padding: 0; border-radius: 8px; overflow: hidden; position: relative; display: block;
  background: var(--frame); border: 2px solid transparent; aspect-ratio: 3 / 4;
}
.mslots button img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .6; transition: opacity .15s; }
.mslots button:hover img { opacity: .85; }
.mslots button[aria-selected="true"] { border-color: var(--marker); }
.mslots button[aria-selected="true"] img { opacity: 1; }
.mslots .n { position: absolute; left: 5px; bottom: 3px; font: 800 13px var(--head); color: #fff; text-shadow: 0 1px 3px rgb(0 0 0 / .8); }
.mslots .star { position: absolute; right: 4px; top: 1px; color: var(--marker); font-size: 14px; text-shadow: 0 1px 2px rgb(0 0 0 / .6); }
.mcard { display: flex; flex-direction: column; }
.mcard .frame-wrap { position: relative; padding: 8px; }
.mcard video {
  width: 100%; aspect-ratio: 9 / 16; max-height: 54vh; background: var(--frame);
  border-radius: var(--radius-frame); display: block; object-fit: contain;
}
.mcard .marker { position: absolute; inset: -4px -6px; width: calc(100% + 12px); height: calc(100% + 8px); pointer-events: none; overflow: visible; }
.mcard .marker path {
  fill: none; stroke: var(--marker); stroke-width: 6; stroke-linecap: round;
  stroke-dasharray: 2600; stroke-dashoffset: 2600; opacity: 0;
}
.mcard.fav .marker path { opacity: 1; stroke-dashoffset: 0; transition: stroke-dashoffset .7s ease-out; }
.vbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-soft); margin: 2px 0 6px; }
.vbar .sound { padding: 5px 10px; font-size: 12.5px; }
.vbar .sound[aria-pressed="true"] { border-color: var(--action); color: var(--action); }
.mcard h3 { margin: 4px 0 2px; }
.mcard .num { font-family: var(--head); font-weight: 800; color: var(--ink-soft); margin-right: 7px; }
.mcard .hook { font-family: var(--head); font-weight: 650; font-size: 15px; margin: 4px 0 8px; }
.nohook { font-size: 13.5px; color: var(--caution); margin: 4px 0 8px; }
.mcard h4 { font: 700 12.5px var(--body); color: var(--ink-soft); margin: 6px 0 4px; }
ul.does { margin: 0 0 8px; padding-left: 18px; font-size: 13.5px; display: grid; gap: 3px; }
.changed { font-size: 13px; }
.mcard .ins-mini img { width: 44px; height: 78px; }
.mcard details.words { font-size: 13px; margin: 4px 0; }
.mreview { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px; }
.mreview .fav[aria-pressed="true"] { background: var(--marker); border-color: var(--marker); color: #2a2100; }
.mreview textarea { min-height: 64px; font-size: 14px; }
.mreview .row { margin-top: 6px; }
.mreview .saved { font-size: 12.5px; color: var(--ink-soft); }
details.reading { font-size: 13.5px; border-top: 1px solid var(--rule); padding-top: 8px; }
details.reading summary { font-weight: 600; }
ul.checklist { list-style: none; padding: 0; margin: 6px 0; display: grid; gap: 4px; }
ul.checklist li::before { content: "\2713"; display: inline-block; width: 1.3em; color: var(--ok); font-weight: 800; }
ul.checklist li.no::before { content: "\2717"; color: var(--warn); }
.vfail {
  background: var(--frame); color: #e8e8ea; border-radius: var(--radius-frame); aspect-ratio: 9 / 16;
  display: grid; place-content: center; text-align: center; gap: 10px; padding: 16px; font-size: 14px;
}
.vfail button { justify-self: center; }

/* V3 columns, hook purpose, insert checks */
.colletter {
  font: 800 13px/1 var(--head); width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
  background: var(--ink); color: var(--lightbox);
}
.pill.v3 { background: color-mix(in srgb, var(--action) 16%, var(--sheet)); color: var(--action); border-color: transparent; }
.pill.exp { border-style: dashed; }
.mcard .hook .fmt { font: 600 11px/1 var(--body); color: var(--ink-soft); border: 1px solid var(--rule); border-radius: 999px; padding: 3px 7px; vertical-align: middle; margin-left: 4px; }
.mcard .purpose { font-size: 13px; color: var(--ink-soft); margin: -4px 0 8px; }
.mcard .idea { font-size: 13.5px; margin: 0 0 6px; }
.ins-mini .tries { display: flex; gap: 4px; margin-top: 6px; }
.ins-mini .tries img { width: 30px; height: 53px; object-fit: cover; border-radius: 4px; opacity: .85; }
img.review-frames { width: 100%; border-radius: 6px; margin-top: 6px; background: var(--frame); }
ul.learned { margin: 4px 0 0; padding-left: 18px; font-size: 13px; }

/* owner feedback (AI Comparisons and job pages) */
.fb { border-top: 1px solid var(--rule); margin-top: 10px; padding-top: 10px; display: grid; gap: 9px; }
.fb-top { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; }
.fb .fav[aria-pressed="true"] { background: var(--marker); border-color: var(--marker); color: #2a2100; }
.fb .verdict, .fb .rating { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.fb .verdict span, .fb .rating span { font-weight: 600; font-size: 12.5px; color: var(--ink-soft); margin-right: 4px; }
.fb .verdict button, .fb .rating button { padding: 5px 11px; font-size: 13px; }
.fb .verdict button[data-verdict="approve"][aria-pressed="true"] { background: var(--ok); border-color: var(--ok); color: #fff; }
.fb .verdict button[data-verdict="reject"][aria-pressed="true"] { background: var(--warn); border-color: var(--warn); color: #fff; }
.fb .rating button { min-width: 32px; justify-content: center; }
.fb .rating button[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--lightbox); }
.fb .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.fb .chip { padding: 4px 9px; font-size: 12px; border-radius: 999px; }
.fb .chip[aria-pressed="true"] { background: color-mix(in srgb, var(--warn) 18%, var(--sheet)); border-color: var(--warn); color: var(--ink); }
.fb .chips.good .chip[aria-pressed="true"] { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); border-color: var(--ok); }
.fb-text { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fb-text label { font-size: 12.5px; margin-bottom: 3px; }
.fb textarea { min-height: 52px; font-size: 13.5px; }
.fb .saved { font-size: 12.5px; color: var(--ink-soft); }
.fb .fb-note { font-size: 12px; margin: 0; }

@media (max-width: 1180px) {
  .cmp-layout { grid-template-columns: 1fr; }
  .cmp-source { position: static; }
  .cmp-source video, .cmp-source .vfail { max-width: 220px; }
  .cmp-grid { grid-template-columns: repeat(var(--cols, 3), minmax(260px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; }
  .mcol { scroll-snap-align: start; }
}
@media (max-width: 760px) {
  .fb-text { grid-template-columns: 1fr; }
  .cmp-source video, .cmp-source .vfail { max-width: 150px; }
  .cmp-grid { grid-template-columns: 1fr; overflow: visible; }
  .slotbar button { min-width: 34px; }
  .mcard video { max-height: 72vh; }
}

/* ---------------------------------------------------------------- AI pipeline */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nowrap { white-space: nowrap; }
.crumbs { font-size: 13px; color: var(--ink-soft); margin: 0 0 6px; }
.lede { font-size: 16px; max-width: 72ch; margin-top: -4px; }
h3.sub { font-size: 14.5px; margin: 20px 0 8px; color: var(--ink-soft); }
.scrollx { overflow-x: auto; }
code { font-size: 12.5px; overflow-wrap: anywhere; }
code.hash { font-size: 11.5px; word-break: break-all; }
table.kv th { width: 32%; font-weight: 600; color: var(--ink-soft); font-size: 13px; }

/* status colours shared by the workflow rail, its legend and the "now" line */
.st-not_started { --st: var(--rule); --st-ink: var(--ink-soft); }
.st-in_progress { --st: var(--action); --st-ink: var(--action); }
.st-awaiting_owner { --st: var(--marker); --st-ink: var(--marker-ink); }
.st-completed { --st: var(--ok); --st-ink: var(--ok); }
.st-failed { --st: var(--warn); --st-ink: var(--warn); }

/* the production as a strip of film: one frame per stage, perforations top and bottom */
.rail {
  list-style: none; margin: 16px 0 8px; padding: 18px 12px; position: relative;
  display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 8px;
  background: var(--frame); border-radius: var(--radius-frame); counter-reset: none;
}
.rail::before, .rail::after {
  content: ""; position: absolute; left: 14px; right: 14px; height: 5px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, rgb(255 255 255 / .16) 0 9px, transparent 9px 19px);
}
.rail::before { top: 6px; }
.rail::after { bottom: 6px; }
.rail .frame {
  background: var(--sheet); border-radius: 7px; padding: 9px 10px 11px; min-height: 132px;
  display: flex; flex-direction: column; gap: 3px; border-top: 5px solid var(--st);
}
.rail .frame.st-not_started { opacity: .86; }
.rail .no { font: 700 11px/1 var(--head); color: var(--ink-soft); }
.rail strong { font-family: var(--head); font-size: 13.5px; line-height: 1.2; }
.rail .st { font-size: 12px; font-weight: 650; color: var(--st-ink); }
.rail .why { font-size: 12px; color: var(--ink-soft); line-height: 1.35; }
.rail.mini { display: inline-flex; gap: 4px; padding: 6px 8px; margin: 0; border-radius: 6px; }
.rail.mini::before, .rail.mini::after { display: none; }
.rail.mini li { width: 14px; height: 20px; border-radius: 3px; background: var(--st); }
.rail.mini li.st-not_started { background: color-mix(in srgb, var(--rule) 55%, var(--frame)); }
.rail-legend { max-width: none; }
.rail-legend span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--st); margin-right: 6px; vertical-align: -1px; }
.now { border-left: 5px solid var(--st); padding: 6px 12px; background: var(--sheet); border-radius: 0 8px 8px 0; max-width: 90ch; }

.needs { border-left: 5px solid var(--marker); }
.pill.ig-connected { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); color: var(--ok); }
.pill.ig-needs_auth, .pill.ig-not_installed { background: color-mix(in srgb, var(--caution) 14%, var(--sheet)); color: var(--caution); }
.pill.ig-human_handoff, .pill.ig-not_applicable { background: var(--lightbox); color: var(--ink-soft); }
.pill.ig-blocked { background: color-mix(in srgb, var(--warn) 14%, var(--sheet)); color: var(--warn); }
.ig h2 .pill { vertical-align: middle; margin-left: 6px; }
.ig-items { margin: 4px 0 10px; padding-left: 18px; max-width: 95ch; }
.ig-items li { margin: 6px 0; }
h3.sub.cat-confirmed { color: var(--ok); }
h3.sub.cat-unsupported { color: var(--warn); }
h3.sub.cat-needs_credits, h3.sub.cat-needs_auth { color: var(--caution); }
.todo { margin: 0; padding-left: 18px; }
.todo li { margin: 4px 0; }
.modelcard { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 10px; color: var(--ink); text-decoration: none; margin-bottom: 10px; }
.modelcard:hover, .modelcard:focus-visible { border-color: var(--ink-soft); }
.modelcard strong { font-family: var(--head); font-size: 17px; }
.modelcard span { font-size: 13.5px; color: var(--ink-soft); }

.pack { display: grid; grid-template-columns: minmax(170px, 300px) 1fr; gap: 22px; align-items: start; margin-bottom: 8px; }
.packimg img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; display: block; background: var(--frame); }
.pack h3 { margin-top: 0; }
.ok-yes { color: var(--ok); font-weight: 600; font-size: 13px; }

.pill.ok, .pill.dbx-connected, .pill.x-completed { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); color: var(--ok); }
.pill.await { background: var(--marker); color: #2a2100; }
.pill.dbx-reconnect_needed, .pill.x-failed { background: color-mix(in srgb, var(--warn) 14%, var(--sheet)); color: var(--warn); }
.pill.dbx-not_connected, .pill.x-retry_wait { background: color-mix(in srgb, var(--caution) 14%, var(--sheet)); color: var(--caution); }
.pill.x-running, .pill.x-finishing, .pill.x-verifying { background: color-mix(in srgb, var(--action) 14%, var(--sheet)); color: var(--action); }
.bar-mini { height: 6px; max-width: 170px; background: var(--lightbox); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.bar-mini span { display: block; height: 100%; background: var(--action); }

.scope-note { background: color-mix(in srgb, var(--caution) 8%, var(--sheet)); border: 1px solid color-mix(in srgb, var(--caution) 35%, var(--rule)); border-radius: 10px; padding: 4px 16px; max-width: 92ch; }
.scope-note h3 { margin-top: 12px; }
.steps-big { padding-left: 22px; max-width: 92ch; }
.steps-big li { margin: 14px 0; }
.steps-big input { max-width: 340px; }
.paths { list-style: none; padding: 0; margin: 8px 0; }
.paths li { padding: 4px 0; border-bottom: 1px dashed var(--rule); font-size: 13.5px; }
.pvs { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.pv { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; }
.pv h3 { margin: 0 0 4px; }

@media (max-width: 1180px) {
  .rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .rail { grid-template-columns: 1fr; padding: 16px 10px; }
  .rail .frame { min-height: 0; }
  .pack { grid-template-columns: 1fr; }
  .packimg img { max-width: 320px; }
  table.kv th { width: auto; }
  table.xfers, table.xfers tbody, table.xfers tr, table.xfers td { display: block; }
  table.xfers tr:first-child { display: none; }
  .rail.mini { gap: 3px; padding: 5px 6px; }
  .rail.mini li { width: 10px; height: 16px; }
  table.xfers tr { border-bottom: 1px solid var(--rule); padding: 8px 0; }
  table.xfers td { border: none; padding: 3px 0; }
}

/* realism pilot: original frame vs ComfyUI candidates (frames on the lightbox; the marker shows the current pick) */
.pthumbs { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 12px; }
.pthumb { display: grid; gap: 4px; justify-items: start; padding: 6px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-ui); min-width: 104px; }
.pthumb img { width: 92px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 6px; background: var(--frame); display: block; }
.pthumb.on { border-color: var(--marker); box-shadow: inset 0 0 0 2px var(--marker); }
.pt-id { font-weight: 650; }
.pill.pc-approved, .pill.g-done, .pill.g-approved { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); color: var(--ok); }
.pill.pc-rejected { background: color-mix(in srgb, var(--warn) 14%, var(--sheet)); color: var(--warn); }
.pill.g-waiting_owner { background: var(--marker); color: #2a2100; }
.pmode { margin-bottom: 12px; }
.pmode button[aria-pressed="true"] { border-color: var(--action); color: var(--action); }
.pside { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 760px; }
.pside figure, .ppack, .psheet { margin: 0; }
.pside img, .pside video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--frame); border-radius: var(--radius-frame); display: block; }
.pside figcaption { margin-top: 6px; font-weight: 650; }
.pswipe { position: relative; width: min(100%, 420px); aspect-ratio: 9 / 16; border-radius: var(--radius-frame); overflow: hidden; background: var(--frame); }
.pswipe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pswipe img.top { clip-path: inset(0 0 0 var(--x)); }
.pswipe .pline { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; background: var(--marker); pointer-events: none; }
.pswipe input { position: absolute; left: 0; right: 0; bottom: 10px; width: 100%; margin: 0; }
.pdetail { margin-top: 16px; max-width: 760px; }
.checks th { width: 150px; }
.pvideo { width: 100%; max-width: 360px; aspect-ratio: 9 / 16; background: var(--frame); border-radius: var(--radius-frame); display: block; margin-bottom: 10px; }
.ppack { display: grid; grid-template-columns: 120px 1fr; gap: 12px; align-items: start; margin-bottom: 12px; }
.ppack img { width: 120px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--frame); }
.ppack figcaption { display: grid; gap: 4px; }
.psheet { margin-bottom: 14px; }
.psheet img { width: 100%; border-radius: 8px; display: block; background: var(--frame); }
.gates { margin: 0; padding-left: 20px; }
.gates li { margin: 6px 0; }
@media (max-width: 640px) {
  .pside { gap: 8px; }
  .ppack { grid-template-columns: 90px 1fr; }
  .ppack img { width: 90px; }
  .checks th { width: auto; }
}

/* realism pilot: Kling A/B */
.pab { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 1040px; margin-bottom: 12px; }
.pab figure { margin: 0; }
.pab video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--frame); border-radius: var(--radius-frame); display: block; }
.pab figcaption { margin-top: 6px; font-weight: 650; }
.pwait { aspect-ratio: 9 / 16; border-radius: var(--radius-frame); border: 1px dashed var(--rule); display: grid; place-items: center; color: var(--ink-soft); padding: 12px; text-align: center; }
.prefs { display: flex; gap: 12px; flex-wrap: wrap; }
.prefs figure { margin: 0; width: 140px; }
.prefs img { width: 140px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 8px; display: block; background: var(--frame); }
.pfind { margin: 10px 0 16px; max-width: 760px; }
.pfind h3 { margin-bottom: 4px; }
.pprompt { margin: 10px 0; max-width: 860px; }
.pprompt summary { cursor: pointer; font-weight: 650; }
.pprompt .prompt { white-space: pre-wrap; font-size: 13px; background: var(--lightbox); padding: 12px; border-radius: 8px; }
[data-choice][aria-pressed="true"] { border-color: var(--ok); color: var(--ok); }
.pweb { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 700px; margin-bottom: 12px; }
.pweb figure { margin: 0; }
.pweb video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--frame); border-radius: var(--radius-frame); display: block; }
.pweb figcaption { margin-top: 6px; font-weight: 650; }
.pweb.three { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 1040px; }
.papi { border-left: 4px solid var(--action); }
.pquality { border-left: 4px solid var(--marker); }
.pshots { border-left: 4px solid var(--marker); }
.pshots .qgrid img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-frame); display: block; background: var(--frame); }
.pshots tr.srow th, .pshots tr.srow td { font-weight: 650; background: var(--lightbox); }
.scomp { display: grid; grid-template-columns: minmax(200px, 280px) 1fr; gap: 16px; align-items: start; margin: 10px 0 16px; }
.scomp figure { margin: 0; }
.scomp video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--frame); border-radius: var(--radius-frame); display: block; }
.scomp .psheet img { max-width: 100%; }
@media (max-width: 640px) { .scomp { grid-template-columns: 1fr; } }
.prefprep { border-left: 4px solid var(--action); }
.refgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; margin: 10px 0 16px; }
.refcard { border: 1px solid var(--rule); border-radius: 10px; padding: 10px; background: var(--sheet); }
.refcard.rec { border-color: var(--action); box-shadow: 0 0 0 1px var(--action); }
.refcard h4 { margin: 8px 0 4px; }
.refpair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.refpair figure { margin: 0; }
.refpair img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; display: block; background: var(--frame); }
.qctl { flex-wrap: wrap; gap: 6px; }
.qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0; }
.qgrid figure { margin: 0; }
.qgrid video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--frame); border-radius: var(--radius-frame); display: block; }
.qgrid figcaption { margin-top: 6px; font-weight: 650; display: grid; gap: 2px; }
.qgrid figcaption .soft { font-weight: 400; font-size: 12.5px; }
.qprompts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.qprompts h4 { margin: 0 0 6px; }
.qprompts .prompt { white-space: pre-wrap; font-size: 13px; background: var(--lightbox); padding: 12px; border-radius: 8px; }
.pill.api { background: color-mix(in srgb, var(--action) 16%, var(--sheet)); color: var(--action); letter-spacing: 0.02em; }
.pcontrol { margin: 8px 0 18px; padding: 12px 14px; border-radius: 8px; background: var(--lightbox); max-width: 900px; }
.pcontrol h3 { margin-top: 0; }
.pill.web { background: color-mix(in srgb, var(--ok) 18%, var(--sheet)); color: var(--ok); letter-spacing: 0.02em; }
.pwebsite { border-left: 4px solid var(--ok); }
.pcmp-wrap { overflow-x: auto; max-width: 100%; }
.pcmp { min-width: 720px; font-size: 13px; }
.pcmp tr.pdiff td:last-child { color: var(--caution); font-weight: 650; }
.pev { display: flex; gap: 12px; flex-wrap: wrap; }
.pev figure { margin: 0; width: 220px; }
.pev img { width: 220px; height: 160px; object-fit: cover; object-position: top; border-radius: 8px; display: block; background: var(--frame); }
@media (max-width: 640px) { .pab, .pweb { gap: 6px; } .prefs figure, .prefs img { width: 100px; } .pev figure, .pev img { width: 140px; } }
.pill.g-blocked { background: color-mix(in srgb, var(--warn) 14%, var(--sheet)); color: var(--warn); }

/* Complete-video variants A/B/C: full-length players, one card per variant, the owner's decision */
.pvariants { border-left: 4px solid var(--action); }
.cvgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.cvgrid figure { margin: 0; }
.cvgrid video { width: 100%; aspect-ratio: 9 / 16; object-fit: contain; background: var(--frame); border-radius: var(--radius-frame); display: block; }
.cvgrid .cvv figcaption strong { color: var(--action); }
.cvgrid figcaption { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; font-size: 14px; }
.cvcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin: 14px 0; }
.cvcard { background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius-ui); padding: 12px 14px; }
.cvcard.chosen { border-color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok); }
.cvcard h3 { margin: 0 0 6px; font-size: 16px; }
.cvcard ul { margin: 4px 0 8px; padding-left: 18px; }
.cvcard table.kv th { white-space: nowrap; }
.cvnote { display: flex; flex-direction: column; gap: 4px; max-width: 560px; margin: 6px 0 10px; font-size: 14px; }
.cvnote textarea { font: inherit; padding: 6px 8px; border: 1px solid var(--rule); border-radius: var(--radius-ui); background: var(--sheet); color: var(--ink); }
.cvstills { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 10px 0; }
.cvstills figure { margin: 0; }
.cvstills img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; border-radius: var(--radius-frame); display: block; background: var(--frame); }
.cvstills figcaption { display: flex; flex-direction: column; font-size: 13px; padding-top: 4px; }
.pvariants tr.srow th, .pvariants tr.srow td { font-weight: 650; background: var(--lightbox); }
@media (max-width: 760px) { .cvgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cvstills { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Runpod upgraded production: preflight and owner steps */
.pcloud { border-left: 4px solid var(--warn); }
.pcloud ol { padding-left: 20px; }
.pcloud ol li { margin: 4px 0; }

/* ------------------------------------------------------------------ video trimmer */
.trim-drop { padding: 26px 30px; }
.trim-drop h2 { margin-bottom: .3em; }
.trim-create { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin: 0 0 16px; padding: 10px 14px; border: 1px solid color-mix(in srgb, var(--caution) 40%, var(--rule)); border-left: 4px solid var(--caution); border-radius: 10px; background: color-mix(in srgb, var(--caution) 9%, var(--sheet)); }
.trim-create p { margin: 0; font-size: 14px; }
.trim-sources { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.trim-src { display: block; background: var(--sheet); border: 1px solid var(--rule); border-radius: 12px; padding: 12px 14px; color: var(--ink); text-decoration: none; }
.trim-src:hover { border-color: var(--ink-soft); }
.trim-src .name { font-weight: 650; margin-top: 10px; overflow-wrap: anywhere; }
.trim-strip { display: block; width: 100%; height: 44px; object-fit: cover; border-radius: 6px; background: var(--frame); }
.trim-pills { margin-top: 8px; }
.trim-stage { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; margin: 14px 0 22px; }
.trim-player video { width: 100%; max-height: min(54vh, 620px); background: var(--frame); border-radius: var(--radius-frame); display: block; }
.trim-side { margin: 0; }
.trim-purpose { border: 0; padding: 0; margin: 0 0 6px; min-width: 0; }
.trim-purpose legend { font: 700 16px/1.2 var(--head); margin-bottom: 4px; padding: 0; }
label.radio { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 14px; margin: 6px 0; cursor: pointer; }
label.radio .hint { margin: 0; font-weight: 400; }
.trim-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.trim-times.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trim-dur { display: block; font: 750 24px/1 var(--head); padding: 8px 0; }
.trim-check { margin: 14px 0 6px; padding: 10px 12px; border-radius: var(--radius-ui); background: var(--lightbox); font-size: 14px; }
.trim-check.ok { background: color-mix(in srgb, var(--ok) 14%, var(--sheet)); }
.trim-check.bad { background: color-mix(in srgb, var(--warn) 12%, var(--sheet)); }
.trim-check ul { margin: 4px 0 0; padding-left: 18px; }
.trim-actions { margin-top: 16px; }
.trim-timeline { margin-bottom: 22px; }
.tl { position: relative; height: 84px; border-radius: 10px; background-color: var(--frame); background-size: 100% 100%; background-repeat: no-repeat; cursor: pointer; touch-action: none; user-select: none; -webkit-user-select: none; }
.tl-shade { position: absolute; top: 0; bottom: 0; background: rgba(13, 15, 18, .66); }
.tl-shade.l { left: 0; border-radius: 10px 0 0 10px; }
.tl-shade.r { right: 0; border-radius: 0 10px 10px 0; }
.tl-sel { position: absolute; top: -3px; bottom: -3px; border-top: 3px solid var(--marker); border-bottom: 3px solid var(--marker); pointer-events: none; }
.tl-h { position: absolute; top: -9px; bottom: -9px; width: 20px; margin-left: -10px; cursor: ew-resize; border-radius: 6px; background: var(--marker); box-shadow: 0 1px 5px rgba(0, 0, 0, .35); touch-action: none; }
.tl-h::after { content: ""; position: absolute; left: 7px; top: 50%; width: 2px; height: 28px; margin-top: -14px; border-left: 2px solid #6b4f00; border-right: 2px solid #6b4f00; }
.tl-h.drag { box-shadow: 0 0 0 4px color-mix(in srgb, var(--marker) 40%, transparent); }
.tl-play { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .55); pointer-events: none; }
.tl-ruler { position: relative; height: 20px; margin: 14px 10px 0; font-size: 12px; color: var(--ink-soft); }
.tl-ruler span { position: absolute; transform: translateX(-50%); white-space: nowrap; }
.trim-list { display: grid; gap: 10px; }
.trim-row { border: 1px solid var(--rule); border-radius: 10px; padding: 12px 14px; background: var(--lightbox); }
.trim-row.new { border-color: var(--marker); }
.trim-row .top { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-bottom: 6px; }
.trim-row video { width: 220px; max-width: 100%; border-radius: 10px; background: var(--frame); margin-top: 10px; display: block; }
.trim-plan { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.trim-plan th, .trim-plan td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.trim-plan .n { text-align: right; }
@media (max-width: 880px) {
  .trim-stage { grid-template-columns: 1fr; }
  .trim-player video { max-height: 52vh; margin: 0 auto; width: auto; max-width: 100%; }
}
@media (max-width: 520px) { .trim-times { grid-template-columns: 1fr 1fr; } }
