/* ==========================================================================
   SHOTREAD components, v2. Requires tokens.css.
   Rules baked in: no gradients, no box-shadow, no cream, no serif, no
   hairline-and-eyebrow editorial grammar, no icon grids. Frames are real
   stills. Yellow means marked. The monitor is the only dark surface.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: var(--fs-15); line-height: var(--lh-body);
  font-variation-settings: "wdth" var(--wdth-normal);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; font-variation-settings: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4 { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--mark); color: var(--mark-ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: var(--r-control); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 1000; background: var(--mark); color: var(--mark-ink); padding: 10px 14px; font-weight: 700; border-radius: var(--r-control); }
.skip-link:focus { top: 8px; }

/* --------------------------------------------------------------------------
   Type. The width axis is the voice.
   -------------------------------------------------------------------------- */
.display {
  font-variation-settings: "wdth" var(--wdth-condensed);
  font-weight: 800; line-height: var(--lh-display); letter-spacing: -0.005em;
  text-transform: uppercase;
}
.display--120 { font-size: var(--fs-120); }
.display--80  { font-size: var(--fs-80); }
.display--56  { font-size: var(--fs-56); }
.display--40  { font-size: var(--fs-40); }
.display--32  { font-size: var(--fs-32); }
.display--24  { font-size: var(--fs-24); line-height: 1; }

/* Headline: condensed but mixed case, for sentences */
.headline { font-variation-settings: "wdth" var(--wdth-narrow); font-weight: 700; line-height: var(--lh-tight); letter-spacing: -0.01em; }
.headline--40 { font-size: var(--fs-40); }
.headline--32 { font-size: var(--fs-32); }
.headline--24 { font-size: var(--fs-24); }
.headline--20 { font-size: var(--fs-20); }

/* Tag: the lower-third label. Expanded, small, uppercase, heavy. */
.tag {
  font-variation-settings: "wdth" var(--wdth-wide);
  font-weight: 700; font-size: var(--fs-11); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-2);
}
.tag--ink { color: var(--ink); }
.tag--dim { color: var(--ink-3); }

.lede { font-size: var(--fs-20); line-height: 1.4; color: var(--ink-2); max-width: 56ch; font-weight: 500; }
.body { font-size: var(--fs-15); color: var(--ink-2); max-width: 64ch; }
.small { font-size: var(--fs-13); color: var(--ink-3); }
.strong { font-weight: 700; }
.mono, .tc, .num { font-family: var(--font-mono); font-variation-settings: normal; font-variant-numeric: tabular-nums; }
.tc { font-size: var(--fs-12); font-weight: 500; color: var(--ink-2); }
.tc--mark { background: var(--mark); color: var(--mark-ink); padding: 1px 5px; border-radius: 3px; }
.tc--btn { cursor: pointer; border-bottom: 2px solid var(--mark); }
.tc--btn:hover { background: var(--mark-2); }

