/* Panay review portal. Same house as the tracker: true-black flat (taste-skill app sheet), Jost for names,
   IBM Plex Sans for everything else. Elevation is a lightness step (#000 ground, #111 panel, #1c1c1c raised,
   #2a2a2a nested). Colour means something: amber is New for a client (and comments waiting on Panay), green and
   red are the review switch. Nothing else takes a hue. Phone rules sit under each component (max-width: 760px). */

/* ========== tokens and base ========== */
[hidden] { display: none !important; }
:root {
  --ground: #000; --panel: #111; --raised: #1c1c1c; --nested: #2a2a2a; --rule: #222; --control: #5c5c5c;
  --text: #fff; --muted: #b4b4b4; --meta: #949494; --parchment: #fff4e0;
  --hue: #f5b83d; --on: #3ccf74; --off: #ff5c52; --danger: #ff8f80;
  --display: "Jost", "Futura", "Century Gothic", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --col: 1280px; --pad: 24px; --gap: 16px; --r: 12px; --r-row: 8px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: var(--ground); }
body { margin: 0; min-height: 100vh; background: var(--ground); color: var(--text); font: 400 15px/1.5 var(--body);
  -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: var(--text); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--parchment); outline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.loading { padding: 96px 24px; color: var(--muted); }
@media (max-width: 760px) { :root { --pad: 16px; } }

/* ========== buttons ========== */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; background: var(--nested); color: var(--text);
  border: 0; border-radius: 18px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background 0.12s, transform 0.08s; }
