@font-face {
  font-family: "Heebo";
  src: url("/static/fonts/Heebo.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #0b0a09;
  --panel: #141210;
  --raise: #1e1a17;
  --line: #2b2622;
  --edge: #4a433c;
  --ink: #f5f0e6;
  --soft: #cfc8bb;
  --dim: #9a9186;
  --hot: #ffc600;
  --bad: #ff6b57;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --pad: 16px;
  --stage: 60vh;
  color-scheme: dark;
  scrollbar-color: var(--edge) transparent;
  scrollbar-width: thin;
}

*, ::before, ::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg) radial-gradient(110% 70% at 50% -10%, #221c16 0%, rgba(11, 10, 9, 0) 62%) fixed;
  color: var(--ink);
  font: 300 16px/1.55 "Heebo", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before { background: url("/static/grain.svg"); opacity: 0.09; }
body::after { box-shadow: inset 0 0 240px rgba(0, 0, 0, 0.8); }

#app { position: relative; z-index: 1; }

h1, h2, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img, video { display: block; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--hot); color: var(--bg); }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.ic { width: 20px; height: 20px; flex: none; fill: currentColor; }

.tc {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
.reveal { animation: rise 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }

/* top bar */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px var(--pad);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 900;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark { width: 11px; height: 20px; border-radius: 2px; background: var(--hot); }
.top-nav { display: flex; align-items: center; gap: 14px; font-size: 15px; }
.top-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--dim); text-decoration: none; white-space: nowrap; }
.top-nav a:hover, .link:hover { color: var(--ink); }
.top-nav .pill {
  min-height: 0;
  padding: 2px 10px;
  border: 1px solid var(--hot);
  border-radius: 999px;
  color: var(--hot);
  font-size: 13px;
  font-weight: 500;
}

.view { max-width: 1320px; margin-inline: auto; padding: 24px var(--pad) 64px; }
.view > * + * { margin-top: 28px; }

/* shared pieces */

.display {
  font-weight: 900;
  font-size: clamp(36px, 6.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.display.small { font-size: clamp(26px, 3vw, 40px); line-height: 1.05; }

.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; }
.head .display { flex: 1 1 auto; }
.head .crumb, .head-row, .origin { flex: 0 0 100%; }
.head-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.origin { color: var(--dim); font-size: 14px; overflow-wrap: anywhere; }

.crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  max-width: 100%;
  color: var(--dim);
  font-size: 15px;
  text-decoration: none;
}
.crumb:hover { color: var(--hot); }
.crumb .ic { width: 16px; height: 16px; }

/* the dot hangs outside its item, so at the start of a wrapped line it falls outside the list and is clipped */
.facts { display: flex; flex-wrap: wrap; column-gap: 18px; overflow: hidden; color: var(--dim); font-size: 14px; }
.facts li { position: relative; }
.facts li + li::before { content: "·"; position: absolute; inset-inline-start: -11px; color: var(--edge); }

.view h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
  color: var(--dim);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.view h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.hint { color: var(--dim); font-size: 14px; }
