:root {
  --bg: #101114;
  --surface: #181a1e;
  --surface-2: #212429;
  --line: #2c2f35;
  --line-strong: #3b3f47;
  --text: #eeeff1;
  --muted: #a0a4ac;
  --faint: #6f737b;
  --accent: #f5b83d;
  --accent-ink: #1a1305;
  --review: #f5b83d;
  --changes: #ff8a66;
  --approved: #4fce8b;
  --bad: #ff6b6b;
  --radius: 10px;
  --radius-small: 7px;
  --gutter: 20px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html { -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 22px; line-height: 1.25; font-weight: 650; }
h2 { font-size: 15px; font-weight: 650; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon { display: inline-flex; width: 18px; height: 18px; flex: none; }
.icon svg { width: 100%; height: 100%; }
.spacer { flex: 1; }

/* Top bar */
.topbar {
  display: flex; align-items: center; gap: 14px;
  height: 54px; padding: 0 var(--gutter);
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; text-decoration: none; }
.brand-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink);
}
.brand-mark .icon { width: 16px; height: 16px; }
.brand-mark.big { width: 46px; height: 46px; border-radius: 12px; }
.brand-mark.big .icon { width: 28px; height: 28px; }
.nav-link { color: var(--muted); text-decoration: none; padding: 6px 4px; }
.nav-link:hover { color: var(--text); }
.nav-button { border: 0; background: transparent; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.nav-who {
  padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text);
  font-size: 13px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 520px) { .nav-who { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 8px 15px;
  border-radius: var(--radius-small); border: 1px solid var(--line-strong);
  background: var(--surface-2); text-decoration: none; font-weight: 550; white-space: nowrap;
}
.btn:hover:not(:disabled) { border-color: var(--faint); }
.btn.small { min-height: 34px; padding: 5px 11px; font-size: 13.5px; }
.btn.small .icon { width: 15px; height: 15px; }
.btn.wide { flex: 1; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: #ffc859; border-color: #ffc859; }
.btn.approve { background: var(--approved); border-color: var(--approved); color: #06240f; }
.btn.approve:hover { background: #66dc9c; border-color: #66dc9c; }
.btn.changes { background: transparent; border-color: var(--changes); color: var(--changes); }
.btn.changes:hover { background: rgba(255, 138, 102, .12); border-color: var(--changes); }
.btn.send { background: var(--changes); border-color: var(--changes); color: #2a0f06; font-weight: 650; }
.btn.send:hover { background: #ff9d7f; border-color: #ff9d7f; }
.btn.approve.quiet { background: transparent; color: var(--approved); }
.btn.approve.quiet:hover { background: rgba(79, 206, 139, .12); }
.btn.ghost { background: transparent; }
.btn.ghost.on { background: var(--surface-2); border-color: var(--accent); color: var(--accent); }
.btn.danger { color: var(--bad); }

.ctl {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; border: 0; border-radius: var(--radius-small);
  background: transparent; color: var(--text); text-decoration: none;
}
.ctl:hover { background: var(--surface-2); }
.ctl.tiny { width: 26px; height: 26px; color: var(--faint); }
.ctl.tiny .icon { width: 14px; height: 14px; }
.ctl.tiny:hover { color: var(--text); }
.ctl.text { width: auto; min-width: 38px; padding: 0 8px; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--muted); }
.ctl.play { background: var(--surface-2); }
.ctl.play:hover { background: var(--line-strong); }

/* Status */
.pill {
  display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
}
.pill.st-draft { color: var(--muted); background: var(--surface-2); }
.pill.st-review { color: var(--review); background: rgba(245, 184, 61, .13); }
.pill.st-changes { color: var(--changes); background: rgba(255, 138, 102, .13); }
.pill.st-approved { color: var(--approved); background: rgba(79, 206, 139, .13); }

/* Home: a board with one column per step. No class here starts with "ad-" (ad blockers hide those). */
.content { padding: 0; }
.home { max-width: 1280px; margin: 0 auto; padding: 22px var(--gutter) 60px; }
.board-filter { display: flex; margin-bottom: 14px; }
.board-filter .tabs { flex-wrap: wrap; }
.board-filter .tab { display: inline-flex; align-items: center; gap: 6px; padding: 2px 12px; white-space: nowrap; }
.board-filter .tab-count { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.board.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.home:has(.cols-5) { max-width: 1560px; }
.col-todo .col-dot { background: var(--text); }
.todo-card { cursor: pointer; align-items: center; }
.todo-icon {
  width: 46px; height: 46px; flex: none; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--accent);
}
.card-notes.todo-cta { color: var(--accent); font-weight: 600; }
.card-picker { display: grid; gap: 8px; }
.card-picker .card { cursor: pointer; }
.card-box {
  display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: var(--surface);
}
.card-box .card-title { font-size: 16px; -webkit-line-clamp: 4; }
.card-box-links { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13.5px; }
.or-divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 13px; margin: 6px 0; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn.ab { border-color: var(--accent); color: var(--accent); }

/* A Notion card: its script on the left, the inspo and the upload on the right */
.card-page { max-width: 1180px; margin: 0 auto; padding: 22px var(--gutter) 60px; display: grid; gap: 16px; }
.card-page-head { display: grid; gap: 8px; }
.card-page-head h1 { font-size: 22px; line-height: 1.3; }
.card-page-body { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.card-side { display: grid; gap: 14px; position: sticky; top: 14px; }
.card-script {
  padding: 18px 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  line-height: 1.6; font-size: 15px; overflow-wrap: anywhere;
}
.card-script h2 { font-size: 15px; letter-spacing: .04em; color: var(--accent); margin: 18px 0 6px; }
.card-script h2:first-child { margin-top: 0; }
.card-script h3 { font-size: 15px; margin: 14px 0 4px; }
.card-script p { margin: 0 0 10px; }
.card-script ul, .card-script ol { margin: 0 0 10px; padding-left: 20px; }
.card-script hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.card-script blockquote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.card-script pre { white-space: pre-wrap; background: var(--bg); padding: 10px; border-radius: var(--radius-small); }
.card-script a { color: var(--accent); }
.callout-box { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--accent); border-radius: var(--radius); background: rgba(245, 184, 61, .08); }
.callout-box p { margin: 0; }
@media (max-width: 900px) {
  .card-page-body { grid-template-columns: minmax(0, 1fr); }
  .card-side { position: static; order: -1; }
}

/* Replies under a note */
.note-main { flex: 1; min-width: 0; display: grid; }
.replies { display: grid; gap: 6px; padding: 0 2px 6px; }
.reply { position: relative; display: grid; gap: 1px; padding: 6px 28px 6px 10px; border-left: 2px solid var(--line-strong); }
.reply-author { color: var(--faint); font-size: 12px; }
.reply-text { font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; }
.reply-delete { position: absolute; top: 2px; right: 0; opacity: 0; }
.reply:hover .reply-delete, .reply-delete:focus-visible { opacity: 1; }
.reply-link {
  justify-self: start; border: 0; background: transparent; padding: 2px 0; color: var(--muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.reply-link:hover { color: var(--text); }
.reply-form { display: grid; gap: 6px; }

/* The top-performer feed on the A side of the A/B compare */
.feed-bar {
  display: flex; align-items: center; gap: 12px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.feed-arrows { display: flex; gap: 4px; flex: none; }
.feed-arrows .ctl:disabled { opacity: .35; cursor: default; }
.feed-label { display: grid; gap: 2px; min-width: 0; }
.feed-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feed-meta { color: var(--muted); font-size: 12.5px; display: flex; gap: 10px; flex-wrap: wrap; }
.feed-meta a { color: var(--accent); }

/* A creator's check before sending: on the A/B compare, and on the ad page */
.send-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 12px 16px; border: 1px solid var(--accent); border-radius: var(--radius);
  background: rgba(245, 184, 61, .08);
}
.send-copy { display: grid; gap: 3px; font-size: 14px; min-width: 0; }
.send-copy span { color: var(--muted); }
.send-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.callout.unsent-callout { background: rgba(245, 184, 61, .08); color: var(--text); }
.col-tagged .col-dot { background: #8fb4ff; }
.tagged-card { cursor: pointer; }
.card-quote {
  font-size: 13.5px; line-height: 1.4; color: var(--text); padding-left: 8px; border-left: 2px solid #8fb4ff;
  overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* Tagging creators in a note */
.mention { color: #8fb4ff; font-weight: 600; }
.mention-wrap { position: relative; }
.mention-list {
  position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; min-width: 160px; padding: 4px;
  display: grid; gap: 2px; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: var(--radius-small); box-shadow: 0 10px 26px rgba(0, 0, 0, .5);
}
.mention-option {
  text-align: left; padding: 6px 9px; border: 0; border-radius: 5px; background: transparent;
  color: var(--text); font-size: 14px; cursor: pointer;
}
.mention-option.on, .mention-option:hover { background: var(--line-strong); }
.mention-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mention-label { color: var(--faint); font-size: 12.5px; }
.chip {
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent;
  color: var(--muted); font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--faint); }
.chip.on { color: #0d1a33; background: #8fb4ff; border-color: #8fb4ff; }
.col {
  display: grid; gap: 10px; align-content: start; min-height: 150px; padding: 12px;
  background: rgba(255, 255, 255, .018); border: 1px solid var(--line); border-radius: var(--radius);
}
.col-head { display: flex; align-items: center; gap: 8px; }
.col-head h2 { font-size: 15.5px; }
.col-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--faint); }
.col-review .col-dot { background: var(--review); }
.col-changes .col-dot { background: var(--changes); }
.col-approved .col-dot { background: var(--approved); }
.col-hint { color: var(--faint); font-size: 12.5px; margin-left: auto; }
.col-cards { display: grid; gap: 8px; }
.col-more { justify-self: start; }
.section-count {
  display: inline-flex; min-width: 22px; justify-content: center; padding: 0 6px; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.card {
  display: flex; align-items: flex-start; gap: 11px; padding: 8px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small);
  text-decoration: none;
}
.card:hover { border-color: var(--line-strong); background: #1c1e23; }
.card { cursor: grab; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.card-notes .note-ab { margin-left: 6px; }
.brand-chip {
  justify-self: start; display: inline-block; padding: 1px 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); background: var(--surface-2);
}
.brand-iron-paws { color: #ffb37a; background: rgba(255, 138, 102, .15); }
.brand-kriath-paws { color: #7fd4a0; background: rgba(79, 206, 139, .15); }

/* Dragging a card to another column */
.drag-ghost {
  position: fixed; left: 0; top: 0; z-index: 60; pointer-events: none; cursor: grabbing;
  box-shadow: 0 14px 36px rgba(0, 0, 0, .55); border-color: var(--accent); opacity: .96;
}
.card.drag-source { opacity: .35; }
.home.dragging, .home.dragging * { cursor: grabbing; }
.col { position: relative; transition: border-color .12s, background .12s, opacity .12s; }
.col.drop-no { opacity: .45; }
.col.drop-ok { border-style: dashed; border-color: var(--line-strong); }
.col.drop-target { border-color: var(--accent); background: rgba(245, 184, 61, .07); }
/* Every column reaches the bottom of the longest one, and its label stays in view while you scroll */
.home.dragging .board { align-items: stretch; }
.drop-label {
  position: sticky; top: 68px; bottom: 14px; z-index: 1;
  text-align: center; padding: 14px 10px; border-radius: var(--radius-small); background: var(--surface);
  border: 1.5px dashed var(--line-strong); color: var(--muted); font-weight: 600; font-size: 14px;
}
.col.drop-target .drop-label { border-color: var(--accent); color: var(--accent); }
.thumb {
  width: 46px; height: 76px; flex: none; border-radius: 6px; overflow: hidden;
  background: linear-gradient(160deg, var(--surface-2), var(--line));
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-main { flex: 1; min-width: 0; display: grid; gap: 3px; }
.card-title {
  font-weight: 600; font-size: 14px; line-height: 1.35; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card-meta { color: var(--muted); font-size: 12.5px; }
.card-notes { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.card-notes.open { color: var(--changes); }
.card-notes.all-done { color: var(--approved); }
.empty {
  color: var(--faint); padding: 18px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty.small { padding: 11px; font-size: 13.5px; }
@media (max-width: 1400px) {
  .board.cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .board.cols-4, .board.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .board, .board.cols-4, .board.cols-5 { grid-template-columns: minmax(0, 1fr); }
  .col { min-height: 0; }
}
.first-run { text-align: center; padding: 52px 20px; display: grid; gap: 14px; justify-items: center; }
.first-run p { color: var(--muted); max-width: 44ch; }

/* Forms */
.narrow { max-width: 560px; margin: 0 auto; padding: 22px var(--gutter) 60px; display: grid; gap: 18px; }
.back { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); text-decoration: none; width: fit-content; }
.back:hover { color: var(--text); }
.lead { color: var(--muted); }
.field { display: grid; gap: 6px; }
.field-label { font-weight: 600; font-size: 14px; }
.field-hint { color: var(--faint); font-size: 13px; }
.field-input {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-small);
}
.field-input::placeholder, .note-input::placeholder { color: var(--faint); }
.field-input:focus, .note-input:focus, .note-edit-input:focus { outline: none; border-color: var(--accent); }
.form-error { color: var(--bad); font-size: 14px; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-panel { display: grid; gap: 16px; }
.drop {
  display: grid; justify-items: center; gap: 4px; width: 100%; padding: 30px 16px;
  background: var(--surface); border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  color: var(--muted); text-align: center;
}
.drop .icon { width: 26px; height: 26px; color: var(--accent); margin-bottom: 5px; }
.drop strong { color: var(--text); font-size: 16px; }
.drop:hover:not(:disabled), .drop.over { border-color: var(--accent); background: #1c1e23; }
.drop.has-file { border-style: solid; }
.drop-file { display: grid; gap: 6px; color: var(--text); font-weight: 550; overflow-wrap: anywhere; }
.drop-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.drop-name { min-width: 0; overflow-wrap: anywhere; }
.drop-remove { display: inline-flex; color: var(--muted); cursor: pointer; margin-left: auto; padding: 2px; border-radius: 6px; }
.drop-remove:hover { color: var(--text); background: var(--surface-2); }
.drop-remove .icon { width: 14px; height: 14px; }
.shape-chip {
  display: inline-flex; align-items: center; padding: 0 6px; border-radius: 999px; flex: none;
  font-size: 11.5px; font-weight: 700; color: var(--text); background: var(--surface-2); border: 1px solid var(--line-strong);
}
.join-row { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--text); }
.join-row input { margin-top: 3px; accent-color: var(--accent); }
.tabs.shapes .tab { font-variant-numeric: tabular-nums; }
.add-shape .icon { width: 13px; height: 13px; }
.note-shape { margin-left: 6px; font-size: 11px; font-weight: 700; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 5px; }
.drop-message { font-size: 14px; color: var(--muted); }
.drop-message.error { color: var(--bad); }
.drop-message.warn { color: var(--accent); }
.progress { display: grid; gap: 7px; }
.bar { height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar.small { height: 4px; }
.bar-fill { height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .2s linear; }
.bar-fill.indeterminate { width: 30% !important; animation: slide 1.2s ease-in-out infinite alternate; }
@keyframes slide { from { margin-left: 0; } to { margin-left: 70%; } }
.progress-text { color: var(--muted); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.add-person { display: flex; gap: 10px; }
.add-person .field-input { flex: 1; min-width: 0; }
/* Sign-in, first-time setup and the account dialog */
.sign-in { display: grid; gap: 12px; width: min(360px, 100%); text-align: left; }
.sign-in .btn.primary { justify-self: stretch; justify-content: center; }
.account-dialog .sign-in { width: 100%; }
.account-dialog .sign-in .btn.primary { justify-self: start; }
.password-row { display: flex; gap: 8px; }
.password-row .field-input { flex: 1; min-width: 0; }
.form-error, .blank .form-error { color: var(--changes); font-size: 13.5px; }
.form-error:empty { display: none; }
.sign-in-details { display: grid; gap: 4px; overflow-wrap: anywhere; }
.new-password { font-size: 16px; font-weight: 700; letter-spacing: .04em; color: var(--accent); }
.person-who { display: grid; gap: 2px; min-width: 0; }
@media (max-width: 520px) { .add-person { flex-wrap: wrap; } .add-person .field-input { flex-basis: 100%; } }
.link-box { display: grid; gap: 10px; padding: 14px; background: var(--surface); border: 1px solid var(--accent); border-radius: var(--radius); }
.link-box-title { font-weight: 600; }
.people { display: grid; gap: 8px; }
.person {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.person-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.person-actions { display: flex; gap: 8px; }
.tag { color: var(--muted); font-size: 12px; font-weight: 500; background: var(--surface-2); padding: 1px 7px; border-radius: 99px; }

/* Dialog */
.dialog {
  width: min(520px, calc(100vw - 32px)); padding: 18px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px;
}
.dialog::backdrop { background: rgba(0, 0, 0, .66); }
.dialog > * + * { margin-top: 14px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { font-size: 17px; }

/* Review page */
.review { display: flex; flex-direction: column; height: calc(100dvh - 54px); }
.review-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gutter); border-bottom: 1px solid var(--line);
}
.back-ctl { margin-left: -8px; }
.head-main { flex: 1; min-width: 200px; }
.head-title { display: flex; align-items: center; gap: 4px; }
.head-title h1 { font-size: 17px; overflow-wrap: anywhere; }
.head-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 11px; margin-top: 3px; color: var(--muted); font-size: 13.5px; }
.head-meta a { display: inline-flex; align-items: center; gap: 4px; }
.head-meta .icon { width: 14px; height: 14px; }
.head-actions { display: flex; gap: 9px; }
.callout {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px var(--gutter); background: var(--surface); border-bottom: 1px solid var(--line); font-size: 14px;
}
.callout.changes { color: var(--changes); }
.callout.approved { color: var(--approved); }
.live-hint { color: var(--muted); font-size: 13px; }
.callout-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.note-open-ab {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 2px;
  color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap;
}
.note-open-ab .icon { width: 13px; height: 13px; }
.note-body:hover .note-open-ab { text-decoration: underline; }
.callout.link { text-decoration: none; color: var(--accent); font-weight: 550; justify-content: flex-start; }
.review-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 370px; min-height: 0; }
.review-player { display: flex; flex-direction: column; min-width: 0; padding: 10px var(--gutter) 12px; gap: 8px; }
.version-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-small); padding: 2px; }
.tab {
  min-width: 38px; min-height: 28px; padding: 2px 9px; border: 0; border-radius: 5px; background: transparent;
  color: var(--muted); font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.tab:hover { color: var(--text); }
.tab.on { background: var(--surface-2); color: var(--accent); }
.mini-select { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-small); min-height: 34px; padding: 2px 6px; font-size: 13.5px; }

/* Player */
.player { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 6px; }
.stage {
  flex: 1; min-height: 240px; position: relative;
  display: flex; gap: 8px; justify-content: center; align-items: stretch;
  background: #000; border-radius: var(--radius); padding: 6px;
}
.pane { flex: 1 1 0; min-width: 0; min-height: 0; display: flex; align-items: center; justify-content: center; }
.frame { position: relative; flex: none; background: #000; cursor: crosshair; }
.frame video { display: block; width: 100%; height: 100%; }
.draw-layer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.draw-layer.active { pointer-events: auto; cursor: crosshair; touch-action: none; }
.pin {
  position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none;
  border: 3px solid var(--accent); background: rgba(245, 184, 61, .28); box-shadow: 0 0 0 2px rgba(0, 0, 0, .65);
}
.pane-tag {
  position: absolute; top: 8px; left: 8px; padding: 1px 8px; border-radius: 5px;
  background: rgba(0, 0, 0, .7); color: #fff; font-size: 13px; font-weight: 650; pointer-events: none;
}
.frame-error {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 20px; text-align: center; background: var(--surface); color: var(--text); cursor: default;
}
.timeline { padding: 8px 0 4px; }
.track { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.track::before { content: ''; position: absolute; left: 0; right: 0; height: 5px; border-radius: 99px; background: var(--surface-2); }
.loaded { position: absolute; left: 0; width: 0; height: 5px; border-radius: 99px; background: var(--line-strong); transition: width .3s; }
.fill { position: absolute; left: 0; height: 5px; border-radius: 99px; background: var(--faint); }
.head {
  position: absolute; width: 3px; height: 20px; margin-left: -1.5px; border-radius: 2px;
  background: var(--text); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); pointer-events: none;
}
.lane {
  position: relative; height: 20px; margin-top: 3px; border-radius: 5px; background: var(--surface);
  border: 1px solid var(--line); cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none;
}
.lane::before {
  content: 'Drag here to comment on a section'; position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; color: var(--faint); font-size: 11.5px; pointer-events: none; white-space: nowrap; overflow: hidden;
}
.band {
  position: absolute; top: 0; bottom: 0; pointer-events: none; background: rgba(245, 184, 61, .3);
  border-left: 2px solid var(--accent); border-right: 2px solid var(--accent);
}
.markers { position: absolute; inset: 0; pointer-events: none; }
.marker {
  position: absolute; top: 50%; width: 22px; height: 24px; margin-left: -11px; margin-top: -12px;
  padding: 0; border: 0; background: transparent; pointer-events: auto;
}
.marker::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px;
  border-radius: 50%; background: var(--accent); border: 2px solid var(--bg);
}
.marker.done::after { background: var(--approved); }
.marker.selected::after { width: 15px; height: 15px; margin: -7.5px 0 0 -7.5px; border-color: #fff; }
.marker.section { height: 12px; margin-left: 0; margin-top: -6px; }
.marker.section::after, .marker.section.selected::after {
  inset: 0; width: auto; height: auto; margin: 0; border-radius: 3px; border: 1px solid var(--bg); opacity: .85;
}
.marker.section.selected::after { border-color: #fff; opacity: 1; }
.controls { display: flex; align-items: center; gap: 4px; }
.readout { display: flex; align-items: baseline; gap: 9px; margin-left: 9px; font-variant-numeric: tabular-nums; }
.code { font-weight: 650; font-size: 15px; }
.frame-no { color: var(--faint); font-size: 13px; }

/* Notes */
.notes {
  border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0;
  background: var(--surface);
}
.notes-hint { padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }
.notes-hint strong { color: var(--text); font-weight: 600; }
.composer-card {
  position: absolute; z-index: 5; width: 300px; max-width: calc(100% - 16px); padding: 11px; display: grid; gap: 8px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .55); cursor: default;
}
.composer-top { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.stamp { color: var(--accent); font-size: 13.5px; font-weight: 650; font-variant-numeric: tabular-nums; }
.note-input, .note-edit-input {
  width: 100%; resize: vertical; min-height: 60px; padding: 8px 10px;
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-small);
}
.section-tip { color: var(--faint); font-size: 12.5px; }
.composer-bottom { display: flex; align-items: center; gap: 7px; }
.hint { color: var(--faint); }
.notes-summary { padding: 11px 14px 9px; display: grid; gap: 7px; font-size: 14px; }
.notes-summary .bar-fill { background: var(--approved); }
.notes-list { flex: 1; overflow-y: auto; padding: 0 8px 18px; min-height: 0; }
.note-group h3 { font-size: 12.5px; font-weight: 600; color: var(--faint); margin: 11px 6px 5px; }
.note {
  position: relative; display: flex; align-items: flex-start; gap: 3px;
  padding: 3px; border-radius: var(--radius-small); border: 1px solid transparent;
}
.note:hover { background: var(--surface-2); }
.note.selected { background: var(--surface-2); border-color: var(--accent); }
.tick { position: relative; display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: none; cursor: pointer; }
.tick input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.tick-box {
  display: flex; align-items: center; justify-content: center; width: 20px; height: 20px;
  border: 1.5px solid var(--faint); border-radius: 5px; color: transparent;
}
.tick-box .icon { width: 14px; height: 14px; }
.tick input:checked + .tick-box { background: var(--approved); border-color: var(--approved); color: #06240f; }
.tick input:focus-visible + .tick-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.note-body {
  flex: 1; min-width: 0; display: grid; gap: 2px; padding: 5px 2px 6px 2px;
  border: 0; background: transparent; text-align: left;
}
.note-top { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.note-time { color: var(--accent); font-weight: 650; font-size: 13px; font-variant-numeric: tabular-nums; }
.note-flag { color: var(--accent); }
.note-flag .icon { width: 13px; height: 13px; }
.note-author { color: var(--faint); font-size: 12.5px; }
.note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.note-done { color: var(--approved); font-size: 12.5px; }
.note.done .note-text { color: var(--faint); text-decoration: line-through; }
.note.done .note-time { color: var(--faint); }
.note-actions { flex: none; display: flex; flex-direction: column; gap: 2px; padding-top: 1px; }
.note-actions .ctl { opacity: 0; }
.note:hover .note-actions .ctl, .note-actions .ctl:focus-visible { opacity: 1; }
.note.editing { background: var(--surface-2); border-color: var(--accent); }
.note-edit-form { flex: 1; min-width: 0; display: grid; gap: 7px; padding: 6px 4px 6px 2px; }

.share-dialog .link-row .field-input { font-size: 13.5px; }

/* Side by side */
/* The player takes whatever height is left, so its controls are always on screen. */
.compare-page {
  max-width: 1240px; margin: 0 auto; padding: 22px var(--gutter) 20px;
  display: flex; flex-direction: column; gap: 16px; min-height: calc(100dvh - 54px);
}
.compare-head { display: grid; gap: 4px; }
.pickers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.slot { display: grid; gap: 11px; align-content: start; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.slot-head { display: flex; align-items: center; gap: 9px; }
.slot-letter {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px;
}
.slot-loaded { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.slot-name { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.slot-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13.5px; }
.slot-link .icon { width: 14px; height: 14px; }
.link-row { display: flex; gap: 8px; }
.link-row .field-input { flex: 1; min-width: 0; }
.cut-pick { display: flex; gap: 8px; }
.cut-pick select:first-child { flex: 1; min-width: 0; }
.cut-pick select + select { width: auto; }
.recent { display: grid; gap: 6px; }
.recent-label { color: var(--faint); font-size: 12.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: 999px; max-width: 100%; }
.chip-main { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 4px 4px 11px; border: 0; background: transparent; font-size: 13px; min-width: 0; }
.chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; }
.chip-age { color: var(--faint); font-size: 11.5px; white-space: nowrap; }
.chip-x { display: inline-flex; padding: 4px 8px 4px 4px; border: 0; background: transparent; color: var(--faint); }
.chip-x .icon { width: 12px; height: 12px; }
.chip-x:hover { color: var(--text); }
.compare-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-label { color: var(--muted); font-size: 13.5px; }
.compare-player { flex: 1; min-height: 380px; display: flex; flex-direction: column; position: relative; }
.compare-composer { position: absolute; z-index: 20; width: 320px; }
.compare-notes { display: grid; gap: 8px; }
.compare-notes-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.compare-notes-head h2 { font-size: 15.5px; }
.compare-notes-list { display: grid; gap: 6px; }
.compare-note {
  display: grid; grid-template-columns: auto auto 1fr; gap: 10px; align-items: baseline; text-align: left;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-small); background: var(--surface); color: var(--text);
  cursor: pointer;
}
.compare-note:hover { border-color: var(--line-strong); }
.compare-note.selected { border-color: var(--accent); }
.compare-note.done { opacity: .55; }
.note-inspo { color: var(--accent); font-weight: 600; white-space: nowrap; }
.note-ab {
  display: inline-flex; align-items: center; gap: 4px; padding: 0 6px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; color: var(--accent); background: rgba(245, 184, 61, .12);
}
.note-ab .icon { width: 12px; height: 12px; }
.compare-note .note-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.compare-player .player { flex: 1; min-height: 0; }
.toolbar-group { display: flex; align-items: center; gap: 8px; }
.compare-separate { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare-separate > .player { min-height: 0; }
.compare-separate > .player .stage { outline: 2px solid transparent; outline-offset: 2px; }
.compare-separate > .player.active .stage { outline-color: var(--accent); }

/* Misc */
.loading { padding: 60px 20px; text-align: center; color: var(--faint); }
.blank { max-width: 420px; margin: 0 auto; padding: 70px 20px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.blank p { color: var(--muted); }
.gate { padding-top: 14vh; }
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 50; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  padding: 9px 15px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line-strong);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .5); font-size: 14px;
}
.toast.good { border-color: var(--approved); }
.toast.bad { border-color: var(--bad); }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-action {
  border: 0; background: transparent; color: var(--accent); font-weight: 650; font-size: 14px;
  padding: 2px 4px; cursor: pointer;
}
.toast-action:hover { text-decoration: underline; }

@media (max-width: 520px) {
  .brand-text { display: none; }
  .topbar { gap: 10px; }
}

@media (max-width: 900px) {
  .pickers { grid-template-columns: 1fr; }
  .compare-separate { grid-template-columns: 1fr; grid-auto-rows: minmax(360px, auto); }
  :root { --gutter: 14px; }
  .review { height: auto; }
  .review-body { grid-template-columns: minmax(0, 1fr); }
  /* The whole player fits on one screen: only the notes need scrolling. */
  .stage { height: calc(100dvh - 54px - 118px - 44px - 118px); min-height: 260px; flex: none; }
  .composer-card { position: static; width: auto; max-width: none; box-shadow: none; }
  .lane { height: 28px; }
  .review-head { padding: 8px var(--gutter); gap: 6px 8px; }
  .head-main { min-width: 0; flex-basis: calc(100% - 50px); }
  .head-actions .btn { min-height: 38px; }
  .review-player { padding-top: 8px; }
  .version-bar .btn { padding: 5px 9px; }
  .version-bar .btn .btn-label { display: none; }
  .notes { border-left: 0; border-top: 1px solid var(--line); }
  .notes-list { overflow: visible; }
  .head-actions { width: 100%; }
  .head-actions .btn { flex: 1; }
  .hint { display: none; }
  .note-actions .ctl, .reply-delete { opacity: 1; }
  .ctl { width: 44px; height: 44px; }
  .ctl.tiny { width: 28px; height: 28px; }
  .frame-no { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .bar-fill { transition: none; }
  .bar-fill.indeterminate { animation: none; width: 100% !important; }
}

/* The AI first pass on a creator's cut */
.ai-badge {
  display: inline-flex; align-items: center; padding: 0 6px; margin-right: 6px; border-radius: 999px; flex: none;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; color: #10151f; background: #8fb4ff;
}
.ai-line { display: block; margin-top: 4px; font-size: 13.5px; font-weight: 600; color: #8fb4ff; }
.ai-line.open { color: var(--accent); }
.ai-line.passed { color: var(--approved); }
.ai-line.failed { color: var(--muted); }
.ai-line.running::before {
  content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%;
  background: #8fb4ff; animation: ai-pulse 1.2s ease-in-out infinite;
}
@keyframes ai-pulse { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.compare-note-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.ai-actions { display: flex; gap: 6px; align-items: center; }
.ai-handled { display: inline-flex; align-items: center; gap: 4px; color: var(--approved); font-size: 13px; font-weight: 600; }
.ai-handled .icon { width: 13px; height: 13px; }
.compare-note.ai .note-text, .note .note-text { white-space: pre-wrap; }
.not-issue { margin-right: 10px; }
@media (max-width: 700px) {
  .compare-note-row { grid-template-columns: 1fr; }
}
.ai-settings { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; justify-items: start; }
.ai-settings h2 { font-size: 17px; }
.ai-state { font-size: 14px; font-weight: 600; }
.ai-state.testing { color: #8fb4ff; }
.ai-state.live { color: var(--approved); }
