/* Edit Bay. Style: achromatic ledger. The chrome is ink on a studio grey; the one hue (--live) marks
   what has gone out: a live platform on a card, the current week in a chart.
   Board grid at 1440: 5 columns x 268.8 + 4 gaps x 12 = 1392 = 1440 - 2 x 24. */

:root {
  --ground: #f2f3f3;
  --surface: #ffffff;
  --raised: #e9eaea;
  --active: #e4e5e5;
  --border: #e0e1e1;
  --rule: #eeefef;
  --control: #cdcfcf;
  --text: #0a0a0a;
  --ink: #0a0a0a;
  --muted: #5d5f61;
  --primary: #141414;
  --live: #1d5fbf;
  --positive: #2e7d32;
  --negative: #c4242a;
  --pill-warning-bg: #fffbeb;
  --pill-warning-ink: #92400e;
  --pill-warning-edge: #fde68a;
  --pill-neutral-bg: #e9eaea;
  --pill-neutral-ink: #3d3d3d;
  --pill-positive-bg: #dcfae5;
  --pill-positive-ink: #04250e;
  --chart-1: #1d5fbf;
  --chart-2: #8a8a8a;
  --chart-muted: #141414;
  --grid: #e3e4e4;
  --axis-ink: #5d5f61;
  --radius-card: 8px;
  --radius-control: 6px;
  --gap: 12px;
  --pad: 24px;
  --control-height: 36px;
  --font: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font: 400 14px/20px var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.boot { padding: 96px 24px; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ---------- shell ---------- */
.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 24px; height: 52px; padding: 0 var(--pad); background: var(--ground); border-bottom: 1px solid var(--border); }
.mark { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; text-decoration: none; white-space: nowrap; }
.mark svg { display: block; }
.nav { display: flex; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: var(--radius-control); text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.nav a[aria-current] { background: var(--active); color: var(--text); }
.count { min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 11px; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums; }
.top .grow { flex: 1; }
.seg { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--raised); }
.seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); }
.who { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 22px; height: 22px; border-radius: 50%; font-size: 11px; font-weight: 500; line-height: 1; }
.me { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 5px; border: 0; border-radius: var(--radius-control); background: none; cursor: pointer; }
.me:hover { background: var(--active); }
.menu { position: absolute; right: var(--pad); top: 48px; min-width: 180px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.menu button { display: block; width: 100%; height: 36px; padding: 0 10px; border: 0; border-radius: var(--radius-control); background: none; text-align: left; cursor: pointer; }
.menu button:hover { background: var(--raised); }

main { padding: 28px var(--pad) 72px; }
.col { max-width: 1152px; margin: 0 auto; }
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.head h1 { font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.head .finding { margin-top: 4px; color: var(--muted); }
.head .finding b { color: var(--text); font-weight: 500; }
.head .tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.tabbar { display: none; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--control-height); padding: 0 14px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { border-color: var(--primary); background: var(--primary); color: #fff; }
.btn.primary:hover { background: #2a2a2a; }
.btn.small { height: 28px; padding: 0 10px; font-size: 13px; }
.btn:disabled { color: var(--muted); cursor: default; border-color: var(--border); }
.link { padding: 0; border: 0; background: none; color: var(--text); text-decoration: underline; text-decoration-color: var(--control); text-underline-offset: 3px; cursor: pointer; }
.link:hover { text-decoration-color: var(--text); }
.link.danger { color: var(--negative); text-decoration-color: currentColor; }
.field, select.field, textarea.field { width: 100%; height: var(--control-height); padding: 0 10px; border: 1px solid var(--control); border-radius: var(--radius-control); background: var(--surface); }
textarea.field { height: auto; min-height: 84px; padding: 8px 10px; line-height: 20px; resize: vertical; }
select.field { appearance: none; padding-right: 28px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%235d5f61' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select.field.auto { width: auto; }
.field::placeholder { color: var(--muted); }
label.f { display: block; }
label.f > span { display: block; margin-bottom: 6px; font-weight: 500; }
.checks { display: flex; flex-wrap: wrap; gap: 16px; }
.checks label, .check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.pill { display: inline-flex; align-items: center; flex: none; height: 20px; padding: 0 8px; border-radius: 10px; background: var(--pill-neutral-bg); color: var(--pill-neutral-ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.pill.warn { background: var(--pill-warning-bg); color: var(--pill-warning-ink); box-shadow: inset 0 0 0 1px var(--pill-warning-edge); }
.pill.good { background: var(--pill-positive-bg); color: var(--pill-positive-ink); }
.late { color: var(--negative); }
.panel { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.empty { padding: 10px 12px; border: 1px dashed var(--control); border-radius: var(--radius-card); color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 88px; z-index: 30; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 14px; border-radius: var(--radius-card); background: var(--primary); color: #fff; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }

/* ---------- the release strip: where a video has gone out ---------- */
.strip { display: flex; gap: 4px; }
.rel { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 20px; padding: 0; border: 1px solid var(--control); border-radius: 4px; background: none; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1; }
.rel.live { border-color: var(--live); background: var(--live); color: #fff; }
button.rel { cursor: pointer; }
button.rel:hover { border-color: var(--text); }

/* ---------- board ---------- */
.inbox { margin-bottom: 20px; padding: 12px 16px; }
.inbox summary { font-weight: 500; cursor: pointer; }
.inbox .row { margin-top: 8px; }
@media (min-width: 901px) { .inbox summary { display: none; } .inbox .row:first-of-type { margin-top: 0; } }
.inbox .row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.inbox .row p { flex: 1; min-width: 220px; }
.stagetabs { display: none; }
.board { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.lane { min-width: 0; border-radius: var(--radius-card); }
.lane.over { background: var(--raised); box-shadow: 0 0 0 6px var(--raised); }
.lane h2 { display: flex; align-items: baseline; gap: 8px; height: 28px; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.lane h2 span { color: var(--muted); font-weight: 400; }
.cards { display: grid; gap: 8px; }
.card { display: grid; gap: 10px; padding: 12px; cursor: pointer; text-align: left; }
.card:hover { border-color: var(--control); }
.card.dragging { opacity: .4; }
.card h3 { font-size: 14px; font-weight: 500; line-height: 20px; overflow-wrap: anywhere; }
.card .sub { margin-top: 2px; color: var(--muted); font-size: 12px; line-height: 16px; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; line-height: 16px; }
.card .person { display: flex; align-items: center; gap: 6px; min-width: 0; }
.card .person span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card .acts { display: flex; align-items: center; gap: 12px; }

/* ---------- sheets and dialogs ---------- */
dialog { padding: 0; border: 0; color: var(--text); background: var(--surface); }
dialog::backdrop { background: rgba(10, 10, 10, .28); }
dialog.sheet { position: fixed; inset: 0 0 0 auto; width: min(520px, 100vw); max-width: none; height: 100dvh; max-height: none; margin: 0; border-left: 1px solid var(--border); box-shadow: -12px 0 32px rgba(0, 0, 0, .1); overflow-y: auto; }
dialog.modal { width: min(480px, calc(100vw - 32px)); border-radius: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, .2); }
.sheet-in { display: grid; gap: 24px; padding: 20px 24px 40px; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.sheet h2, .modal h2 { font-size: 18px; line-height: 24px; font-weight: 600; }
.sheet h3 { margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.form { display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal .form { padding: 24px; }
.modal .end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.stagebar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.relrow { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: 12px; min-height: 48px; padding: 6px 0; border-top: 1px solid var(--rule); }
.relrow:first-of-type { border-top: 0; }
.relrow .state { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.note { padding: 10px 0; border-top: 1px solid var(--rule); }
.note:first-child { border-top: 0; }
.note .by { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 12px; color: var(--muted); }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; }
.saved { color: var(--muted); font-size: 12px; }
.history { display: grid; gap: 4px; font-size: 12px; line-height: 18px; color: var(--muted); }

/* ---------- to-dos ---------- */
.adder { display: flex; gap: 8px; margin-bottom: 24px; }
.adder .field:first-child { flex: 1; }
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); align-items: start; }
.desk { padding: 16px; }
.desk h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; font-weight: 500; }
.desk h2 .n { margin-left: auto; color: var(--muted); font-weight: 400; }
.todo { display: grid; grid-template-columns: 18px 1fr auto; align-items: start; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); }
.todo:first-of-type { border-top: 0; }
.todo input { margin-top: 1px; }
.todo p { overflow-wrap: anywhere; }
.todo .when { font-size: 12px; white-space: nowrap; color: var(--muted); }
.todo.done p { color: var(--muted); text-decoration: line-through; }
details.donebox { margin-top: 24px; }
details.donebox summary { cursor: pointer; color: var(--muted); }
details.donebox .desk { margin-top: 12px; }

/* ---------- updates ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) 368px; gap: 24px; align-items: start; }
.feed { padding: 4px 20px; }
.feed h2 { padding: 16px 0 4px; font-size: 12px; font-weight: 500; color: var(--muted); }
.ev { display: grid; grid-template-columns: 44px 22px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--rule); }
.feed h2 + .ev { border-top: 0; }
.ev time { color: var(--muted); font-size: 12px; }
.ev .said { margin-top: 2px; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.ev.fresh p:first-child { font-weight: 500; }
.newline { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--live); font-size: 12px; font-weight: 500; }
.newline::after { content: ""; flex: 1; height: 1px; background: var(--live); }
.auto { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--raised); color: var(--muted); font-size: 11px; }
.rail { padding: 16px 20px; }
.rail h2 { margin-bottom: 4px; font-size: 14px; font-weight: 500; }
.rail .p { display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--rule); }
.rail .p:first-of-type { border-top: 0; }
.rail .p small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

/* ---------- analytics ---------- */
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.metric { padding: 20px; }
.metric .label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--muted); }
.metric .value { margin: 6px 0 2px; font-size: 30px; line-height: 36px; font-variant-numeric: tabular-nums; }
.metric .value small { font-size: 14px; color: var(--muted); }
.metric .sub { margin-bottom: 12px; color: var(--muted); font-size: 12px; }
.sect { margin: 32px 0 12px; display: flex; align-items: center; gap: 12px; min-height: 32px; }
.sect h2 { font-size: 16px; font-weight: 500; }
.sect .tools { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.lower { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 24px; align-items: start; }
table.vids { width: 100%; border-collapse: collapse; }
.vids th { height: 36px; padding: 0 12px; font-size: 12px; font-weight: 400; color: var(--muted); text-align: left; white-space: nowrap; }
.vids td { padding: 10px 12px; border-top: 1px solid var(--rule); vertical-align: top; }
.vids th.num, .vids td.num { text-align: right; white-space: nowrap; }
.vids td:first-child, .vids th:first-child { padding-left: 20px; }
.vids td:last-child, .vids th:last-child { padding-right: 20px; }
.vids .t a { text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.vids .t a:hover { text-decoration: underline; }
.vids .t small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.vids .gain { color: var(--positive); }
.more { padding: 12px 20px; border-top: 1px solid var(--rule); }
.folrow { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--rule); }
.fol { padding: 16px 20px; background: var(--surface); }
.fol .value { font-size: 24px; line-height: 30px; font-variant-numeric: tabular-nums; }
.fol .value small { font-size: 12px; color: var(--muted); }
.fol p { color: var(--muted); font-size: 12px; }
.fol .chart { margin-top: 8px; }

/* ---------- settings ---------- */
.subnav { display: flex; gap: 20px; margin-bottom: 28px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.subnav a { padding: 8px 0; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; white-space: nowrap; }
.subnav a[aria-current] { border-color: var(--ink); color: var(--text); }
.setrow { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: 32px; padding: 0 0 32px; margin-bottom: 32px; border-bottom: 1px solid var(--border); }
.setrow:last-child { border-bottom: 0; }
.setrow > div:first-child h2 { margin-bottom: 4px; font-size: 16px; font-weight: 500; }
.setrow > div:first-child p { color: var(--muted); max-width: 44ch; }
.setrow > div:first-child p + p { margin-top: 8px; }
.box { padding: 16px; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); }
.box .form { gap: 12px; }
.line { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 6px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.line:first-child { border-top: 0; }
.line .name { flex: 1; min-width: 140px; }
.line .name small { display: block; font-size: 12px; color: var(--muted); }
.line .field { flex: 1; min-width: 180px; }
.grid3 { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 8px 12px; align-items: center; }
.grid3 .h { font-size: 12px; color: var(--muted); }
.grid3 input { text-align: right; }

/* ---------- sign in ---------- */
.door { display: grid; place-items: center; min-height: 100dvh; padding: 24px; }
.door .panel { width: min(380px, 100%); padding: 28px; }
.door h1 { margin: 20px 0 4px; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.01em; }
.door p { margin-bottom: 20px; color: var(--muted); }
.door .err { margin: 0; color: var(--negative); }

/* ---------- tablet and phone ---------- */
@media (max-width: 1100px) {
  .split, .lower { grid-template-columns: minmax(0, 1fr); }
  .setrow { grid-template-columns: minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 900px) {
  :root { --pad: 16px; }
  .top { gap: 12px; height: 48px; }
  .top .nav { display: none; }
  .top .mark span { display: none; }
  .top h1 { font-size: 16px; font-weight: 600; }
  .me span:last-child { display: none; }
  main { padding: 20px var(--pad) 96px; }
  .head { flex-wrap: wrap; align-items: flex-start; }
  .head h1 { font-size: 20px; line-height: 26px; }
  .head .tools { margin-left: 0; width: 100%; }
  .head .tools .btn.primary { margin-left: auto; }
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--border); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 56px; color: var(--muted); font-size: 12px; text-decoration: none; }
  .tabbar a[aria-current] { color: var(--text); font-weight: 500; }
  .tabbar a i { width: 20px; height: 3px; border-radius: 2px; background: transparent; }
  .tabbar a[aria-current] i { background: var(--ink); }
  .tabbar .count { position: absolute; margin: -34px 0 0 44px; }
  .stagetabs { display: flex; gap: 6px; margin: 0 calc(var(--pad) * -1) 16px; padding: 0 var(--pad); overflow-x: auto; scrollbar-width: none; }
  .stagetabs button { flex: none; height: 36px; padding: 0 12px; border: 1px solid var(--control); border-radius: 18px; background: none; color: var(--muted); }
  .stagetabs button[aria-pressed="true"] { border-color: var(--primary); background: var(--primary); color: #fff; }
  .board { grid-template-columns: minmax(0, 1fr); }
  .lane { display: none; }
  .lane.on { display: block; }
  .lane h2 { display: none; }
  .three { grid-template-columns: minmax(0, 1fr); }
  .adder { flex-wrap: wrap; }
  .adder .field:first-child { flex: 1 0 100%; }
  .adder select.field.auto, .adder input[type="date"] { flex: 1; }
  .btn, .field { min-height: 40px; }
  .card .sub, .card .meta, .todo .when, .ev time, .rail .p small, .metric .sub, .fol p, .vids .t small, .line .name small, .history { font-size: 13px; line-height: 18px; }
  .rel { width: 32px; height: 22px; font-size: 12px; }
  .pill { height: 22px; font-size: 13px; }
  .btn.small { min-height: 32px; }
  .vids thead { display: none; }
  .vids tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 16px; border-top: 1px solid var(--rule); }
  .vids td { padding: 0 !important; border: 0; }
  .vids td.t { grid-column: 1; grid-row: 1 / span 2; }
  .vids td.views { grid-column: 2; }
  .vids td.views::after { content: " views"; color: var(--muted); font-size: 12px; }
  .vids td.out, .vids td.likes, .vids td.com { display: none; }
  .vids td.gain7 { grid-column: 2; font-size: 12px; }
  dialog.sheet { width: 100vw; border-left: 0; }
  .sheet-in { padding: 16px 16px 40px; }
  .relrow { grid-template-columns: 84px 1fr auto; }
  .grid3 { grid-template-columns: 1.2fr repeat(3, 1fr); }
  .ev { grid-template-columns: 40px 22px 1fr; }
}
