/* Slate: Shutter's planning app. Same black and white, same type; the only picture on screen
   is the storyboard, the way footage is the only colour in Shutter. Tungsten, Shutter's notes
   colour, marks Slate's own progress: shots done, and the takes circled on set. */

.slate { width: min(1240px, 100%); padding: 36px 32px 96px; }
@media (max-width: 720px) { .slate { padding: 24px 16px 64px; } }

.crumb {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 32px; margin: -8px 0 10px -6px; padding: 0 8px 0 2px;
  border-radius: var(--r-sm);
  color: var(--text-2); text-decoration: none; font-weight: 540;
}
.crumb svg { width: 20px; height: 20px; }
.crumb:hover { color: var(--text); background: var(--hover); }

/* All projects */
.projects { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.project-card a {
  display: grid; gap: 6px;
  height: 100%;
  padding: 22px 24px;
  border-radius: var(--r-lg);
  background: var(--panel);
  color: var(--text); text-decoration: none;
  transition: background-color .15s ease;
}
.project-card a:hover { background: var(--raised); }
.project-card a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.pc-title { font: 800 26px/1.1 var(--display); font-stretch: 88%; letter-spacing: -0.01em; }
.pc-meta, .pc-next { color: var(--text-2); font-size: 14px; }
.pc-bar { display: block; height: 6px; margin-top: 12px; border-radius: var(--r-pill); background: var(--raised); overflow: hidden; }
.project-card a:hover .pc-bar { background: var(--hover); }
.pc-bar span { display: block; height: 100%; border-radius: var(--r-pill); background: var(--accent); }

/* First run: the frame where projects will be, with what a project holds beside it. */
.slate-empty {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: center;
  padding: 56px 48px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg);
}
.slate-empty-main { display: grid; justify-items: start; gap: 14px; }
.slate-empty svg { width: 72px; height: 54px; color: var(--text); }
.slate-empty h2 { margin: 6px 0 0; font: 800 clamp(26px, 3vw, 34px)/1.05 var(--display); font-stretch: 88%; letter-spacing: -0.01em; }
.slate-empty p { margin: 0; max-width: 52ch; color: var(--text-2); font-size: 16px; line-height: 1.6; }
.slate-empty-main .btn { margin-top: 10px; }
.slate-empty-list { list-style: none; margin: 0; padding: 0; }
.slate-empty-list li { display: grid; gap: 4px; padding: 18px 0; border-top: 1px solid var(--line); }
.slate-empty-list li:first-child { border-top: 0; }
.slate-empty-list b { font-weight: 650; }
.slate-empty-list span { color: var(--text-2); font-size: 14px; line-height: 1.5; }
@media (max-width: 860px) {
  .slate-empty { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 32px 22px; }
  .slate-empty-main .btn { width: 100%; }
}

/* Project header and tabs */
.project-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.project-name { min-width: 0; }
.project-name .page-title { overflow-wrap: anywhere; }
.project-actions { display: flex; gap: 8px; }

.menu-wrap { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 20;
  min-width: 240px; padding: 6px;
  border-radius: var(--r-md);
  background: var(--raised); box-shadow: var(--shadow);
}
.menu button { display: block; width: 100%; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline-offset: -2px; }
.menu-sep { height: 1px; margin: 5px 4px; background: var(--line); }

.tabs { display: flex; gap: 2px; margin-bottom: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  position: relative; flex: none;
  min-height: 44px; padding: 0 14px;
  border: 0; background: none;
  color: var(--text-2); font-weight: 600; cursor: pointer;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--text); }
.tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 1px; background: var(--text); }
.tabs button:focus-visible { outline-offset: -4px; }

.panel-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-sum { margin: 0; color: var(--text-2); max-width: 64ch; }
.panel-empty { display: grid; justify-items: start; gap: 10px; padding: 32px; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); list-style: none; }
.panel-empty p { margin: 0; color: var(--text-2); }

.pill { display: inline-block; padding: 2px 9px; border-radius: var(--r-pill); background: var(--raised); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill-strong { background: var(--accent-soft); color: var(--accent); }

/* Shot list */
.scene { margin-bottom: 28px; }
.scene-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.scene-head h2 { display: flex; align-items: baseline; gap: 12px; margin: 0; min-width: 0; font-size: 15px; font-weight: 650; letter-spacing: .02em; }
.scene-num { flex: none; min-width: 34px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--invert); color: var(--on-invert); font: 700 14px var(--mono); text-align: center; }
.scene-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.scene-actions .icon-btn svg { width: 18px; height: 18px; }
.scene-desc { margin: 10px 0 0; color: var(--text-2); max-width: 70ch; }

