/* Review room. A lightbox for vertical films: the frame is the hero, colour means status. */
:root {
  --paper: #EDF0F3;
  --surface: #F8F9FB;
  --ink: #18212B;
  --ink-2: #4F5B67;
  --ink-3: #75818D;
  --rule: #CAD2DA;
  --stage: #141B22;
  --stage-2: #232D37;
  --cobalt: #2B50C8;
  --cobalt-soft: #DCE4FA;
  --approve: #2E7A4C;
  --approve-soft: #DCEEE2;
  --changes: #9E5D0B;
  --changes-soft: #F5E7D1;
  --reject: #B23A3A;
  --reject-soft: #F5DCDC;
  --hold: #66707B;
  --hold-soft: #E3E7EB;
  --radius: 10px;
  --font: 'Schibsted Grotesk', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.5 var(--font);
}
.tc, .neon-table td, .scores select, .feed time { font-variant-numeric: tabular-nums; }
a { color: var(--cobalt); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: 21px; font-weight: 750; letter-spacing: -0.01em; }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 0.75em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── top bar ── */
.bar {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 14px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
  position: sticky; top: 0; z-index: 5;
}
.brand { font-weight: 850; font-size: 19px; letter-spacing: -0.02em; color: var(--ink); text-decoration: none; display: flex; align-items: center; gap: 9px; }
.brand::before { content: ''; width: 11px; height: 20px; border-radius: 3px; background: var(--cobalt); display: inline-block; }
#nav { display: flex; gap: 4px; flex: 1; align-items: center; flex-wrap: wrap; }
#nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 550; }
#nav a[aria-current='page'] { color: var(--ink); background: var(--paper); }
#nav .who { margin-left: auto; color: var(--ink-3); font-size: 14px; }
#nav button.linkish { background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 6px 8px; font-size: 14px; }

main { padding: clamp(18px, 4vw, 40px); max-width: 1320px; margin: 0 auto; }
main:focus { outline: none; }
.loading, .empty { color: var(--ink-3); }
.plain { max-width: 560px; padding-top: 12vh; }
.plain h1 { margin-bottom: 14px; }

/* ── status chips ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 650; line-height: 1;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--hold-soft); color: var(--hold);
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.awaiting_review, .chip.final_ready { background: var(--cobalt-soft); color: var(--cobalt); }
.chip.approved_for_final, .chip.approved_for_upload, .chip.published, .chip.approve { background: var(--approve-soft); color: var(--approve); }
.chip.changes_requested, .chip.in_revision, .chip.changes, .chip.discuss { background: var(--changes-soft); color: var(--changes); }
.chip.reject, .chip.no { background: var(--reject-soft); color: var(--reject); }
.chip.yes { background: var(--approve-soft); color: var(--approve); }

/* ── home: the contact sheet ── */
.lead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.lead p { color: var(--ink-2); margin: 0; max-width: 62ch; }
.sheet {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 190px);
  gap: 16px; overflow-x: auto; padding: 4px 2px 18px; margin-bottom: 34px;
  scroll-snap-type: x proximity;
}
.frame { text-decoration: none; color: inherit; scroll-snap-align: start; }
.frame .poster {
  aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; position: relative;
  background: var(--stage); box-shadow: 0 0 0 1px rgba(20, 27, 34, 0.12);
}
.frame .poster img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s ease; }
.frame:hover .poster img { transform: scale(1.025); }
.frame .poster .chip { position: absolute; left: 8px; bottom: 8px; }
.frame .t { font-weight: 700; margin-top: 9px; line-height: 1.25; }
.frame .s { font-size: 13px; color: var(--ink-3); }

.series { margin-top: 10px; }
.series > header { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 6px; }
.series details { margin: 10px 0 16px; }
.series summary { cursor: pointer; color: var(--cobalt); font-weight: 600; }
.briefing { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; margin-top: 10px; max-width: 78ch; }