/* The mark: a highlighter sweep behind words. Flat. */
.mark { background: var(--mark); color: var(--mark-ink); padding: 0 .12em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.mark--soft { background: var(--mark-2); }
.mark--sweep { background-size: 0% 100%; background-repeat: no-repeat; background-image: linear-gradient(var(--mark), var(--mark)); animation: sweep var(--t-sweep) .2s forwards; background-color: transparent; }
@keyframes sweep { to { background-size: 100% 100%; } }

/* --------------------------------------------------------------------------
   The console: a black bar across the top of the app. Broadcast desk.
   -------------------------------------------------------------------------- */
.console {
  height: var(--console-h); background: var(--monitor); color: var(--monitor-ink);
  display: flex; align-items: center; gap: 16px; padding: 0 16px;
}
.console .wordmark { display: inline-flex; align-items: center; gap: 8px; font-variation-settings: "wdth" var(--wdth-condensed); font-weight: 800; font-size: 20px; letter-spacing: 0.01em; text-transform: uppercase; color: var(--monitor-ink); }
.console__ws { display: inline-flex; align-items: center; gap: 8px; padding: 0 10px; height: 28px; border-radius: var(--r-pill); background: var(--monitor-2); font-size: var(--fs-13); font-weight: 600; }
.console__ws .swatch { width: 10px; height: 10px; border-radius: 50%; }
.console__search { flex: 1; max-width: 480px; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--monitor-2); border-radius: var(--r-control); color: var(--monitor-dim); font-size: var(--fs-13); }
.console__spacer { flex: 1; }
.console__credits { font-family: var(--font-mono); font-size: var(--fs-13); color: var(--mark); font-weight: 600; }
.console__credits--na { font-family: inherit; font-size: var(--fs-12, 12px); font-weight: 500; color: var(--monitor-ink, #f5f6f2); opacity: .85; }
.console__mode { font-size: var(--fs-12); font-weight: 600; color: var(--monitor-dim); display: inline-flex; gap: 6px; align-items: center; }
.console > .avatar, .console > a.avatar { background: var(--mark); color: var(--mark-ink); }

/* Rail: white, under the console */
.rail { width: var(--rail-w); background: var(--bg); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.rail__nav { padding: 12px 10px; display: grid; gap: 2px; }
.rail__item { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: var(--r-control); font-weight: 600; font-size: var(--fs-14); color: var(--ink-2); }
.rail__item:hover { background: var(--bg-2); color: var(--ink); }
.rail__item.is-active { background: var(--ink); color: var(--bg); }
.rail__item .count { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-11); font-weight: 600; opacity: .8; }
.rail__group { padding: 14px 20px 4px; }
.rail__nav--more { padding-top: 2px; padding-bottom: 4px; }
.rail__nav--more .rail__item { height: 32px; font-weight: 500; }
.rail__client { display: flex; align-items: center; gap: 10px; padding: 7px 10px 7px 12px; border-radius: var(--r-control); font-size: var(--fs-14); font-weight: 500; color: var(--ink-2); }
.rail__client:hover { background: var(--bg-2); color: var(--ink); }
.rail__client.is-active { background: var(--bg-2); color: var(--ink); font-weight: 700; }
.rail__client .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.rail__client .count { margin-left: auto; font-family: var(--font-mono); font-size: var(--fs-11); color: var(--ink-3); }
.rail__new { margin: 8px 10px; }

/* --------------------------------------------------------------------------
   Buttons. Yellow is the one primary per screen. Black is the strong secondary.
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: var(--r-control);
  font-size: var(--fs-14); font-weight: 700; line-height: 1; white-space: nowrap;
  background: var(--ink); color: var(--bg); border: 2px solid var(--ink);
  transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.btn:hover { background: #2A2C27; border-color: #2A2C27; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--mark); color: var(--mark-ink); border-color: var(--mark); }
.btn--primary:hover { background: #F2D800; border-color: #F2D800; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--bg-2); }
.btn--quiet { background: transparent; color: var(--ink-2); border-color: transparent; font-weight: 600; }
.btn--quiet:hover { background: var(--bg-2); color: var(--ink); }
.btn--danger { background: var(--bad-strong); color: #fff; border-color: var(--bad-strong); }
.btn--sm { height: 30px; padding: 0 12px; font-size: var(--fs-13); }
.btn--lg { height: 48px; padding: 0 22px; font-size: var(--fs-16); }
.btn--block { width: 100%; }
.btn--on-monitor { background: transparent; color: var(--monitor-ink); border-color: var(--monitor-line); }
.btn--on-monitor:hover { background: var(--monitor-2); border-color: var(--monitor-dim); }
.ibtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r-control); color: var(--ink-2); }
.ibtn:hover { background: var(--bg-2); color: var(--ink); }
.ibtn svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   Labels and chips. Labels are the marker colours (pills). Chips are neutral.
   -------------------------------------------------------------------------- */
.label {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: var(--r-pill); font-size: var(--fs-12); font-weight: 700;
  background: var(--label-bg, var(--bg-3)); color: var(--label-ink, var(--ink));
  white-space: nowrap;
}
.label--lemon     { --label-bg: var(--label-lemon);     --label-ink: #0E0F0C; }
.label--tangerine { --label-bg: var(--label-tangerine); --label-ink: #0E0F0C; }
.label--magenta   { --label-bg: #C2185B; --label-ink: #FFFFFF; } /* a11y: white text needs 4.5:1; was var(--label-magenta) */
.label--violet    { --label-bg: #5B3FE0; --label-ink: #FFFFFF; } /* a11y: was var(--label-violet) */
.label--cerulean  { --label-bg: #0B6BCB; --label-ink: #FFFFFF; } /* a11y: was var(--label-cerulean) */
.label--mint      { --label-bg: var(--label-mint);      --label-ink: #0E0F0C; }
.label--ink       { --label-bg: var(--ink);             --label-ink: #FFFFFF; }
.label--live      { --label-bg: #C8102E; --label-ink: #FFFFFF; } /* a11y: was var(--live) */
.label--live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; }
.label--sm { height: 20px; padding: 0 8px; font-size: var(--fs-11); }

.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: var(--r-control); font-size: var(--fs-12); font-weight: 600; background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.chip--outline { background: transparent; border: 1.5px solid var(--line); }
.chip--ok { background: var(--ok-soft); color: #0E6B3F; }
.chip--warn { background: var(--warn-soft); color: #9A3F00; }
.chip--bad { background: var(--bad-soft); color: #A8101F; }
.chip--mark { background: var(--mark); color: var(--mark-ink); }
.chip--btn { cursor: pointer; }
.chip--btn:hover { background: var(--bg-3); color: var(--ink); }
.chip--btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--ink-4); }
.dot--ok { background: var(--ok); } .dot--warn { background: var(--warn); } .dot--bad { background: var(--bad); } .dot--live { background: var(--live); }
.kbd { font-family: var(--font-mono); font-size: var(--fs-11); padding: 2px 6px; border: 1.5px solid var(--line); border-bottom-width: 3px; border-radius: 4px; }

/* --------------------------------------------------------------------------
   Tabs: heavy, with a thick yellow mark under the active one.
   -------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tab { position: relative; padding: 10px 12px 12px; font-size: var(--fs-14); font-weight: 700; color: var(--ink-3); white-space: nowrap; border-radius: var(--r-control) var(--r-control) 0 0; }
.tab:hover { color: var(--ink); background: var(--bg-2); }
.tab[aria-selected="true"] { color: var(--ink); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 4px; background: var(--mark); }
.tab .count { font-family: var(--font-mono); font-size: var(--fs-11); margin-left: 6px; color: var(--ink-3); }

.seg { display: inline-flex; background: var(--bg-2); padding: 3px; border-radius: var(--r-control); gap: 2px; }
.seg button { height: 28px; padding: 0 12px; font-size: var(--fs-13); font-weight: 700; color: var(--ink-2); border-radius: 4px; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg button:hover:not([aria-pressed="true"]) { color: var(--ink); }

/* --------------------------------------------------------------------------
   Inputs: flat, 2px black on focus.
   -------------------------------------------------------------------------- */
.field { display: grid; gap: 6px; }
.label-text { font-size: var(--fs-13); font-weight: 700; }
.hint { font-size: var(--fs-12); color: var(--ink-3); }
.input, .select, .textarea { width: 100%; height: 40px; padding: 0 12px; background: var(--bg); border: 2px solid var(--line); border-radius: var(--r-control); font-size: var(--fs-14); font-weight: 500; transition: border-color var(--t-fast); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--ink); }
.textarea { height: auto; min-height: 100px; padding: 10px 12px; line-height: var(--lh-body); resize: vertical; }
.input--lg { height: 52px; font-size: var(--fs-16); padding: 0 16px; }
.input--mono { font-family: var(--font-mono); font-size: var(--fs-13); }
.select { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'><path d='M3 5l4 4 4-4' fill='none' stroke='%230E0F0C' stroke-width='2'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; }
.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: var(--fs-14); font-weight: 500; }
.check input { appearance: none; width: 18px; height: 18px; margin-top: 1px; flex: none; border: 2px solid var(--ink-3); border-radius: 4px; background: var(--bg); display: grid; place-items: center; }
.check input:checked { background: var(--ink); border-color: var(--ink); }
.check input:checked::after { content: ""; width: 9px; height: 5px; border-left: 2.5px solid var(--mark); border-bottom: 2.5px solid var(--mark); transform: translateY(-1px) rotate(-45deg); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked::after { width: 7px; height: 7px; border: 0; border-radius: 50%; background: var(--mark); transform: none; }
.switch { position: relative; width: 40px; height: 22px; border-radius: var(--r-pill); background: var(--bg-3); flex: none; transition: background var(--t-fast); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--ink-3); transition: transform var(--t-fast), border-color var(--t-fast); }
.switch[aria-checked="true"] { background: var(--ink); }
.switch[aria-checked="true"]::after { transform: translateX(18px); background: var(--mark); border-color: var(--ink); }

/* --------------------------------------------------------------------------
   Frames. The product watches footage; the UI shows it. A frame is a real
   still with a timecode badge; it is never a grey rectangle. While a still
   loads, the slot is the monitor colour with the timecode, like a viewer
   before play.
   -------------------------------------------------------------------------- */
.frame { position: relative; aspect-ratio: 16 / 9; background: var(--monitor); border-radius: var(--r-frame); overflow: hidden; color: var(--monitor-ink); }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame__tc { position: absolute; left: 6px; bottom: 6px; font-family: var(--font-mono); font-size: 11px; font-weight: 600; background: rgba(14,15,12,.85); color: var(--monitor-ink); padding: 2px 6px; border-radius: 3px; }
.frame__tc--mark { background: var(--mark); color: var(--mark-ink); }
.frame__type { position: absolute; left: 5px; top: 5px; max-width: calc(100% - 10px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; line-height: 1; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--monitor-ink); background: rgba(14,15,12,.82); padding: 3px 5px; border-radius: 3px; font-variation-settings: "wdth" var(--wdth-normal); }
.frame--marked .frame__type { max-width: calc(100% - 32px); }
.frame--marked { outline: 3px solid var(--mark); outline-offset: -3px; }
.frame--marked::after { content: ""; position: absolute; right: 0; top: 0; width: 0; height: 0; border-top: 22px solid var(--mark); border-left: 22px solid transparent; }
.frame--selected { outline: 3px solid var(--ink); outline-offset: -3px; }
.frame--sm { width: 128px; } .frame--xs { width: 88px; }
.frame--play::before { content: ""; position: absolute; left: 50%; top: 50%; width: 0; height: 0; border-left: 18px solid var(--monitor-ink); border-top: 11px solid transparent; border-bottom: 11px solid transparent; transform: translate(-40%, -50%); opacity: .9; }

/* Filmstrip: a dense row of frames with scene boundaries. Horizontal scroll. */
.filmstrip { display: flex; gap: 3px; overflow-x: auto; padding: 6px; background: var(--monitor); scrollbar-width: thin; }
.filmstrip .frame { flex: none; width: 112px; }
.filmstrip .frame + .frame.is-scene-start { margin-left: 8px; }
.filmstrip .frame.is-scene-start::before { content: ""; position: absolute; left: -6px; top: 0; bottom: 0; width: 2px; background: var(--monitor-dim); }

/* Contact sheet: a grid of frames with timecodes, for Find results and moments */
.contact { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }

/* --------------------------------------------------------------------------
   The monitor: player plus scope plus scrubber. Sticky on a cut.
   -------------------------------------------------------------------------- */
.monitor { background: var(--monitor); color: var(--monitor-ink); border-radius: var(--r-frame); min-width: 0; max-width: 100%; }
.monitor__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--monitor-line); font-size: var(--fs-13); white-space: nowrap; overflow: hidden; }
.monitor__bar > * { flex: none; }
.monitor__bar .console__spacer { flex: 1; }
.monitor__bar .tag { color: var(--monitor-dim); }
.monitor__bar .tc { color: var(--mark); font-weight: 600; }
.monitor__stage { position: relative; aspect-ratio: 16 / 9; background: #000; display: grid; place-items: center; overflow: hidden; }
.monitor__stage .big-tc { font-family: var(--font-mono); font-size: clamp(28px, 4vw, 56px); font-weight: 600; color: var(--monitor-dim); letter-spacing: .02em; }
.monitor__foot { display: flex; align-items: center; gap: 12px; padding: 10px 14px; }

/* Scrubber: segments by scene, coloured by energy heat, a yellow playhead */
.scrub { position: relative; flex: 1; height: 28px; background: var(--monitor-2); border-radius: 4px; overflow: hidden; }
.scrub__seg { position: absolute; top: 0; bottom: 0; cursor: pointer; opacity: .9; border-right: 2px solid var(--monitor); }
.scrub__seg[data-heat="low"] { background: var(--heat-low); }
.scrub__seg[data-heat="mid"] { background: var(--heat-mid); }
.scrub__seg[data-heat="high"] { background: var(--heat-high); }
.scrub__seg:hover, .scrub__seg.is-active { opacity: 1; outline: 2px solid var(--monitor-ink); outline-offset: -2px; z-index: 1; }
.scrub__mark { position: absolute; top: -1px; width: 6px; height: 6px; background: var(--mark); transform: translateX(-3px); z-index: 2; border-radius: 1px; }
.playhead { position: absolute; top: 0; bottom: 0; width: 3px; background: var(--mark); transform: translateX(-1px); z-index: 3; }
.playhead::before { content: ""; position: absolute; top: -2px; left: -5px; width: 13px; height: 9px; background: var(--mark); clip-path: polygon(0 0, 100% 0, 50% 100%); }
.transport { display: inline-flex; align-items: center; gap: 6px; }
.transport button { width: 32px; height: 32px; display: grid; place-items: center; color: var(--monitor-ink); border-radius: var(--r-control); }
.transport button:hover { background: var(--monitor-2); }
.transport .tc { color: var(--monitor-ink); font-size: var(--fs-13); }
.transport .tc.dim { color: var(--monitor-dim); }

/* Scope: the retention curve on the monitor. Yellow area, red drop. */
.scope { position: relative; height: 160px; background: var(--monitor-2); border-radius: 4px; overflow: hidden; }
.scope svg { width: 100%; height: 100%; display: block; }
.scope__label { position: absolute; left: 10px; top: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--monitor-dim); }

/* --------------------------------------------------------------------------
   Scores: condensed numerals, big, coloured by tone. Meters are 6px bars.
   -------------------------------------------------------------------------- */
.score { display: inline-flex; align-items: baseline; gap: 3px; font-variation-settings: "wdth" var(--wdth-condensed); font-weight: 800; line-height: .9; font-variant-numeric: tabular-nums; }
.score__n { font-size: var(--fs-40); letter-spacing: -0.01em; }
.score__d { font-size: var(--fs-14); font-weight: 700; color: var(--ink-3); font-variation-settings: "wdth" var(--wdth-normal); }
.score--xl .score__n { font-size: var(--fs-80); }
.score--lg .score__n { font-size: var(--fs-56); }
.score--sm .score__n { font-size: var(--fs-24); }
.score--ok .score__n { color: var(--ok); } .score--warn .score__n { color: var(--warn); } .score--bad .score__n { color: var(--bad); }
.score--none .score__n { color: var(--ink-4); }
.grade { font-size: var(--fs-12); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; font-variation-settings: "wdth" var(--wdth-wide); color: var(--ink-3); }
.meter { position: relative; height: 6px; background: var(--bg-3); border-radius: 3px; overflow: hidden; }
.meter > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--v, 0%); background: var(--ink); border-radius: 3px; transition: width var(--t-base); }
.meter--ok > i { background: var(--ok); } .meter--warn > i { background: var(--warn); } .meter--bad > i { background: var(--bad); } .meter--mark > i { background: var(--mark); }

/* Scorecard: a row of five, black 2px rule above, big numerals */
.scorecard { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 2px; background: var(--line); border: 2px solid var(--ink); border-radius: var(--r-control); overflow: hidden; }
.scorecard__cell { background: var(--bg); padding: 12px 14px; display: grid; gap: 6px; cursor: pointer; }
.scorecard__cell:hover { background: var(--bg-2); }
.scorecard__cell.is-locked { background: var(--bg-2); color: var(--ink-3); }
.scorecard__cell .tag { display: flex; justify-content: space-between; gap: 6px; white-space: nowrap; overflow: hidden; }

/* Heat strip: energy per scene as coloured blocks (also used in tables) */
.heat { display: inline-flex; gap: 2px; height: 10px; }
.heat i { width: 10px; border-radius: 2px; background: var(--bg-3); }
.heat i[data-heat="low"] { background: var(--heat-low); } .heat i[data-heat="mid"] { background: var(--heat-mid); } .heat i[data-heat="high"] { background: var(--heat-high); }
.heat-pill { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-12); font-weight: 700; }
.heat-pill::before { content: ""; width: 10px; height: 10px; border-radius: 2px; background: var(--heat-mid); }
.heat-pill[data-heat="low"]::before { background: var(--heat-low); } .heat-pill[data-heat="high"]::before { background: var(--heat-high); }

/* KPI: condensed numeral with an expanded tag */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); min-width: 0; gap: 2px; background: var(--line); border-radius: var(--r-control); overflow: hidden; border: 2px solid var(--ink); }
.kpi { background: var(--bg); padding: 14px 16px; display: grid; gap: 4px; }
.kpi__v { font-variation-settings: "wdth" var(--wdth-condensed); font-weight: 800; font-size: var(--fs-40); line-height: .9; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.kpi__v .u { font-size: var(--fs-14); font-weight: 700; color: var(--ink-3); margin-left: 4px; font-variation-settings: "wdth" var(--wdth-normal); }

/* --------------------------------------------------------------------------
   Rows, tables, scene rows. Lists lead with a frame or a condensed numeral.
   -------------------------------------------------------------------------- */
.rowlist { display: grid; }
.rowx { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); border-radius: var(--r-control); }
.rowx:hover { background: var(--bg-2); }
.rowx .title { font-weight: 700; font-size: var(--fs-15); }
.rowx .meta { font-size: var(--fs-12); color: var(--ink-3); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-weight: 500; }
.rowx .scores { display: flex; gap: 14px; }
.rowx .scores .score__n { font-size: var(--fs-24); }

.table-wrap, .tablewrap { overflow-x: auto; max-width: 100%; }
/* Two-part row (text, then actions): actions sit to the right on wide screens and drop under the text on phones. */
.rowx.rowx--stack { grid-template-columns: minmax(0, 1fr) auto; }
.rowx.rowx--stack > .row { flex-wrap: wrap; }
/* Side list and detail: one column on phones. */
.split-nav { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 16px; }
.split-nav > * { min-width: 0; }
.table { font-size: var(--fs-13); min-width: 560px; }
.table th { text-align: left; padding: 8px 10px; background: var(--bg-2); font-size: var(--fs-11); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-variation-settings: "wdth" var(--wdth-wide); border-bottom: 2px solid var(--ink); }
.table th:first-child { border-radius: var(--r-control) 0 0 0; } .table th:last-child { border-radius: 0 var(--r-control) 0 0; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; font-weight: 500; }
.table tr:hover td { background: var(--bg-2); }
.table td.num, .table th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.table td.big { font-variation-settings: "wdth" var(--wdth-condensed); font-weight: 800; font-size: var(--fs-20); }

/* Scene row: frame, timecode, type, read, facts, note count */
.scene { display: grid; grid-template-columns: 128px minmax(0, 1fr) auto; gap: 14px; padding: 10px 8px; border-bottom: 1px solid var(--line); align-items: start; border-radius: var(--r-control); }
.scene:hover { background: var(--bg-2); }
.scene__head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.scene__type { font-weight: 800; font-size: var(--fs-14); font-variation-settings: "wdth" var(--wdth-narrow); text-transform: uppercase; letter-spacing: .02em; }
.scene__read { font-size: var(--fs-14); font-weight: 500; }
.scene__facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: var(--fs-12); color: var(--ink-3); margin-top: 6px; font-weight: 500; }
.scene__facts b { color: var(--ink-2); font-weight: 700; }
.scene__ocr { display: inline-block; margin-top: 6px; font-family: var(--font-mono); font-size: 11px; background: var(--monitor); color: var(--monitor-ink); padding: 2px 6px; border-radius: 3px; }
.scene__act { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.notecount { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: var(--fs-11); font-weight: 600; background: var(--mark); color: var(--mark-ink); padding: 2px 7px; border-radius: 3px; }

/* --------------------------------------------------------------------------
   Notes: a mark on the timeline. Yellow bar at left, timecode on yellow.
   -------------------------------------------------------------------------- */
.note { display: grid; gap: 8px; padding: 10px 12px 12px 14px; border-left: 4px solid var(--mark); background: var(--bg); border-bottom: 1px solid var(--line); }
.note--drafted { border-left-color: var(--ink-4); }
.note__head { display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--ink-3); font-weight: 600; }
.note__target { font-weight: 700; color: var(--ink-2); }
.note__text { font-size: var(--fs-14); font-weight: 500; line-height: 1.45; }
.note__frames { display: flex; gap: 6px; flex-wrap: wrap; }
.note__frames .frame { width: 72px; }
.note__frames .frame__tc { font-size: 9px; padding: 1px 4px; }
.note__by { display: flex; align-items: center; gap: 8px; font-size: var(--fs-12); color: var(--ink-3); }

/* Callout, toast, empty */
.callout { padding: 12px 14px; border-radius: var(--r-control); background: var(--bg-2); font-size: var(--fs-14); font-weight: 500; display: grid; gap: 4px; border-left: 4px solid var(--ink); }
.callout--mark { background: var(--mark-2); border-left-color: var(--mark); }
.callout--ok { background: var(--ok-soft); border-left-color: var(--ok); }
.callout--warn { background: var(--warn-soft); border-left-color: var(--warn); }
.callout--bad { background: var(--bad-soft); border-left-color: var(--bad); }
.toast { display: inline-flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: var(--r-control); font-weight: 600; font-size: var(--fs-14); }
.toast .btn { height: 28px; }
.empty { padding: 32px 20px; text-align: center; border: 2px dashed var(--line); border-radius: var(--r-control); color: var(--ink-3); font-weight: 500; }

/* Panels: a 2px black outline marks the one container that matters on a
   screen (the cost-and-start box, the room's share panel). Everything else
   is open white or a studio-grey block. */
.panel { background: var(--bg-2); border-radius: var(--r-control); padding: 16px; }
.panel--outline { background: var(--bg); border: 2px solid var(--ink); }
.panel--monitor { background: var(--monitor); color: var(--monitor-ink); }

/* Tiles: selectable option blocks (modes, depths, sources) */
.tile { text-align: left; padding: 14px; border: 2px solid var(--line); border-radius: var(--r-control); display: grid; gap: 4px; background: var(--bg); transition: border-color var(--t-fast), background var(--t-fast); }
.tile:hover { border-color: var(--ink-3); }
.tile[aria-pressed="true"] { border-color: var(--ink); background: var(--mark-2); }
.tile__name { font-weight: 800; font-size: var(--fs-16); font-variation-settings: "wdth" var(--wdth-narrow); }
.tile__hint { font-size: var(--fs-13); color: var(--ink-2); font-weight: 500; }
.tile__cost { font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 600; }

/* Section header: a condensed uppercase title with a count, no rule lines */
.sec { display: grid; gap: 12px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec__title { font-variation-settings: "wdth" var(--wdth-condensed); font-weight: 800; font-size: var(--fs-24); text-transform: uppercase; letter-spacing: .005em; line-height: 1; display: flex; align-items: baseline; gap: 10px; }
.sec__title .count { font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 600; color: var(--ink-3); font-variation-settings: normal; text-transform: none; }

/* Modal: white, 2px black outline, no scrim blur */
.scrim { position: fixed; inset: 0; background: rgba(14,15,12,.55); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { width: min(100%, 640px); max-height: 90vh; overflow: auto; background: var(--bg); border: 2px solid var(--ink); border-radius: var(--r-control); }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 2px solid var(--ink); }
.modal__body { padding: 18px; display: grid; gap: 16px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; background: var(--bg-2); }

/* Inside a grey panel, grey controls step down one shade so they stay visible */
.panel .seg, .panel .chip:not([class*="chip--"]) { background: var(--bg-3); }
.panel .callout:not([class*="callout--"]) { background: var(--bg); }

/* Utilities */
.row { display: flex; align-items: center; gap: 8px; }
.row--between { justify-content: space-between; }
.row--wrap { flex-wrap: wrap; }
.stack { display: grid; gap: 8px; } .stack--4 { gap: 16px; } .stack--6 { gap: 24px; } .stack--8 { gap: 32px; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-3); }
.right { text-align: right; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.avatar--lemon { background: var(--label-lemon); color: var(--ink); } .avatar--magenta { background: var(--label-magenta); color: #fff; } .avatar--cerulean { background: var(--label-cerulean); color: #fff; } .avatar--mint { background: var(--label-mint); color: var(--ink); }

/* Responsive: the console drops search and mode on phones; the rail becomes a bottom bar in the app shell (see app layout). */
@media (max-width: 719px) {
  .console { padding: 0 12px; gap: 10px; }
  .console__search, .console__mode { display: none; }
  .scene { grid-template-columns: 96px minmax(0, 1fr); }
  .scene__act { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; }
  .rowx .scores { gap: 10px; }
  .filmstrip .frame { width: 96px; }
  .rowx.rowx--stack { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .split-nav { grid-template-columns: minmax(0, 1fr); }
}