.form-msg { color: var(--bad); font-weight: 500; }
.form-msg:empty { display: none; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: var(--raise);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.hot { border-color: var(--hot); background: var(--hot); color: var(--bg); font-weight: 700; }
.btn.hot:hover { background: #ffd43a; border-color: #ffd43a; }
.btn.bad { border-color: var(--bad); color: var(--bad); }
.btn.big { min-height: 52px; padding: 0 28px; font-size: 18px; }
.btn.file:focus-within { outline: 2px solid var(--hot); outline-offset: 3px; }

.link {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--dim);
  cursor: pointer;
}
.link.bad { color: var(--bad); text-decoration: underline; text-underline-offset: 4px; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 12px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.tag .ic { width: 14px; height: 14px; }
.tag[data-stage="uploading"], .tag[data-stage="queued"] { border-style: dashed; color: var(--dim); }
.tag[data-stage="review"] { border-color: var(--hot); color: var(--hot); }
.tag[data-stage="failed"] { border-color: var(--bad); color: var(--bad); }

.status { display: inline-flex; align-items: center; gap: 7px; color: var(--dim); font-size: 13px; font-weight: 400; }
.status .ic { width: 15px; height: 15px; }
.status-mark { width: 9px; height: 9px; flex: none; border: 1.5px solid currentColor; border-radius: 50%; }
.status[data-status="planned"] .status-mark { border-style: dashed; }
.status[data-status="rendering"] .status-mark { border-radius: 0; }
.status[data-status="revising"] .status-mark { border-radius: 0; transform: rotate(45deg); }
.status[data-status="ready"] { color: var(--ink); }
.status[data-status="ready"] .status-mark { border-color: var(--hot); background: var(--hot); }
.status[data-status="approved"] { color: var(--ink); }

.notice {
  max-width: 760px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--hot);
  border-radius: 4px;
  background: rgba(20, 18, 16, 0.8);
}
.notice > * + * { margin-top: 12px; }
.view .notice h2 { margin-bottom: 0; color: var(--ink); font-size: 18px; font-weight: 700; letter-spacing: 0; }
.view .notice h2::after { content: none; }
.notice.bad { border-inline-start-color: var(--bad); }

.frame {
  display: block;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -24px #000;
  transition: box-shadow 0.2s, transform 0.2s;
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame-empty {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 8px;
  background: repeating-linear-gradient(135deg, transparent 0 9px, rgba(255, 255, 255, 0.03) 9px 10px);
  color: var(--dim);
  font-size: 13px;
  text-align: center;
}

/* the three stages */

.rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.rail-step { display: grid; align-content: start; gap: 2px; padding: 16px 10px 14px; }
.rail-step + .rail-step { border-inline-start: 1px solid var(--line); }
.rail-num {
  margin-bottom: 10px;
  color: transparent;
  font-size: clamp(64px, 12vw, 150px);
  font-weight: 900;
  line-height: 0.78;
  -webkit-text-stroke: 1.5px var(--edge);
}
.rail-name { font-size: clamp(14px, 1.7vw, 22px); font-weight: 700; line-height: 1.2; }
.rail-word { color: var(--dim); font-size: 13px; }
.rail-step[data-state="wait"] .rail-name { color: var(--dim); }
.rail-step[data-state="now"] .rail-num { color: var(--hot); -webkit-text-stroke: 0; }
.rail-step[data-state="now"] .rail-word { color: var(--hot); font-weight: 500; }
.rail-step[data-state="done"] .rail-num { color: var(--ink); -webkit-text-stroke: 0; }

.rail.mini { display: inline-flex; gap: 4px; border: 0; }
.rail.mini .rail-step { display: block; padding: 0; border: 0; }
.rail.mini .rail-num {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 1px solid var(--edge);
  border-radius: 2px;
  color: var(--dim);
  font-size: 13px;
  line-height: 1;
  -webkit-text-stroke: 0;
}
.rail.mini [data-state="now"] .rail-num { border-color: var(--hot); background: var(--hot); color: var(--bg); }
.rail.mini [data-state="done"] .rail-num { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.rail.mini .rail-name, .rail.mini .rail-word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* login */

.login { position: relative; display: grid; place-items: center; min-height: 100dvh; padding: 24px; overflow: hidden; }
.login-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1vw;
  color: transparent;
  font-size: clamp(190px, 36vw, 560px);
  font-weight: 900;
  line-height: 0.8;
  user-select: none;
  -webkit-text-stroke: 1px #37302a;
}
.login-card {
  position: relative;
  display: grid;
  gap: 22px;
  width: min(100%, 400px);
  padding: 32px 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 18, 16, 0.88);
  box-shadow: 0 40px 90px -30px #000;
}
.login-card .display { font-size: clamp(40px, 11vw, 56px); }

/* forms */

.form { display: grid; gap: 30px; max-width: 760px; }
.field { display: grid; gap: 8px; min-width: 0; }
fieldset.field { margin: 0; padding: 0; border: 0; }
.field > label, legend, .composer > label { padding: 0; font-size: 15px; font-weight: 500; }
legend { margin-bottom: 8px; }

input[type="text"], input[type="url"], input[type="password"], textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  background: #0f0d0c;
  font-size: 16px;
}
textarea { display: block; resize: vertical; line-height: 1.5; }
input:focus-visible, textarea:focus-visible { border-color: var(--hot); outline-offset: 0; }
input::placeholder { color: var(--edge); }

.seg { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--edge); border-radius: 6px; justify-self: start; }
.seg button {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--dim);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); font-weight: 700; }

.pane { margin-top: 6px; }
.drop {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 30px 16px;
  border: 1px dashed var(--edge);
  border-radius: 6px;
  text-align: center;
  transition: border-color 0.15s, background-color 0.15s;
}
.drop.over { border-color: var(--hot); background: rgba(255, 198, 0, 0.06); }
.drop-file { font-weight: 500; overflow-wrap: anywhere; }
.drop-file:empty { display: none; }