.row {
  display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--rule); color: inherit; text-decoration: none;
}
.row:hover .rt { color: var(--cobalt); }
.row img { width: 58px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 7px; background: var(--stage); display: block; }
.rt { font-weight: 700; font-size: 17px; }
.rm { font-size: 14px; color: var(--ink-2); display: flex; gap: 6px 14px; flex-wrap: wrap; margin-top: 3px; }
.rr { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

/* score bars: seven thin columns, height = score */
.bars { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.bars span { width: 7px; background: var(--ink-3); border-radius: 2px 2px 0 0; opacity: 0.75; }
.bars span.lo { background: var(--reject); }
.bars span.mid { background: var(--changes); }
.bars span.hi { background: var(--approve); }

/* ── film page ── */
.crumbs { margin-bottom: 14px; font-size: 14px; }
.film-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.film-head .sub { color: var(--ink-2); margin-top: 6px; }
.stage-note { margin-top: 8px; color: var(--ink-2); font-size: 15px; max-width: 70ch; }

.film { display: grid; grid-template-columns: minmax(280px, 420px) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: start; }
.screen { position: sticky; top: 76px; background: var(--stage); border-radius: 18px; padding: 14px; color: #DCE3EA; }
.screen video { width: 100%; aspect-ratio: 9 / 16; display: block; border-radius: 10px; background: #000; max-height: 76vh; object-fit: contain; }
.screen .nofile { aspect-ratio: 9 / 16; display: grid; place-items: center; text-align: center; padding: 20px; color: #9AA7B4; }
.track { position: relative; height: 18px; margin: 12px 4px 4px; border-radius: 4px; background: var(--stage-2); cursor: pointer; }
.track .head { position: absolute; top: 0; bottom: 0; width: 2px; background: #fff; opacity: 0.6; pointer-events: none; }
.track button {
  position: absolute; top: 2px; width: 10px; height: 14px; margin-left: -5px; padding: 0;
  border: 0; border-radius: 3px; background: #F2B24A; cursor: pointer;
}
.track button.done { background: #6C7A88; }
.vmeta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: #9AA7B4; margin: 10px 4px 0; flex-wrap: wrap; }
.screen select { background: var(--stage-2); color: #E8EDF2; border: 1px solid #3A4652; border-radius: 8px; padding: 7px 10px; width: 100%; margin-top: 12px; }

.panel { padding: 22px 0 26px; border-bottom: 1px solid var(--rule); }
.panel:first-child { padding-top: 0; }
.panel > h2 { margin-bottom: 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.panel > h2 small { font-size: 14px; font-weight: 500; color: var(--ink-3); }
.hint { color: var(--ink-3); font-size: 14px; }

.decide { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; border-left: 4px solid var(--ink); }

.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 9px 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg label + label span { border-left: 1px solid var(--rule); }
.seg input:focus-visible + span { outline: 3px solid var(--cobalt); outline-offset: -3px; }
.seg input[value='approve']:checked + span { background: var(--approve); color: #fff; }
.seg input[value='changes']:checked + span { background: var(--changes); color: #fff; }
.seg input[value='reject']:checked + span { background: var(--reject); color: #fff; }

.scores { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px 12px; margin: 14px 0; }
.scores label { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.scores select { padding: 4px 6px; border: 1px solid var(--rule); border-radius: 6px; background: #fff; }

textarea, input[type='text'], input[type='email'], select.field {
  width: 100%; border: 1px solid var(--rule); border-radius: 8px; background: #fff; padding: 10px 12px; line-height: 1.45;
}
textarea { min-height: 84px; resize: vertical; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }

.btn {
  appearance: none; border: 1px solid var(--rule); background: var(--surface); color: var(--ink);
  font-weight: 650; padding: 9px 15px; border-radius: 9px; cursor: pointer; line-height: 1.2;
}
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--cobalt); border-color: var(--cobalt); color: #fff; }
.btn.go { background: var(--approve); border-color: var(--approve); color: #fff; }
.btn.warn { background: var(--changes); border-color: var(--changes); color: #fff; }
.btn.small { padding: 5px 10px; font-size: 14px; font-weight: 600; }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn.on { box-shadow: inset 0 0 0 2px currentColor; }

.people-says { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 12px; }
.people-says li { display: grid; gap: 4px; }
.who-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.who-line b { color: var(--ink); }

.notes { list-style: none; padding: 0; margin: 14px 0 0; }
.notes > li { padding: 12px 0; border-top: 1px solid var(--rule); display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 12px; }
.notes > li.resolved { opacity: 0.6; }
.tc { font-weight: 700; color: var(--cobalt); background: var(--cobalt-soft); border: 0; border-radius: 6px; padding: 3px 7px; cursor: pointer; height: fit-content; font-size: 14px; }
.tc.none { background: var(--hold-soft); color: var(--hold); cursor: default; }
.replies { list-style: none; padding: 0 0 0 14px; margin: 8px 0 0; border-left: 2px solid var(--rule); display: grid; gap: 8px; }
.note-tools { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.linkish { background: none; border: 0; padding: 0; color: var(--cobalt); cursor: pointer; font-size: 14px; font-weight: 600; }

.proposals { list-style: none; counter-reset: p; padding: 0; margin: 0; display: grid; gap: 4px; }
.proposals li { counter-increment: p; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 12px 0; border-top: 1px solid var(--rule); }
.proposals li::before { content: counter(p); font-weight: 800; color: var(--ink-3); font-size: 18px; line-height: 1.3; }
.votes { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.votes .names { font-size: 13px; color: var(--ink-3); }

.neon-table { width: 100%; border-collapse: collapse; font-size: 14px; margin: 6px 0 12px; }
.neon-table th, .neon-table td { text-align: center; padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.neon-table th:first-child, .neon-table td:first-child { text-align: left; }
.neon-table th { font-weight: 600; color: var(--ink-3); }
.neon-table tr.current td { font-weight: 750; }
.sc { display: inline-block; min-width: 30px; padding: 2px 4px; border-radius: 5px; }
.sc.lo { background: var(--reject-soft); color: var(--reject); }
.sc.mid { background: var(--changes-soft); color: var(--changes); }
.sc.hi { background: var(--approve-soft); color: var(--approve); }

.md { max-width: 74ch; }
.md h1, .md h2, .md h3, .md h4 { font-size: 17px; margin: 1.2em 0 0.4em; }
.md ul, .md ol { padding-left: 1.3em; margin: 0 0 0.8em; }
.md li { margin: 0.2em 0; }
.md table { border-collapse: collapse; font-size: 14px; margin: 0 0 1em; display: block; overflow-x: auto; }
.md td, .md th { border: 1px solid var(--rule); padding: 4px 8px; text-align: left; }
.md code { background: var(--hold-soft); padding: 1px 5px; border-radius: 4px; font-size: 0.92em; }
.md blockquote { margin: 0 0 0.8em; padding-left: 12px; border-left: 3px solid var(--rule); color: var(--ink-2); }
details.long > summary { cursor: pointer; color: var(--cobalt); font-weight: 600; margin: 6px 0; }
details.long[open] > summary { margin-bottom: 12px; }

.feed { list-style: none; padding: 0; margin: 0; }
.feed li { padding: 9px 0; border-bottom: 1px solid var(--rule); display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; }
.feed time { color: var(--ink-3); font-size: 14px; white-space: nowrap; }

.ppl { width: 100%; border-collapse: collapse; }
.ppl td, .ppl th { padding: 10px 8px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.ppl th { font-weight: 600; color: var(--ink-3); font-size: 14px; }
.invite { background: var(--surface); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.invite code { word-break: break-all; display: block; background: #fff; border: 1px solid var(--rule); padding: 10px; border-radius: 8px; margin: 8px 0; }
.form-grid { display: grid; grid-template-columns: 2fr 2fr 1fr auto; gap: 10px; align-items: end; max-width: 860px; }
.form-grid label { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }

#toast {
  position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 30px); opacity: 0;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600;
  transition: opacity 0.2s, transform 0.2s; pointer-events: none; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--reject); }

@media (max-width: 860px) {
  .film { grid-template-columns: minmax(0, 1fr); }
  .screen { position: static; max-width: 440px; margin: 0 auto; width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 46px minmax(0, 1fr); }
  .row img { width: 46px; }
  .rr { grid-column: 2; align-items: flex-start; flex-direction: row; flex-wrap: wrap; }
  .bar { gap: 6px; flex-direction: column; align-items: stretch; padding-top: 10px; padding-bottom: 8px; }
  #nav { gap: 2px; }
  #nav a { padding: 6px 8px; }
  #nav .who { display: none; }
  #nav button.linkish { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ── forms shared by sign-in, accounts and posts ── */
input[type='password'], input[type='number'], input[type='url'], input[type='datetime-local'] {
  width: 100%; border: 1px solid var(--rule); border-radius: 8px; background: #fff; padding: 10px 12px; line-height: 1.45;
}
.page-title { margin-bottom: 8px; }
.lede { margin-bottom: 22px; max-width: 78ch; font-size: 15px; }
.stack { display: grid; gap: 12px; max-width: 720px; }
.stack.narrow { max-width: 460px; }
.plain .stack { margin: 18px 0 14px; }
.fld { display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
.fld > span { font-weight: 600; }
.fld small { font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.row-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-top: 10px; }
.row-form .fld { flex: 1 1 130px; }
.check { display: flex; gap: 8px; align-items: baseline; font-size: 15px; color: var(--ink-2); cursor: pointer; }
.check input { flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.actions.tight { margin-top: 8px; gap: 6px; }
.seg.tabs { margin-top: 8px; }
.seg.tabs button { border: 0; background: none; padding: 9px 14px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.seg.tabs button + button { border-left: 1px solid var(--rule); }
.seg.tabs button.on { background: var(--ink); color: #fff; }
#nav a.who { margin-left: auto; font-weight: 500; }
.nudge { background: var(--cobalt-soft); border-radius: var(--radius); padding: 10px 14px; margin-bottom: 18px; font-size: 15px; }
.scroll-x { overflow-x: auto; }
.ppl.nums td:not(:first-child), .ppl.nums th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.ppl tr.gone { opacity: 0.55; }
.ppl td select.field { padding: 6px 8px; min-width: 120px; }

/* ── cards: accounts, posts, sign-ups waiting ── */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.card.account.paused, .card.account.retired { opacity: 0.7; }
.account-head { display: flex; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.figures { display: flex; gap: 28px; margin: 0; }
.figures dt { font-size: 13px; color: var(--ink-3); }
.figures dd { margin: 0; font-size: 24px; font-weight: 750; letter-spacing: -0.01em; line-height: 1.2; }
.figures small { font-size: 13px; color: var(--ink-3); }
.slot:not(:empty) { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.problem { color: var(--reject); font-size: 14px; margin-top: 6px; max-width: 80ch; }
.panel.notice { background: var(--cobalt-soft); border-radius: var(--radius); padding: 18px 20px 20px; border-bottom: 0; margin-bottom: 18px; }
.post-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 4px; }
.chips { display: flex; gap: 8px 18px; flex-wrap: wrap; margin-top: 8px; }
.pair { display: inline-flex; gap: 8px; align-items: center; }
.by-account { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; font-size: 14px; color: var(--ink-2); }
td details > summary { cursor: pointer; font-weight: 650; }

/* ── reach: figures first, then one line ── */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 8px; }
.tile { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius); padding: 14px 16px; }
.tile-label { font-size: 14px; color: var(--ink-2); }
.tile-value { font-size: 34px; font-weight: 750; letter-spacing: -0.02em; line-height: 1.15; }
.tile-note { font-size: 13px; color: var(--ink-3); }
.chart-wrap { position: relative; max-width: 860px; }
.chart { width: 100%; height: auto; display: block; touch-action: pan-y; }
.chart:focus-visible { outline-offset: 4px; }
.chart .grid { stroke: var(--rule); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font-size: 12px; }
.chart .end { fill: var(--ink); font-size: 14px; font-weight: 700; }
.chart .line { fill: none; stroke: var(--cobalt); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .dot { fill: var(--cobalt); stroke: var(--paper); stroke-width: 2; }
.chart .hair { stroke: var(--ink-3); stroke-width: 1; }
.tip {
  position: absolute; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; white-space: nowrap;
  background: var(--ink); color: #fff; padding: 6px 10px; border-radius: 8px; font-size: 13px;
}
.tip b { font-size: 15px; }

@media (max-width: 860px) {
  #nav a.who { margin-left: 0; display: inline; }
  .figures { gap: 20px; }
}
