/* Naive Pipe. Minimal, warm-neutral, Inter with JetBrains Mono for numbers. Colours match the foundation deck. */

:root {
  --ink: #1D1B1A;
  --ink-2: #3D3835;
  --muted: #6B6460;
  --faint: #A8A09A;
  --line: #E7E2DD;
  --tint: #F4F1EE;
  --tint-2: #ECE7E2;
  --bg: #FFFFFF;
  --accent: #D9472F;

  --s-todo: #B5AEA8;
  --s-wip: #E0A23D;
  --s-review: #4F7CAC;
  --s-retake: #D9472F;
  --s-done: #6E7F3A;

  --font: Inter, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace; /* dates, numbers, badges */
  --shadow: 0 8px 28px rgba(29, 27, 26, .14);
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
h1 { margin: 0; font-size: 30px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; }
h2 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
p { margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.late { color: var(--accent); font-weight: 600; }
.link { text-decoration: underline; }
.note { margin-top: 16px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty h1 { color: var(--ink); margin-bottom: 8px; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot.big { width: 11px; height: 11px; }
.kicker { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin: 32px 0 10px; }
.num { font-family: var(--mono); font-size: .92em; }
.type { font-size: 10px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--faint); }

/* ---- Top bar */

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 20px; height: 58px; padding: 0 28px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.brand { font-size: 17px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.brand span { font-weight: 400; color: var(--muted); }
.brand.big { font-size: 22px; }
.nav { display: flex; gap: 2px; }
.nav a { padding: 7px 13px; border-radius: 999px; color: var(--muted); white-space: nowrap; }
.nav a:hover { color: var(--ink); }
.nav a.on { color: var(--ink); background: var(--tint); font-weight: 600; }
.search { flex: 0 1 240px; min-width: 120px; }
.search input { width: 100%; height: 34px; padding: 0 14px; border: 1px solid transparent; border-radius: 999px; background: var(--tint); outline: none; }
.search input:focus { background: #fff; border-color: var(--line); }
.user-btn { border: 0; background: none; padding: 0; cursor: pointer; display: flex; }
.search-results { width: 360px; }
.online-now { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.online-now:hover { background: var(--tint); }
.av-wrap { position: relative; display: inline-flex; }
.online-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #3DAA4F; }
.online-dot.static { position: static; width: 8px; height: 8px; border: 0; }
.online-dot.off { background: var(--faint); }
.online { color: #2E8A3E; font-weight: 600; }
.nowrap { white-space: nowrap; }
.tl-day .dow { display: block; font-size: 9px; }
.tl-day:has(.dow) { line-height: 1.15; }

/* ---- Layout */

.main { --gutter: 28px; padding: 32px var(--gutter) 72px; } /* full window width */
.narrow { max-width: 760px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 80px; gap: 10px; }
.form { display: flex; flex-direction: column; gap: 14px; }
.small-form { width: 260px; padding: 8px; }

/* ---- Controls */

.btn { height: 34px; padding: 0 15px; border: 1px solid var(--line); border-radius: 999px; background: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--faint); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--ink); background: var(--tint); }
.btn.danger:hover { color: var(--accent); }
.btn.small { height: 26px; padding: 0 10px; font-size: 12px; }
.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--tint); }
.seg button { border: 0; background: none; padding: 5px 13px; border-radius: 999px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.seg button:disabled { opacity: .35; cursor: default; }
.select, .filter { height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; outline: none; }
.filter { width: 220px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); outline: none; }
.field textarea, .form textarea { height: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; outline: none; resize: vertical; }
.field input:focus, .field select:focus, textarea:focus { border-color: var(--faint); }
.field input:disabled { background: var(--tint); color: var(--muted); }
.inline { min-width: 0; width: 100%; padding: 4px 6px; border: 1px solid transparent; border-radius: 6px; background: none; outline: none; }
.inline:hover:not(:disabled) { border-color: var(--line); }
.inline:focus { border-color: var(--faint); background: #fff; }
.inline:disabled { color: inherit; }
.inline.name { font-weight: 700; }
.x { border: 0; background: none; padding: 0 4px; color: var(--faint); font-size: 15px; line-height: 1; cursor: pointer; }
.x:hover { color: var(--ink); }
.icon-btn { flex: none; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--tint); font-size: 18px; line-height: 1; cursor: pointer; }

/* ---- Status chips */

.chip { display: inline-flex; align-items: center; justify-content: center; height: 22px; min-width: 78px; padding: 0 10px; border: 0; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
button.chip { cursor: pointer; }
button.chip:disabled { cursor: default; }
button.chip:not(:disabled):hover { filter: brightness(1.06); }
.chip.small { height: 19px; min-width: 64px; padding: 0 8px; font-size: 10px; }
.chip.ghost { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); }
.s-todo { background: var(--s-todo); }
.s-wip { background: var(--s-wip); }
.s-review { background: var(--s-review); }
.s-retake { background: var(--s-retake); }
.s-done { background: var(--s-done); }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- Avatars and thumbnails */

.avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; border: 1.5px solid transparent; border-radius: 50%; font-weight: 700; letter-spacing: .02em; user-select: none; }
.avatar.placeholder { border-style: dashed; }
.avatar[draggable="true"] { cursor: grab; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -6px; box-shadow: 0 0 0 2px #fff; }
.thumb { flex: none; width: 56px; height: 34px; border-radius: 6px; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.thumb-btn { border: 0; background: none; padding: 0; cursor: pointer; display: block; }
.thumb-btn:disabled { cursor: default; }

/* ---- Popovers, menus, modals */

.popover { position: absolute; z-index: 50; min-width: 190px; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.menu { display: flex; flex-direction: column; gap: 1px; }
.menu-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.menu-item:hover { background: var(--tint); }
.menu-item.on { font-weight: 700; }
.menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu-empty { padding: 10px; }
.modal-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(29, 27, 26, .3); }
.modal { width: min(620px, 100%); max-height: 90vh; overflow: auto; display: flex; flex-direction: column; gap: 18px; padding: 26px; border-radius: 18px; background: #fff; box-shadow: var(--shadow); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.preview { max-height: 220px; overflow: auto; font-size: 12px; }
.preview table { width: 100%; border-collapse: collapse; }
.preview th, .preview td { padding: 5px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.preview th { color: var(--muted); font-weight: 600; }

/* ---- Drawer */

#drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 30; width: 400px; max-width: 100vw; overflow: auto; background: #fff; border-left: 1px solid var(--line); box-shadow: -14px 0 36px rgba(29, 27, 26, .08); transform: translateX(102%); transition: transform .18s ease; }
#drawer.open { transform: none; }
.drawer-inner { display: flex; flex-direction: column; gap: 24px; padding: 26px; }
.drawer-head { display: flex; justify-content: space-between; gap: 12px; }
.drawer-head h2 { font-size: 22px; margin-bottom: 4px; }
.assignees { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.assignee { display: inline-flex; align-items: center; gap: 7px; padding: 3px 6px 3px 3px; border-radius: 999px; background: var(--tint); font-size: 13px; }
.add-person { height: 30px; padding: 0 10px; border: 1px dashed var(--faint); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; }
.budget-row { display: grid; grid-template-columns: 110px 1fr; align-items: end; gap: 12px; margin-top: -10px; }
.budget-row > div { padding-bottom: 9px; }
.note-box { padding: 16px; border-radius: 12px; background: var(--tint); color: var(--muted); font-size: 13px; line-height: 1.5; }
.note-box strong { color: var(--ink); }

/* ---- My day */

.list { display: flex; flex-direction: column; gap: 6px; padding: 8px; border-radius: 18px; background: var(--tint); }
.task-row { display: flex; align-items: center; gap: 14px; padding: 8px 12px 8px 8px; border-radius: 12px; background: #fff; cursor: pointer; transition: box-shadow .12s; }
.task-row:hover { box-shadow: 0 1px 6px rgba(29, 27, 26, .09); }
.task-row .title { font-weight: 700; }
.late-list .task-row > .dot { margin-left: 6px; }
.late-more { padding: 4px 10px; }
.task-row .sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dropzone { margin-top: 14px; padding: 24px; border: 1.5px dashed var(--faint); border-radius: 14px; color: var(--muted); text-align: center; }
.soon { margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--tint-2); font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* ---- Projects */

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.card { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-radius: 18px; background: var(--tint); transition: background .12s; }
.card:hover { background: var(--tint-2); }
.card h3 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 19px; letter-spacing: -.01em; }
.meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.progress { height: 6px; overflow: hidden; border-radius: 999px; background: #fff; }
.progress > div { height: 100%; border-radius: 999px; }
.title-input { width: 100%; padding: 0; border: 0; background: none; outline: none; font-size: 30px; font-weight: 700; letter-spacing: -.02em; }
.title-input:disabled { color: inherit; }
.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 6px; color: var(--muted); }
.meta-line .inline { width: auto; }
.meta-line .inline[type="date"] { width: 140px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 40px 0 10px; }
.section-head .section-title { margin: 0; }
.link-btn { padding: 4px 6px; border: 0; border-radius: 6px; background: none; color: var(--muted); text-align: left; cursor: pointer; }
.link-btn:hover { background: var(--tint); color: var(--ink); }
.steps-form { width: 320px; padding: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--ink-2); }
.check input { margin: 0; }
.weekends-check { margin-top: -8px; }
.swatches { display: flex; gap: 6px; }
.swatch { width: 18px; height: 18px; padding: 0; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.milestones { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inline-label { margin: 0 6px 0 0; }
.ms { display: inline-flex; align-items: center; gap: 7px; padding: 4px 6px 4px 10px; border-radius: 999px; background: var(--tint); font-size: 12px; white-space: nowrap; }
.ms.past { color: var(--faint); }
.diamond { width: 9px; height: 9px; transform: rotate(45deg); flex: none; }
.team { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.team-faces { display: flex; gap: 4px; }

/* ---- Grid table (project items, people) */

.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: separate; border-spacing: 0; }
.grid th { position: sticky; top: 0; z-index: 2; padding: 8px; border-bottom: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.grid td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid tbody tr:hover td { background: #FBFAF8; }
.w-thumb { width: 72px; }
.w-step { width: 150px; }
.w-x { width: 32px; }
.frames { width: 110px; font-variant-numeric: tabular-nums; }
.cell { display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 3px 6px; border-radius: 8px; cursor: pointer; }
.cell:hover { background: var(--tint); }
.cell .due { font-size: 11px; color: var(--muted); white-space: nowrap; }
.cell .due.late { color: var(--accent); }
.over-tag { padding: 1px 6px; border-radius: 999px; background: #FF2A1A; color: #fff; font: 600 10px var(--mono); white-space: nowrap; }
.budget-cell { cursor: default; color: var(--muted); }
.budget-cell:hover { background: none; }
.budget-cell.over { color: #FF2A1A; font-weight: 700; }
.budget-input { flex: none; width: 52px; border-color: var(--line); background: #fff; font-variant-numeric: tabular-nums; }
.budget-input:disabled { border-color: transparent; background: none; }
.budget-cell .small { white-space: nowrap; }
.drop { outline: 2px dashed var(--ink); outline-offset: 1px; }
.add-cell { width: 100%; padding: 6px; border: 0; border-radius: 8px; background: none; color: var(--faint); text-align: left; cursor: pointer; opacity: 0; }
tr:hover .add-cell { opacity: 1; }
.add-cell:hover { background: var(--tint); color: var(--ink); }
/* Thumbnail and name stay in view when the grid scrolls sideways; the name column is resizable. */
.items-grid .stick { position: sticky; left: 0; z-index: 1; background: #fff; }
.items-grid th.stick { z-index: 3; }
.items-grid .w-thumb { min-width: 72px; }
.items-grid .w-name { left: 72px; width: var(--name-w); min-width: var(--name-w); max-width: var(--name-w); box-shadow: inset -1px 0 0 var(--line); }
.items-grid th.w-name { position: sticky; }
/* Fixed widths, so spare room goes to the empty last column instead of stretching Tags and Frames. */
.items-grid .w-tags { width: 130px; min-width: 130px; }
.items-grid .w-frames { width: 120px; }
.items-grid .w-assets { width: 120px; }
.items-grid .w-step { width: 140px; }
.items-grid .w-x { width: auto; }
.col-resize { position: absolute; top: 0; right: -4px; bottom: 0; width: 9px; cursor: col-resize; }
.col-resize::after { content: ""; position: absolute; top: 8px; bottom: 8px; left: 4px; width: 1px; background: var(--line); }
.col-resize:hover::after { width: 3px; left: 3px; background: var(--faint); }
.assets-btn { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 0; border-radius: 8px; background: none; font-size: 12px; white-space: nowrap; cursor: pointer; }
.assets-btn:hover:not(:disabled) { background: var(--tint); }
.assets-btn:disabled { cursor: default; }
.assets-btn.none { color: var(--faint); }
.assets-btn.all { color: var(--s-done); font-weight: 700; }
.ready-dot { flex: none; display: inline-block; vertical-align: -1px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--s-wip); }
.ready-dot.on { border-color: var(--s-done); background: var(--s-done); }
.asset-pick { width: 300px; max-height: 360px; overflow: auto; }
.asset-pick label.menu-item input { margin: 0; }
.people-btn { display: inline-flex; align-items: center; gap: 8px; max-width: 200px; cursor: pointer; white-space: nowrap; }
.people-btn::after { content: "▾"; color: var(--muted); font-size: 11px; }
.people-btn.on { border-color: var(--ink); font-weight: 600; }
.people-pick { width: 260px; max-height: 420px; overflow: auto; }
.people-pick label.menu-item input { margin: 0; }
.people-pick .avatar-blank { width: 20px; }
.people-pick-head { display: flex; gap: 6px; padding: 4px 6px 8px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.asset-list { display: flex; flex-direction: column; gap: 6px; }
.asset-line { display: flex; align-items: center; gap: 8px; padding: 2px 4px; font-size: 13px; }
.asset-line .chip { min-width: 0; }
.row-x { opacity: 0; }
tr:hover .row-x { opacity: 1; }

/* ---- Timeline (follows the slide 23 mockup) */

/* Edge to edge: the timeline cancels the page gutter. */
.tl { position: relative; overflow: auto; max-height: calc(100vh - 230px); margin: 0 calc(-1 * var(--gutter)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg); }
.tl-inner { display: grid; position: relative; width: max-content; } /* as wide as its tracks, so the sticky labels stay put */
.tl-corner { position: sticky; top: 0; left: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: space-between; padding: 0 14px 9px var(--gutter); background: var(--tint); border-bottom: 1px solid var(--line); box-shadow: inset -1px 0 0 var(--line); color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.load-head { color: var(--faint); cursor: help; }
.tl-scale { position: sticky; top: 0; z-index: 4; background-color: var(--tint); border-bottom: 1px solid var(--line); }
.tl-weeks, .tl-days { display: flex; }
.tl-week { flex: none; padding: 12px 8px 2px; overflow: hidden; color: var(--muted); font: 600 11px var(--mono); white-space: nowrap; }
.tl-week span { margin-left: 6px; font-weight: 400; color: var(--faint); }
.tl-day { flex: none; padding: 2px 0 7px; color: var(--faint); font: 10px var(--mono); text-align: center; }
.tl-day.today { color: var(--accent); font-weight: 700; }
.tl-label { position: sticky; left: 0; z-index: 3; display: flex; align-items: flex-start; gap: 9px; padding: 9px 14px 9px var(--gutter); border-top: 1px solid var(--line); background: var(--bg); box-shadow: inset -1px 0 0 var(--line); font-size: 13px; font-weight: 600; }
.tl-label.muted { font-weight: 400; }
.tl-label.person { gap: 11px; padding-top: 10px; }
.tl-label.person.muted .who-name { color: var(--muted); }
.who-text { flex: 1; min-width: 0; }
.who-name { font-size: 13px; font-weight: 700; line-height: 1.25; }
.who-sub { color: var(--faint); font-size: 11px; font-weight: 400; line-height: 1.35; }
.avatar-blank { flex: none; width: 26px; }
.load { flex: none; min-width: 44px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--tint); color: var(--faint); font: 600 11px/1.2 var(--mono); text-align: center; cursor: help; }
.load.ok { border-color: #BFDCC5; background: #EEF7F0; color: #2E8A3E; }
.load.over { border-color: #F2C2BA; background: #FCEDEA; color: var(--accent); }
.tl-label.accent { color: var(--accent); font-weight: 700; }
.tl-label.group { align-items: center; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tl-label .type { margin-left: auto; padding-top: 2px; }
.tl-lane { position: relative; border-top: 1px solid var(--line); }
.tl-lane.group { height: 34px; }
.tl-lane.drop-target { background-color: rgba(29, 27, 26, .05); }
.today-line { position: absolute; top: 0; bottom: 0; z-index: 1; width: 0; border-left: 1.5px dashed var(--accent); pointer-events: none; }
.bar { position: absolute; z-index: 2; display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 9px; overflow: hidden; border-radius: 6px; font-size: 11px; font-weight: 700; white-space: nowrap; user-select: none; cursor: pointer; box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
.bar.editable { cursor: grab; }
.bar.dragging { z-index: 10; opacity: .9; cursor: grabbing; pointer-events: none; box-shadow: 0 8px 18px rgba(0, 0, 0, .2); }
.bar.late { outline: 2px solid var(--accent); outline-offset: 1px; }
.bar.done { opacity: .5; }
.bar .sdot { flex: none; width: 8px; height: 8px; border-radius: 50%; box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .95); }
.bar .handle { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.bar .handle.l { left: 0; }
.bar .handle.r { right: 0; }
.bar-gap { position: absolute; z-index: 1; height: 0; border-top: 1.5px dashed var(--faint); pointer-events: none; }
.bar-label { position: absolute; z-index: 2; display: flex; align-items: center; height: 22px; padding: 0 4px; overflow: hidden; color: var(--ink-2); font-size: 11px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.menu-item:disabled { color: var(--faint); cursor: default; background: none; }
.booking { position: absolute; top: 3px; bottom: 3px; z-index: 0; display: flex; align-items: flex-end; padding: 2px 8px; overflow: hidden; border-radius: 6px; font-size: 10px; font-weight: 700; white-space: nowrap; pointer-events: none; }
.milestone { position: absolute; top: 12px; z-index: 2; display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 700; white-space: nowrap; transform: translateX(-5px); }
.milestone .diamond { width: 11px; height: 11px; }
.tl-help { margin-top: 10px; }
.tray-help { margin: -4px 0 14px; }
.tray-group { margin-bottom: 16px; }
.tray-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; font-weight: 700; }
.tray-head .muted { font-weight: 400; }
.tray-items { display: flex; flex-wrap: wrap; gap: 6px; }
.hours-input, .budget-input, .frames, input[type="number"], input[type="date"] { font-family: var(--mono); }
.hours-input { width: 64px; }
th.w-title { min-width: 180px; }
th.w-role { min-width: 100px; }
th.w-email { min-width: 210px; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12px; cursor: pointer; }
.pill[draggable="true"] { cursor: grab; }

/* ---- Board */

.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { display: flex; flex-direction: column; min-width: 0; border-radius: 18px; background: var(--tint); transition: background .12s; }
.col.drop-target { background: var(--tint-2); box-shadow: inset 0 0 0 2px var(--faint); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; font-size: 13px; font-weight: 700; }
.col-head .muted { margin-left: auto; font-weight: 400; }
.col-cards { display: flex; flex-direction: column; gap: 8px; min-height: 80px; max-height: calc(100vh - 290px); overflow-y: auto; padding: 0 8px 10px; }
.col-empty { padding: 18px 8px; color: var(--faint); font-size: 12px; text-align: center; }
.col-more { padding: 4px 8px; }
.bcard { display: flex; flex-direction: column; gap: 9px; padding: 10px; border-radius: 12px; background: #fff; cursor: pointer; transition: box-shadow .12s; }
.bcard:hover { box-shadow: 0 1px 6px rgba(29, 27, 26, .1); }
.bcard.movable { cursor: grab; }
.bcard.lifted { opacity: .4; }
.bcard-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bcard-top .thumb { width: 46px; height: 28px; }
.bcard-title { font-size: 13px; font-weight: 700; }
.bcard-sub { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.bcard-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bcard .chip-row { gap: 4px; }
.bcard .chip.small { min-width: 0; }

/* ---- Versions (task panel) */

.vdrop { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; background: var(--tint); font-size: 13px; }
.vdrop.busy { border-style: solid; }
.vdrop-actions { display: flex; gap: 6px; margin-top: 4px; }
.vprogress { height: 4px; border-radius: 2px; background: var(--line); overflow: hidden; }
.vprogress div { height: 100%; background: var(--s-review); transition: width .2s; }
#drawer.file-over .vdrop, .task-row.file-over { outline: 2px solid var(--s-review); outline-offset: -2px; background: rgba(79, 124, 172, .08); }
.vlist { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.vrow { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; }
.vrow:hover { background: var(--tint); }
.vrow .grow { display: flex; flex-direction: column; gap: 2px; }
.vrow-head { display: flex; align-items: center; gap: 8px; }
.vrow .chip { min-width: 0; }
.vthumb { flex: none; width: 72px; height: 42px; border-radius: 6px; background: var(--tint-2); object-fit: cover; }
.fps-field { display: inline-flex; align-items: center; gap: 2px; }
.fps-field .fps-input { flex: none; width: 58px; }

/* ---- Review player: full screen, in the app's light style. Only the frame itself sits on black. */

.player { position: fixed; inset: 0; z-index: 60; overflow: hidden; display: grid; grid-template-columns: 1fr 360px; background: var(--bg); color: var(--ink); }
.pl-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 18px 28px 16px; }
.pl-top { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 16px; }
.pl-kicker { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.pl-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.pl-stage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; border-radius: 18px; background: var(--tint); }
.pl-box { position: relative; background: #000; box-shadow: 0 6px 24px rgba(29, 27, 26, .14); }
.pl-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.pl-draw { position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; }
.pl-box.pen .pl-draw { cursor: crosshair; touch-action: none; }
.pl-loading { position: absolute; inset: 0; z-index: 3; display: grid; place-items: center; background: var(--tint); color: var(--muted); font-size: 13px; }
.pl-scrub { position: relative; height: 14px; margin-top: 14px; border-radius: 999px; background: var(--tint); cursor: pointer; touch-action: none; }
.pl-fill { height: 100%; border-radius: 999px; background: var(--tint-2); box-shadow: inset -2px 0 0 var(--ink); pointer-events: none; }
.pl-marks { position: absolute; inset: 0; pointer-events: none; }
.pl-mark { position: absolute; top: 2px; bottom: 2px; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--accent); }
.pl-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 12px; }
.pl-btn { flex: none; height: 34px; min-width: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink); cursor: pointer; white-space: nowrap; }
.pl-btn:hover { border-color: var(--faint); }
.pl-btn.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.pl-btn.play { min-width: 48px; background: var(--ink); border-color: var(--ink); color: #fff; }
.pl-btn:disabled { opacity: .35; cursor: default; }
.pl-playlist { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.daily-n { flex: none; width: 22px; text-align: right; }
.layout-seg button { min-width: 40px; font-size: 15px; }
.daily-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.daily-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: var(--tint); text-align: left; cursor: pointer; transition: box-shadow .12s; }
.daily-card:hover { box-shadow: 0 2px 12px rgba(29, 27, 26, .12); }
.daily-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; overflow: hidden; background: #1D1B1A; }
.daily-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; display: block; }
.daily-thumb .muted { color: var(--faint); }
.daily-notes { position: absolute; right: 8px; bottom: 8px; padding: 2px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; }
.daily-body { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; min-width: 0; }
.daily-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 700; }
.daily-sub { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.daily-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.daily-foot .chip { min-width: 0; }
.daily-by { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; }
.pl-counter { margin-left: 10px; color: var(--muted); font-size: 12px; white-space: pre; }
.pl-swatches { display: inline-flex; gap: 5px; padding: 0 4px; }
.pl-swatch { width: 20px; height: 20px; padding: 0; border: 2px solid #fff; border-radius: 50%; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.pl-swatch.on { box-shadow: 0 0 0 2px var(--ink); }
.pl-side { display: flex; flex-direction: column; min-height: 0; padding: 22px 20px 18px; border-left: 1px solid var(--line); background: #fff; }
.pl-side .label { margin: 22px 0 8px; }
.pl-version { display: flex; align-items: center; gap: 10px; }
.pl-meta { margin-top: 10px; }
.pl-verdict { display: flex; gap: 8px; margin-top: 16px; }
.pl-verdict .btn { flex: 1; height: 38px; font-weight: 600; }
.pl-verdict .approve:hover, .pl-verdict .approve.on { background: var(--s-done); border-color: var(--s-done); color: #fff; }
.pl-verdict .retake:hover, .pl-verdict .retake.on { background: var(--s-retake); border-color: var(--s-retake); color: #fff; }
.pl-notes { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; margin: 0 -10px; }
.pl-empty { padding: 4px 10px; line-height: 1.5; }
.pl-note { display: flex; gap: 10px; padding: 10px; border-radius: 12px; cursor: pointer; }
.pl-note:hover { background: var(--tint); }
.pl-note.here { background: var(--tint); }
.pl-note.on { box-shadow: inset 0 0 0 1.5px var(--accent); }
.pl-note-head { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pl-note-body { margin-top: 3px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; color: var(--ink-2); }
.pl-frame { padding: 1px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; }
.pl-compose { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pl-compose textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; resize: vertical; outline: none; }
.pl-compose textarea:focus { border-color: var(--faint); }
.pl-compose-row { display: flex; align-items: center; gap: 8px; }
.danger-link { margin-left: 8px; }
.danger-link:hover { color: var(--accent) !important; }

/* ---- Settings */

.settings-card { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; background: var(--tint); }
.settings-card p { line-height: 1.5; }
.settings-input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; }
.settings-input:focus { border-color: var(--faint); }
.settings-check { align-items: flex-start; font-size: 13px; }
.settings-check input { margin-top: 3px; }
.settings-actions, .settings-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.settings-row .settings-input { flex: 1; min-width: 180px; }
.settings-msg { margin-bottom: 8px; padding: 10px 14px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; }
.new-key { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--s-done); }
.key-text { flex: 1; min-width: 0; padding: 6px 10px; border-radius: 8px; background: var(--tint); font-size: 12px; overflow-wrap: anywhere; }
.key-list { display: flex; flex-direction: column; gap: 4px; }
.key-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: #fff; flex-wrap: wrap; }
code.num { font-size: 12px; overflow-wrap: anywhere; }

/* ---- Sign in */

.signin { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--tint); }
.signin-card { width: min(420px, 100%); display: flex; flex-direction: column; gap: 20px; padding: 34px; border-radius: 22px; background: #fff; }
.signin-card p { margin: 0; line-height: 1.5; }
.error { margin: 0; color: var(--accent); }
.toast { position: fixed; left: 50%; bottom: 20px; z-index: 50; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: min(560px, calc(100% - 32px)); padding: 10px 10px 10px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-size: 13px; }
.toast .btn { height: 28px; background: transparent; border-color: rgba(255, 255, 255, .3); color: #fff; }
.who { display: flex; flex-direction: column; gap: 6px; }
.who button { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; cursor: pointer; }
.who button:hover { border-color: var(--faint); }

/* ---- Small screens */

@media (max-width: 760px) {
  /* Two rows on a phone: brand and avatar, then the menu, which scrolls sideways if it must. */
  .topbar { flex-wrap: wrap; gap: 0 10px; height: auto; padding: 8px 14px 6px; }
  .nav { order: 3; width: 100%; overflow-x: auto; margin: 6px -14px 0; padding: 0 14px; scrollbar-width: none; }
  .nav a { padding: 6px 11px; }
  .search, .online-now { display: none; }
  .brand span { display: none; }
  .main { --gutter: 14px; padding-top: 22px; padding-bottom: 56px; }
  h1, .title-input { font-size: 24px; }
  /* Project header: title and details get the full width; colours and Delete go below. */
  .page-head > .grow { flex-basis: 100%; }
  .meta-line { row-gap: 6px; }
  .meta-line .inline[type="date"] { width: 132px; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .task-row { gap: 10px; }
  .task-row .sub { flex-wrap: wrap; row-gap: 2px; }
  .task-row .sub .num { white-space: nowrap; }
  .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  /* Timeline: a narrow name column; titles and workload stay on wider screens. */
  .tl-inner { --label-w: 128px; }
  .tl-label, .tl-corner { padding-left: 14px; padding-right: 8px; }
  .tl-label .load, .tl-label .who-sub, .load-head { display: none; }
  .player { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1.2fr) minmax(0, 1fr); }
  .pl-main { padding: 12px 14px; }
  .pl-title { font-size: 18px; }
  .pl-side { border-left: 0; border-top: 1px solid var(--line); }
  .pl-counter { display: none; }
}