.btn:hover { background: #363636; }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn--primary { background: var(--text); color: #000; }
.btn--primary:hover { background: #e2e2e2; }
.btn--quiet { background: transparent; color: var(--muted); padding: 0 10px; }
.btn--quiet:hover { background: var(--raised); color: var(--text); }
.btn--small { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 15px; }
.linkish { background: none; border: 0; padding: 0; color: var(--meta); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.linkish:hover { color: var(--text); }

/* ========== top bar ========== */
.bar { position: sticky; top: 0; z-index: 10; background: var(--ground); }
.bar.is-asclient { background: #0d1a12; }
.bar-in { max-width: calc(var(--col) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); height: 52px; display: flex; align-items: center; gap: 20px; }
.bar-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.bar-logo img { height: 18px; width: auto; display: block; }
.bar-logo span { font: 400 14px/1 var(--display); color: var(--muted); }
.bar-client { color: var(--text); font-weight: 500; font-size: 14px; }
.bar-who { margin-left: auto; color: var(--meta); font-size: 13px; }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.bar-right .bar-who { margin-left: 0; }
.asclient { display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border-radius: 16px; background: var(--raised); font-size: 13px; color: var(--muted); cursor: pointer; }
.asclient input { width: 16px; height: 16px; accent-color: var(--on); margin: 0; }
.is-asclient .asclient { background: var(--on); color: #00210d; }
@media (max-width: 760px) {
  .bar-desk, .bar-client { display: none; }
  .bar-in { gap: 12px; }
}

/* ========== page frame ========== */
main { max-width: calc(var(--col) + 2 * var(--pad)); margin: 0 auto; padding: 32px var(--pad) 120px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; color: var(--meta); font-size: 14px; margin-bottom: 10px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 32px; }
.head h1 { font: 400 32px/1.1 var(--display); letter-spacing: -0.015em; }
.head-line { color: var(--muted); margin-top: 10px; font-size: 16px; max-width: 70ch; }
.head-line strong { color: var(--hue); font-weight: 500; }
.head-actions { display: flex; gap: 8px; flex: none; }
.page-msg { padding: 64px 0; color: var(--muted); }
.page-msg p + p { margin-top: 10px; color: var(--meta); }
.empty { color: var(--meta); font-size: 14px; }
@media (max-width: 760px) {
  main { padding: 20px var(--pad) 96px; }
  .head { flex-direction: column; align-items: stretch; margin-bottom: 24px; }
  .head h1 { font-size: 26px; }
}

/* ========== landing and sign-in ========== */
.landing { max-width: 30rem; padding: 18vh var(--pad) 96px; }
.landing-logo { height: 30px; width: auto; margin-bottom: 40px; display: block; }
.landing h1 { font: 400 34px/1.1 var(--display); margin-bottom: 14px; }
.landing p { color: var(--muted); font-size: 16px; }
.landing p + p { margin-top: 18px; }
.landing-team { color: var(--meta) !important; font-size: 14px !important; }

/* ========== home: campaign tabs, then the campaign's sections ========== */
.campaigns { display: flex; flex-wrap: wrap; gap: 20px 28px; margin-bottom: 40px; }
.campaign-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.campaign-job { width: 100%; color: var(--meta); font-size: 13px; margin-bottom: 2px; }
.ctab { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--panel);
  color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: background 0.12s, color 0.12s; }
.ctab:hover { background: var(--raised); color: var(--text); }
.ctab[aria-current="page"] { background: var(--text); color: #000; }
.ctab-new { color: var(--hue); font-size: 12px; }
.ctab-on { color: var(--on); font-size: 12px; }
.ctab[aria-current="page"] .ctab-new { color: #7a4f00; }
.ctab[aria-current="page"] .ctab-on { color: #0b6b31; }
.campaign-title { font: 400 30px/1.1 var(--display); letter-spacing: -0.01em; margin-bottom: 28px; }
.section + .section { margin-top: 44px; }
.section-label { display: flex; gap: 10px; align-items: baseline; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.section-label span { color: var(--meta); font-weight: 400; font-size: 13px; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px; }
.section--social .tiles, .section--ooh .tiles, .section--script .tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.tile { display: grid; gap: 10px; align-content: start; text-decoration: none; color: var(--text); }
.tile .pic { transition: transform 0.18s ease; }
.tile:hover .pic { transform: scale(1.015); }
.tile:hover b { text-decoration: underline; text-underline-offset: 0.2em; }
.tile.is-dragging { opacity: 0.4; }
.section--social .pic, .section--ooh .pic, .section--script .pic { aspect-ratio: 4 / 5; }
.tile-text { display: grid; gap: 2px; min-width: 0; }
.tile-text b { font: 400 17px/1.25 var(--display); display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; overflow-wrap: anywhere; }
.tile-sub { color: var(--meta); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-tag { color: var(--meta); font-size: 12px; }
.tile-wrap { display: grid; gap: 8px; align-content: start; }
.tile-flip { justify-self: start; height: 26px; padding: 0 10px; border-radius: 13px; border: 0; background: var(--raised); color: var(--muted); font: 500 12px/1 var(--body); cursor: pointer; transition: background 0.12s, color 0.12s; }
.tile-flip:hover { background: var(--nested); color: var(--text); }
.mark { color: var(--hue); font: 500 12px/1 var(--body); }
/* Panay's side: the On review site box over the Hidden box. A tinted field says which side a cut is on. */
.zone { border-radius: var(--r); padding: 16px; transition: background 0.12s; }
.zone + .zone { margin-top: 8px; }
.zone--on { background: rgba(60, 207, 116, 0.08); }
.zone--off { background: rgba(255, 92, 82, 0.06); }
.zone--on.is-over { background: rgba(60, 207, 116, 0.2); }
.zone--off.is-over { background: rgba(255, 92, 82, 0.16); }
.zone-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; margin-bottom: 14px; }
.zone-label i { width: 8px; height: 8px; border-radius: 50%; }
.zone--on .zone-label { color: var(--on); }
.zone--on .zone-label i { background: var(--on); }
.zone--off .zone-label { color: var(--off); }
.zone--off .zone-label i { background: var(--off); }
.zone-label span { color: var(--meta); font-weight: 400; }
.zone-empty { color: var(--meta); font-size: 13px; }
.tiles--few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section--social .tiles--few, .section--ooh .tiles--few, .section--script .tiles--few { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tiles--few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section--social .tiles, .section--ooh .tiles, .section--script .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .tiles, .section--social .tiles, .section--ooh .tiles, .section--script .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .campaigns { gap: 12px; margin-bottom: 28px; }
  .ctab { height: 34px; padding: 0 13px; font-size: 14px; }
  .campaign-title { font-size: 24px; margin-bottom: 20px; }
  .tile-text b { font-size: 16px; }
  .zone { padding: 12px; }
}

/* pictures */
.pic { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--raised); border-radius: 6px; overflow: hidden; }
.pic img, .pic video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pic-tile { position: absolute; inset: 0; display: grid; place-items: center; color: var(--meta); font-size: 12px; padding: 6px; text-align: center; }
.pic-play { position: absolute; right: 8px; bottom: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; display: grid; place-items: center; }
.pic-play svg { width: 13px; height: 13px; margin-left: 2px; }
.pic-count { position: absolute; left: 8px; bottom: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: rgba(0,0,0,0.6); color: #fff; font-size: 12px; font-weight: 500; display: grid; place-items: center; }
.pic--big { width: 100%; max-width: 560px; }

/* ========== internal: rows and review links ========== */
.rows { background: var(--panel); border-radius: var(--r); padding: 8px; }
.row { display: grid; grid-template-columns: minmax(0, 1fr) auto 24px; gap: 16px; align-items: center; min-height: 64px; padding: 0 16px;
  border-radius: var(--r-row); text-decoration: none; color: var(--text); transition: background 0.12s; }
.row:hover { background: var(--raised); }
.row b { font: 400 20px/1.2 var(--display); }
.row span { color: var(--muted); font-size: 14px; }
.row .go { color: var(--meta); }
.panel { background: var(--panel); border-radius: var(--r); padding: 20px; }
.panel-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { font-size: 15px; font-weight: 600; }
.count { color: var(--meta); font-size: 13px; font-weight: 400; }
.links { margin-top: 72px; }
.link-rows { display: grid; gap: 4px; }
.link-row { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; gap: 16px; align-items: center; min-height: 56px; padding: 8px 12px;
  border-radius: var(--r-row); background: var(--raised); }
.link-row.is-off { background: transparent; }
.link-row.is-off .link-who b { color: var(--meta); }
.link-who { display: grid; min-width: 0; }
.link-who b { font-weight: 500; }
.link-who span, .link-seen { color: var(--meta); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-tools { display: flex; gap: 4px; justify-content: flex-end; }
.link-add { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.link-add input, .link-add select { height: 34px; background: var(--ground); border: 1px solid var(--control); border-radius: 8px; padding: 0 10px; font-size: 14px; min-width: 0; }
.link-add input { flex: 1 1 200px; }
.link-add input:focus, .link-add select:focus { outline: none; border-color: var(--parchment); }
@media (max-width: 900px) {
  .link-row { grid-template-columns: minmax(0, 1fr) auto; }
  .link-seen { grid-column: 1 / -1; grid-row: 2; }
}

/* ========== the screening page ========== */
.screen { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.stage { min-width: 0; }
.stage-cut { display: grid; gap: 14px; }
.stage-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.stage-name { display: grid; gap: 2px; min-width: 0; }
.stage-ver { font: 400 32px/1 var(--display); letter-spacing: -0.015em; }
.stage-title { font-size: 15px; margin-top: 6px; overflow-wrap: anywhere; }
.stage-meta { color: var(--meta); font-size: 13px; }
.stage-player { --pp-accent: var(--text); --pp-line: var(--rule); --pp-hover: var(--raised); --pp-radius: 8px; }
.stage-img { position: relative; height: min(66vh, 720px); background: var(--panel); border-radius: 8px; overflow: hidden; }
.stage-img > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.stage-img > .player { position: absolute; inset: 0; }
.stage-pdf { width: 100%; height: min(80vh, 960px); border: 0; border-radius: 8px; background: #fff; }
.stage-audio { width: 100%; }
.stage-card { display: grid; gap: 14px; justify-items: start; color: var(--muted); padding: 8px 0; }
.stage-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.stage-actions:empty { display: none; }
.boards { display: grid; gap: 10px; }
.boards-bar { display: flex; align-items: center; gap: 10px; }
.boards-count { flex: 1; text-align: center; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boards-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.board { flex: none; width: 72px; padding: 0; border: 0; background: none; cursor: pointer; opacity: 0.5; transition: opacity 0.12s; }
.board .pic { aspect-ratio: 4 / 5; }
.board:hover, .board[aria-current="true"] { opacity: 1; }

.side { display: grid; gap: 16px; min-width: 0; }
.side-block { background: var(--panel); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.side-block h2 { font-size: 14px; font-weight: 600; display: flex; gap: 8px; align-items: baseline; }
.note { white-space: pre-wrap; color: var(--text); }
.side-block textarea, .compose textarea { width: 100%; background: var(--ground); border: 1px solid var(--control); border-radius: 8px; padding: 9px 11px; font-size: 15px; resize: vertical; min-height: 72px; }
.side-block textarea:focus { outline: none; border-color: var(--parchment); }
.side-block > .btn { justify-self: start; }

.cuts { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 360px; overflow-y: auto; scrollbar-width: thin; }
.cut { display: grid; gap: 6px; padding: 6px; border-radius: var(--r-row); transition: background 0.12s; }
.cut:hover { background: var(--raised); }
.cut.is-on { background: var(--nested); }
.cut-pick { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 12px; align-items: center; padding: 0; border: 0; background: none; color: inherit; text-align: left; cursor: pointer; }
.cut-text { display: grid; min-width: 0; }
.cut-text b { font-weight: 500; display: flex; gap: 8px; align-items: baseline; overflow: hidden; white-space: nowrap; }
.cut-meta { color: var(--meta); font-size: 12px; }
.rtoggle { justify-self: start; margin-left: 100px; display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 9px; border-radius: 14px; border: 0;
  background: var(--raised); color: var(--muted); font: 500 12px/1 var(--body); cursor: pointer; transition: background 0.12s, color 0.12s; }
.cut.is-on .rtoggle { background: var(--panel); }
.rtoggle i { width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
.rtoggle:hover { color: var(--text); }
.rtoggle.is-review, .cut.is-on .rtoggle.is-review { background: var(--on); color: #00210d; }
.rtoggle.is-review i { background: #00210d; }
.rtoggle.is-static { cursor: default; background: transparent; padding-left: 0; }
.rtoggle.is-static.is-review { background: transparent; color: var(--on); }
.rtoggle.is-static.is-review i { background: var(--on); }
.rswitch-pair { display: flex; gap: 6px; flex: none; }
.rswitch { display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 18px; border: 0; background: var(--raised); color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.12s, color 0.12s; }
.rswitch--on[aria-pressed="true"] { background: var(--on); color: #00210d; }
.rswitch--off[aria-pressed="true"] { background: var(--off); color: #2a0503; }
.rstate { color: var(--muted); font-size: 14px; flex: none; }
.rstate.is-review { color: var(--on); }

/* comments */
.comments { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; scrollbar-width: thin; }
.comments:empty { display: none; }
.comment { background: var(--raised); border-radius: var(--r-row); padding: 10px 12px; display: grid; gap: 4px; }
.comment.is-client { background: rgba(245, 184, 61, 0.1); }
.comment.is-done { opacity: 0.55; }
.comment-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 12px; color: var(--meta); }
.comment-meta b { color: var(--text); font-size: 13px; font-weight: 500; }
.comment.is-client .who { color: var(--hue); }
.comment-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.tc { height: 22px; padding: 0 8px; border-radius: 11px; border: 0; background: var(--nested); color: var(--text); font: 500 12px/1 var(--body); cursor: pointer; }
.tc:hover { background: #3a3a3a; }
.done { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; margin-left: auto; }
.done input { margin: 0; accent-color: var(--on); }
.compose { display: grid; gap: 8px; }
.compose textarea:focus { outline: none; border-color: var(--parchment); }
.compose-foot { display: flex; align-items: center; gap: 10px; }
.at { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); cursor: pointer; }
.at input { margin: 0; accent-color: var(--text); }
.compose-who { color: var(--meta); font-size: 12px; margin-left: auto; }

/* previous / next piece */
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; }
.step { display: grid; gap: 2px; padding: 16px 20px; border-radius: var(--r); background: var(--panel); text-decoration: none; transition: background 0.12s; }
.step:hover { background: var(--raised); }
.step span { color: var(--meta); font-size: 13px; }
.step b { font: 400 20px/1.2 var(--display); }
.step--next { text-align: right; }
@media (max-width: 1000px) { .screen { grid-template-columns: 1fr; } .comments { max-height: none; } }
@media (max-width: 760px) {
  .stage-head { flex-direction: column; align-items: stretch; }
  .rswitch-pair .rswitch { flex: 1; justify-content: center; }
  .stage-img { height: min(60vh, 520px); }
  .steps { grid-template-columns: 1fr; }
  .step--next { text-align: left; }
}

/* ========== toast and the refresh pill ========== */
#toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%) translateY(8px); z-index: 50;
  max-width: min(36rem, calc(100vw - 2rem)); background: var(--parchment); color: #000; padding: 10px 16px; border-radius: 22px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s; overflow-wrap: anywhere; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.is-error { background: #ffd9d4; color: #4a0e0a; }
.pill { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 40; height: 40px; padding: 0 18px; border-radius: 20px; border: 0;
  background: var(--parchment); color: #000; font-size: 14px; font-weight: 500; cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5); /* taste-skill-ignore: the pill floats over the page */ }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