.cards { display: grid; gap: 12px; }
.card {
  position: relative;
  display: grid;
  gap: 6px;
  padding: 16px;
  padding-inline-start: 52px;
  border: 1px solid var(--edge);
  border-radius: 6px;
  background: rgba(20, 18, 16, 0.7);
}
.card input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.card::before {
  content: "";
  position: absolute;
  inset-block-start: 20px;
  inset-inline-start: 18px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--dim);
  border-radius: 50%;
}
.card:has(input:checked) { border-color: var(--hot); }
.card:has(input:checked)::before { border-color: var(--hot); background: var(--hot); box-shadow: inset 0 0 0 3px var(--panel); }
.card:has(input:focus-visible) { outline: 2px solid var(--hot); outline-offset: 3px; }
.card:has(input:disabled) { opacity: 0.55; }
.card:has(input:disabled) input { cursor: not-allowed; }
.card-name { font-size: 20px; font-weight: 700; }
.card-about { color: var(--soft); font-size: 15px; }

progress {
  display: block;
  width: 100%;
  height: 10px;
  border: 0;
  border-radius: 0;
  background: var(--line);
  appearance: none;
}
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--hot); }
progress::-moz-progress-bar { background: var(--hot); }
.upload-count { display: flex; gap: 0.4em; }
.upload-count .tc { margin-inline-start: auto; color: var(--hot); font-weight: 700; }

/* jobs */

.jobs { display: grid; gap: 14px; }
.job {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  grid-template-areas: "frame body" "frame side";
  align-content: start;
  gap: 12px 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(20, 18, 16, 0.72);
  text-decoration: none;
  transition: border-color 0.2s;
}
.job:hover { border-color: var(--edge); }
.job:hover .frame, .reel:hover .frame { box-shadow: 0 0 0 1px var(--hot), 0 24px 48px -24px #000; }
.job .frame { grid-area: frame; align-self: start; }
.job-body { grid-area: body; display: grid; gap: 8px; align-content: start; }
.job-title { font-size: clamp(22px, 3.2vw, 40px); font-weight: 900; line-height: 1.05; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.job-side { grid-area: side; display: grid; gap: 10px; align-content: end; }
.job-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.empty { display: grid; justify-items: start; gap: 22px; padding-block: 32px; }
.empty p { max-width: 24ch; font-size: clamp(22px, 3vw, 32px); font-weight: 300; line-height: 1.25; }

/* job page */

.sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
.reel { display: grid; gap: 4px; text-decoration: none; }
.reel:hover .frame { transform: translateY(-3px); }
.reel-row { display: flex; justify-content: space-between; margin-top: 8px; color: var(--dim); font-size: 12px; }
.reel-name { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.reel-wait { color: var(--hot); font-size: 13px; }

.danger { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 48px; padding-top: 12px; border-top: 1px solid var(--line); }

/* comments */

.talk { max-width: 760px; }
.composer { display: grid; gap: 10px; }
.composer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; }
.pin-at { color: var(--dim); font-size: 14px; }
.pin-at .tc { color: var(--hot); font-weight: 700; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--hot); }
.note { padding-inline-start: 10px; border-inline-start: 2px solid var(--edge); color: var(--dim); font-size: 13px; }
.thread-box { margin-top: 18px; }
.cm { padding-block: 14px; border-top: 1px solid var(--line); }
.cm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chip {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--hot);
  border-radius: 3px;
  background: none;
  color: var(--hot);
  font-size: 13px;
  cursor: pointer;
}
.chip:hover { background: var(--hot); color: var(--bg); }
.chip.plain { display: inline-flex; align-items: center; border-color: var(--edge); color: var(--dim); cursor: default; }
.chip.plain:hover { background: none; color: var(--dim); }
.cm-state { display: inline-flex; align-items: center; gap: 6px; margin-inline-start: auto; color: var(--dim); font-size: 13px; }
.cm-state::before { content: ""; width: 8px; height: 8px; border: 1.5px solid currentColor; border-radius: 50%; }
.cm-state.done { color: var(--ink); }
.cm-state.done::before { content: none; }
.cm-state .ic { width: 15px; height: 15px; }
.cm-text { margin-top: 8px; color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-meta { margin-top: 4px; color: var(--dim); font-size: 12px; }
@keyframes flash { from { background: rgba(255, 198, 0, 0.16); } to { background: transparent; } }
.cm.fresh { animation: flash 1.6s ease-out; }

.cm-reply { margin-top: 8px; padding-inline-start: 10px; border-inline-start: 2px solid var(--hot); color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.cm-reply-who { color: var(--hot); font-weight: 700; }
.status[data-status="held"] { color: var(--dim); }
.status[data-status="held"] .status-mark { border-style: dotted; }

.picks { max-width: 860px; }
.picks > * + * { margin-top: 12px; }
.pick-list { display: grid; gap: 10px; margin: 16px 0; padding: 0; list-style: none; }
.pick-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.pick-row:has(input:checked) { border-color: var(--hot); }
.pick-row input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--hot); }
.pick-body { display: grid; gap: 4px; min-width: 0; }
.pick-title { color: var(--ink); font-weight: 700; }
.pick-hook { color: var(--hot); }
.pick-idea { color: var(--soft); overflow-wrap: anywhere; }
.pick-meta { color: var(--dim); font-size: 13px; }
.acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }
.acts .form-msg { flex-basis: 100%; }
.acts-note { margin-top: 14px; color: var(--soft); }
.acts .acts-note { flex-basis: 100%; margin: 0; }