.shots { list-style: none; margin: 0; padding: 0; }
.shot-open {
  display: grid; grid-template-columns: 112px 52px minmax(0, 1fr) auto; align-items: center; gap: 14px;
  width: 100%; padding: 10px 6px;
  border: 0; border-bottom: 1px solid var(--line); background: none;
  text-align: left; cursor: pointer;
}
.shot-open:hover { background: var(--panel); }
.shot-open:focus-visible { outline-offset: -2px; }
.shot-thumb { display: block; aspect-ratio: 16 / 9; border-radius: var(--r-sm); background: var(--raised); overflow: hidden; }
.shot-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shot-name { font: 700 17px var(--mono); }
.shot-main { display: grid; gap: 2px; min-width: 0; }
.shot-spec { color: var(--text-2); font-size: 13px; }
.shot-desc { overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.shot-side { display: grid; justify-items: end; gap: 4px; font-size: 13px; color: var(--text-2); }
.shot-setup { font-family: var(--mono); }
.shot.is-dropped .shot-name, .shot.is-dropped .shot-desc { text-decoration: line-through; color: var(--text-2); }
.shot.is-done .shot-thumb { opacity: .55; }
.add-shot { margin-top: 6px; min-height: 40px; padding: 0 8px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font-weight: 600; cursor: pointer; }
.add-shot:hover { color: var(--text); background: var(--hover); }

/* Schedule */
.days { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.day {
  display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 18px 22px; border-radius: var(--r-lg); background: var(--panel);
}
.day-date { display: grid; gap: 2px; justify-items: start; }
.day-n { color: var(--text-2); font-size: 13px; font-weight: 600; }
.day-when { font: 700 20px/1.1 var(--display); font-stretch: 85%; }
.day-body p { margin: 0; }
.day-where { font-weight: 650; }
.day-line { color: var(--text-2); font-size: 14px; }
.day-est { margin-top: 4px !important; font-size: 14px; }
.day-est.is-over { font-weight: 650; }
.day-est.is-over::before { content: "⚠ "; }
.day-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* People */
.people-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.person { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 60px; padding: 8px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.person:hover { background: var(--panel); }
.person .avatar { width: 36px; height: 36px; flex: none; }
.person-main { display: grid; flex: 1; min-width: 0; }
.person-name { font-weight: 650; }
.person-role { color: var(--text-2); font-size: 14px; }
.person-contact { color: var(--text-2); font: 13px var(--mono); }

/* On set: built for a phone in one hand */
.set-head { display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.set-day select { min-width: 260px; max-width: 100%; }
.set-progress { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }

.now { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 24px; align-items: start; padding: 20px; border-radius: var(--r-lg); background: var(--panel); }
.now-board { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: var(--r-md); background: var(--raised); overflow: hidden; color: var(--text-2); font-size: 13px; }
.now-board img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.now-scene { margin: 0; color: var(--text-2); font-size: 14px; }
.now-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 0; }
.now-name { font: 800 clamp(44px, 8vw, 72px)/1 var(--mono); letter-spacing: -0.03em; }
.now-spec { color: var(--text-2); font-size: 15px; font-weight: 600; }
.now-desc { margin: 10px 0 0; font-size: 17px; line-height: 1.45; }
.now-actions { display: grid; gap: 8px; margin-top: 18px; }
.now-actions .btn { width: 100%; --control: 56px; font-size: 17px; }

.takes { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; }
.takes-none { margin: 14px 2px 0; color: var(--text-2); }
.take { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; border-radius: var(--r-md); background: var(--raised); }
/* A circled take: the tungsten edge, like a circle on the camera report. */
.take.is-good { box-shadow: inset 3px 0 0 var(--accent); }
.take.is-good .take-n { color: var(--accent); }
.take.is-ng .take-clip, .take.is-ng .take-n { color: var(--text-2); text-decoration: line-through; }
.take-n { flex: none; min-width: 34px; font: 700 15px var(--mono); }
.take-main { display: grid; flex: 1; min-width: 0; min-height: 44px; align-content: center; padding: 2px 4px; border: 0; border-radius: var(--r-sm); background: none; text-align: left; cursor: pointer; }
.take-main:hover { background: var(--hover); }
.take-clip { font: 600 14px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.take-note { color: var(--text-2); font-size: 14px; }
.take-review { font-size: 12px; font-weight: 650; }
.take-mark { flex: none; min-width: 64px; min-height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--panel); font-weight: 650; cursor: pointer; }
.take-mark:hover { background: var(--hover); }
.take-mark[aria-pressed="true"] { background: var(--invert); color: var(--on-invert); }
.take-form { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.take-form input[name="clip"] { flex: 1 1 160px; font-family: var(--mono); text-transform: uppercase; }
.take-form input[name="note"] { flex: 3 1 220px; }

.set-list-title { margin: 32px 0 8px; font-size: 16px; color: var(--text); font-weight: 650; }
.set-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.set-shot { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 6px 8px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; }
.set-shot:hover { background: var(--panel); }
.set-shot.is-current { background: var(--panel); box-shadow: inset 3px 0 0 var(--text); }
.set-shot-name { font: 700 15px var(--mono); }
.set-shot-desc { color: var(--text-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.set-shot-state { font-size: 13px; font-weight: 650; }
.set-shot.is-done .set-shot-name, .set-shot.is-done .set-shot-desc { color: var(--text-2); }
.set-shot.is-dropped .set-shot-desc { text-decoration: line-through; }

/* Dialogs */
.sheet-wide { width: min(620px, calc(100vw - 24px)); }
.sheet form { display: grid; gap: 12px; }
.sheet .sheet-actions { margin-top: 8px; }
.sheet-danger { margin-right: auto; }
.field { display: grid; gap: 5px; font-size: 14px; font-weight: 560; min-width: 0; }
.field input, .field select, .field textarea { width: 100%; }
.field textarea { resize: vertical; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-pair-num { grid-template-columns: 110px 1fr; }
.field-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.field-help { margin: -4px 0 0; color: var(--text-2); font-size: 13px; }
.form-error { margin: 0; font-weight: 650; }
.check-line { display: flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 560; }
.check-line input, .pick input[type="checkbox"] { width: 18px; height: 18px; min-height: 0; margin: 0; accent-color: var(--invert); }
.share-link { display: flex; gap: 8px; }
.share-link input { flex: 1; min-width: 0; font: 13px var(--mono); }

.pick { margin: 4px 0 0; padding: 0; border: 0; min-width: 0; }
.pick legend { padding: 0; margin-bottom: 6px; font-size: 14px; font-weight: 560; }
.pick ol, .pick ul { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; border-radius: var(--r-md); background: var(--panel); }
.pick li { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 46px; padding: 4px 8px 4px 12px; border-bottom: 1px solid var(--line); }
.pick li:last-child { border-bottom: 0; }
.pick label { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.pick label small { color: var(--text-2); }
.pick input[type="time"] { width: 120px; flex: none; }
.pick-num { min-width: 30px; font: 700 13px var(--mono); }
.pick-move { display: flex; flex: none; }
.pick-move .icon-btn svg { width: 18px; height: 18px; }
.pick-none { color: var(--text-2); font-size: 14px; }

.sheet-shot { width: min(720px, calc(100vw - 24px)); }
.board-wrap { display: grid; gap: 8px; }
#board { display: block; width: 100%; height: auto; border-radius: var(--r-md); background: #fff; touch-action: none; cursor: crosshair; box-shadow: inset 0 0 0 1px var(--line); }
.board-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.board-hint { margin-left: auto; color: var(--text-2); font-size: 13px; }

/* Call sheet (shared link, print, and the owner's preview) */
.call-page { background: var(--bg); }
.call-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.call-main { width: min(860px, 100%); margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-left)) 40px; }
.call-foot { width: min(860px, 100%); margin: 0 auto; padding: 0 16px 40px; color: var(--text-2); font-size: 13px; }
.call-foot a { color: var(--text); }

.callsheet { display: grid; gap: 26px; }
.cs-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; padding-bottom: 20px; border-bottom: 2px solid var(--text); }
.cs-kicker { margin: 0; color: var(--text-2); font-size: 13px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.cs-title { margin: 6px 0 0; font: 800 clamp(34px, 6vw, 56px)/1 var(--display); font-stretch: 80%; letter-spacing: -0.01em; }
.cs-meta { margin: 8px 0 0; color: var(--text-2); }
.cs-call { display: grid; justify-items: end; padding: 12px 16px; border-radius: var(--r-md); background: var(--invert); color: var(--on-invert); }
.cs-call-label { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.cs-call-time { font: 800 40px/1 var(--mono); }
.cs-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0; margin: 0; border-radius: var(--r-md); overflow: hidden; background: var(--panel); border: 1px solid var(--line); }
/* Hairlines between cells that never leave a grey gap when the last row is short. */
.cs-facts div { padding: 12px 14px; background: var(--panel); box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); }
.cs-facts dt { color: var(--text-2); font-size: 12px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; }
.cs-facts dd { margin: 4px 0 0; font-weight: 560; }
.cs-block h2 { margin: 0 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-2); }
.cs-notes { margin: 0; white-space: pre-wrap; font-size: 16px; }
.cs-none { margin: 0; color: var(--text-2); }
.cs-scene { padding: 12px 0; border-top: 1px solid var(--line); }
.cs-scene-top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cs-num { min-width: 34px; padding: 2px 8px; border-radius: var(--r-sm); background: var(--invert); color: var(--on-invert); font: 700 14px var(--mono); text-align: center; }
.cs-heading { font-weight: 700; }
.cs-pages { margin-left: auto; color: var(--text-2); font: 13px var(--mono); }
.cs-desc { margin: 6px 0 0; color: var(--text-2); }
.cs-shots { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.cs-shots li { display: grid; grid-template-columns: 52px auto minmax(0, 1fr); gap: 10px; font-size: 14px; }
.cs-shot-name { font: 700 14px var(--mono); }
.cs-shot-spec { color: var(--text-2); white-space: nowrap; }
.cs-people { width: 100%; border-collapse: collapse; font-size: 15px; }
.cs-people th { padding: 8px 10px; border-bottom: 1px solid var(--line-strong); color: var(--text-2); font-size: 12px; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
.cs-people td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cs-time { font: 700 15px var(--mono); white-space: nowrap; }
.cs-name { font-weight: 650; }
.cs-people a { color: var(--text); }

@media (max-width: 760px) {
  .field-pair, .field-trio { grid-template-columns: 1fr; }
  .field-pair-num { grid-template-columns: 90px 1fr; }
  .shot-open { grid-template-columns: 84px minmax(0, 1fr) auto; gap: 10px; }
  .shot-open .shot-name { grid-column: 2; grid-row: 1; font-size: 15px; }
  .shot-open .shot-thumb { grid-row: 1 / span 2; }
  .shot-open .shot-main { grid-column: 2; grid-row: 2; }
  .shot-open .shot-side { grid-column: 3; grid-row: 1 / span 2; }
  .day { grid-template-columns: 1fr; gap: 10px; }
  .day-date { grid-auto-flow: column; justify-content: start; align-items: baseline; gap: 10px; }
  .day-actions { justify-content: stretch; }
  .day-actions > * { flex: 1 1 40%; }
  .now { grid-template-columns: 1fr; padding: 14px; gap: 14px; }
  /* On set, one-handed: the shot and the take button first, the sketch underneath. */
  .now-info { order: -1; }
  .now-board { max-height: 34vh; aspect-ratio: auto; height: 34vh; }
  .now-name { font-size: 52px; }
  .take { flex-wrap: wrap; }
  .take-main { flex-basis: calc(100% - 50px); }
  .take-mark { flex: 1; }
  .set-day select { min-width: 0; width: 100%; }
  .set-day { flex: 1 1 100%; }
  .cs-shots li { grid-template-columns: 44px minmax(0, 1fr); }
  .cs-shot-desc { grid-column: 2; }
  .project-actions { width: 100%; }
  .project-actions > * { flex: 1; }
  .project-actions .btn { width: 100%; }
}

@media print {
  :root { --bg: #fff; --panel: #fff; --raised: #fff; --line: #ccc; --line-strong: #888; --text: #000; --text-2: #444; --invert: #000; --on-invert: #fff; color-scheme: light; }
  body { background: #fff; color: #000; }
  .rail, .mbar, .tabbar, .crumb, .project-actions, .tabs, .panel-bar .btn, .scene-actions, .add-shot, .call-bar, .call-foot, .preview-banner, .toast, .offline-pill { display: none !important; }
  .shell { display: block; padding: 0 !important; }
  .page, .call-main { padding: 0; width: 100%; }
  .shot-open { break-inside: avoid; }
  .cs-scene, .cs-people tr { break-inside: avoid; }
}

/* Slate's own sidebar: recent projects, and the studio's other apps. */
.rail-apps { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rail-app svg { width: 18px; height: 18px; }
.rail-collapsed .rail-apps .rail-label { display: none; }
.set-sync span { display: grid; gap: 2px; }
.set-sync small { color: var(--text-2); font-weight: 400; font-size: 13px; }
.set-sync .switch { width: 44px; flex: none; align-self: flex-start; margin-top: 2px; }
.seg-look { display: flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--panel); }
.seg-look button { flex: 1; min-height: 34px; border: 0; border-radius: var(--r-pill); background: none; color: var(--text-2); font-weight: 600; cursor: pointer; }
.seg-look button[aria-checked="true"] { background: var(--raised); color: var(--text); }
/* No tab bar in Slate: a project has its own tabs. */
@media (max-width: 820px) { .shell { padding-bottom: 0; } }
.legal-links { margin: 0; color: var(--text-2); font-size: 13px; }
.legal-links a { color: var(--text-2); }