/* the editor */

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "head" "play" "seg" "time" "shelf" "caps" "talk";
  gap: 20px;
}
/* a reel with one sound track has no switch, and its empty row would leave a double gap */
.editor:has(> .seg[hidden]) { grid-template-areas: "head" "play" "time" "shelf" "caps" "talk"; }
.reelhead { grid-area: head; display: grid; gap: 10px; }
.shelf { grid-area: shelf; }
.playcol { grid-area: play; }
.time { grid-area: time; }
.editor > .seg { grid-area: seg; justify-self: center; margin-top: -8px; }
.editor .caps { grid-area: caps; }
.editor .talk { grid-area: talk; max-width: none; }

.reelhead-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; }
.reelhead-main { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.reel-no { color: var(--hot); }
.reel-nav { display: flex; gap: 8px; }
.reel-nav .btn { min-height: 40px; padding: 0 12px; font-size: 14px; }
.reel-nav .ic { width: 16px; height: 16px; }

.shelf, .time, .editor .caps, .editor .talk {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(20, 18, 16, 0.78);
}
.shelf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.versions, .files { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill-v {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--edge);
  border-radius: 999px;
  background: none;
  color: var(--dim);
  cursor: pointer;
}
.pill-v[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); font-weight: 700; }
.version-note, .files-label { color: var(--dim); font-size: 14px; }
.files-label { flex-basis: 100%; }
.files .btn { min-height: 40px; padding: 0 14px; font-size: 14px; }

.playcol { display: grid; justify-items: center; align-content: start; gap: 12px; min-width: 0; }
.player { display: grid; justify-items: center; gap: 10px; width: 100%; }
.screen {
  width: min(100%, calc(var(--stage) * 0.5625));
  aspect-ratio: 9 / 16;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 0 0 1px var(--line), 0 40px 90px -30px #000;
}
.screen video { width: 100%; height: 100%; object-fit: contain; cursor: pointer; }
.transport {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: max(340px, calc(var(--stage) * 0.5625));
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}
.transport .tc { flex: 1; font-size: 14px; text-align: center; white-space: nowrap; }
.tool {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 4px;
  background: none;
  cursor: pointer;
}
.tool:hover { background: var(--raise); }
.tool.main { background: var(--hot); color: var(--bg); }
.tool.main:hover { background: #ffd43a; }
.tool.main .ic { width: 24px; height: 24px; }

.player:fullscreen { grid-template-rows: minmax(0, 1fr) auto; padding: 12px; background: #000; }
.player:fullscreen .screen { width: auto; height: 100%; max-width: 100%; box-shadow: none; }

.time { overflow: clip; }
.tl { position: relative; height: 90px; cursor: pointer; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tl i { position: absolute; display: block; font-style: normal; }
.tl-pins, .tl-film, .tl-ruler { position: absolute; inset-inline: 0; }
.tl-pins { top: 0; height: 18px; }
.tl-pin { top: 3px; width: 11px; height: 11px; margin-left: -5.5px; background: var(--hot); transform: rotate(45deg); }
.tl-pin.done { border: 2px solid var(--dim); background: none; }
.tl-film {
  top: 22px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--edge);
  border-radius: 3px;
  background: var(--raise) repeating-linear-gradient(90deg, transparent 0 23px, rgba(0, 0, 0, 0.35) 23px 24px);
}
.tl-broll {
  top: 0;
  bottom: 0;
  border-inline: 1px solid var(--ink);
  background: repeating-linear-gradient(135deg, rgba(245, 240, 230, 0.34) 0 3px, rgba(245, 240, 230, 0.1) 3px 7px);
}
.tl-cut { top: 0; bottom: 0; width: 1px; background: var(--ink); opacity: 0.6; }
.tl-ruler { top: 68px; height: 20px; }
.tl-tick { top: 0; height: 16px; padding-left: 4px; border-left: 1px solid var(--edge); color: var(--dim); font: 11px/16px var(--mono); }
.tl-head { position: absolute; top: 12px; bottom: 0; width: 2px; margin-left: -1px; background: var(--hot); pointer-events: none; }
.tl-head::before { content: ""; position: absolute; top: -6px; left: -5px; width: 12px; height: 8px; border-radius: 2px; background: var(--hot); }
.tl-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 8px; color: var(--dim); font-size: 12px; }
.tl-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; }
@media (hover: none), (pointer: coarse) { .keys, .drag-tip { display: none; } }
.tl-legend li { display: inline-flex; align-items: center; gap: 7px; }
.key-cut { width: 1px; height: 12px; background: var(--ink); }
.key-broll { width: 16px; height: 10px; border-inline: 1px solid var(--ink); background: repeating-linear-gradient(135deg, rgba(245, 240, 230, 0.34) 0 3px, rgba(245, 240, 230, 0.1) 3px 7px); }
.key-pin { width: 8px; height: 8px; background: var(--hot); transform: rotate(45deg); }

.caps-list { max-height: 300px; overflow-y: auto; overscroll-behavior: contain; }
.cap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-inline-start: 2px solid transparent;
  background: none;
  color: var(--dim);
  text-align: start;
  cursor: pointer;
}
.cap .tc { padding-top: 3px; font-size: 12px; }
.cap:hover { color: var(--ink); }
.cap:focus-visible { outline-offset: -2px; }
.caps-list [aria-current] .cap { border-inline-start-color: var(--hot); background: var(--raise); color: var(--ink); }
.caps-list [aria-current] .tc { color: var(--hot); }

/* styles page */

.style { padding-top: 26px; border-top: 1px solid var(--line); }
.style > * + * { margin-top: 14px; }
.style-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px; }
.view .style-name { display: block; margin: 0; color: var(--ink); font-size: clamp(28px, 4vw, 48px); font-weight: 900; letter-spacing: -0.01em; line-height: 1.05; }
.view .style-name::after { content: none; }
.lead { max-width: 62ch; font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5; }
.learned { max-width: 72ch; color: var(--dim); }
.learned b { color: var(--soft); font-weight: 500; }
.rules { display: grid; gap: 0 40px; margin-top: 22px; }
.rule { padding-block: 16px; border-top: 1px solid var(--line); }
.rule dt { display: flex; align-items: baseline; gap: 12px; font-weight: 700; }
.rule dt .tc { color: var(--hot); font-size: 13px; font-weight: 400; }
.rule dd { margin-top: 6px; max-width: 62ch; color: var(--soft); }

@media (min-width: 720px) {
  :root { --pad: 32px; }
  .view { padding-top: 36px; }
  .rail-step { grid-template-columns: auto minmax(0, 1fr); align-content: end; column-gap: 18px; padding: 22px 20px 18px; }
  .rail-num { grid-row: span 2; margin-bottom: 0; }
  .rail-name { align-self: end; }
  .rail.mini .rail-num { grid-row: auto; }
  .job { grid-template-columns: 132px minmax(0, 1fr); gap: 14px 24px; padding: 18px; }
  .sheet { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 22px; }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .files-label { flex-basis: auto; }
  .editor { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "head head" "shelf shelf" "play caps" "seg caps" "time time" "talk talk"; }
  .editor:has(> .seg[hidden]) { grid-template-areas: "head head" "shelf shelf" "play caps" "time time" "talk talk"; }
  /* the list fills the row beside the video without stretching it */
  .editor .caps { display: flex; flex-direction: column; contain: size; }
  .editor .caps-list { flex: 1; min-height: 0; max-height: none; }
  .playcol { min-width: 340px; }
}

@media (min-width: 1100px) {
  /* what is left of the window after the top bar, the transport and the timeline */
  :root { --stage: clamp(400px, calc(100vh - 340px), 760px); }
  .sheet { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .jobs { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .job-title { font-size: 32px; }
  .editor {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "head play shelf" "head play seg" "caps play talk" "time time time";
  }
  .editor:has(> .seg[hidden]) { grid-template-rows: auto 1fr auto; grid-template-areas: "head play shelf" "caps play talk" "time time time"; }
  .editor > .seg { justify-self: stretch; margin-top: 0; }
  .editor > .seg button { flex: 1; }
  .editor .talk { display: flex; flex-direction: column; contain: size; }
  .editor .talk-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-inline-end: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
