/* Signal OSX design system: the parts for reviewing work, version 0.8, approved by Tim on 16 November 2026
   (DEC-SYS-20261116-05). Drawn for the Film Platform's review room (DWO-20261116-053), and designed once so the
   sign-off tool takes the same parts. Rules: ../specs/review.md. The seventh stylesheet.
   Link it after signal-osx.css, signal-osx-components.css, signal-osx-data-and-forms.css,
   signal-osx-making.css (0.5), signal-osx-assets.css (0.6) and, where used, signal-osx-layouts.css (0.7).
   It reads their variables. The six values it adds sit in the :root block below and in tokens.json (review). */

:root {
  /* A note's mark sits on pictures of any colour, so it keeps one look in both themes:
     violet with indigo figures and a white ring (the round 3 dark tool picture, approved 14 Nov 2026). */
  --sx-mark: #5A81FA;
  --sx-mark-ink: #12143A;
  --sx-mark-ring: #FFFFFF;
  --sx-mark-fill: rgba(90, 129, 250, 0.16);
  --sx-mark-size: 24px;
  --sx-track-steps: 11;
}

/* The lockup's violet by class was first proposed here. It was approved in version 0.5 and lives in
   tokens/signal-osx-making.css, which pages using these parts link before this sheet. */

/* ---------- A check still running: one state added to the approved check list (version 0.5) ----------
   Version 0.8. The check list (.sx-checklist, tokens/signal-osx-making.css) has passed, advice, held
   and blocking. A gate's checks also run while a person watches, so a row can say it has not finished. Added
   only: no 0.5 rule changes. */
.sx-checklist__item--running .sx-checklist__mark { color: var(--sx-muted); box-shadow: inset 0 0 0 1.5px var(--sx-line-field); }
.sx-checklist__item--running .sx-checklist__name { color: var(--sx-text-2); }
/* A check's tag (fixed rule or model's reading) moves to the next line whole, never split across two. */
.sx-checklist__name .sx-tag { white-space: nowrap; }

/* ---------- The status bar under a piece of work (from the approved round 3 dark tool) ---------- */
.sx-work { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sx-work > .sx-well { flex: 1; min-height: 0; position: relative; }
.sx-statusbar { flex: none; min-height: 36px; display: flex; align-items: center; gap: var(--sx-space-5); padding: 0 var(--sx-space-4);
  background: var(--sx-surface); border-top: 1px solid var(--sx-line); font-size: var(--sx-size-label); color: var(--sx-text-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx-statusbar__end { margin-left: auto; }
.sx-tool-sep { width: 24px; height: 1px; margin: var(--sx-space-1) 0; background: var(--sx-line); }
.sx-rail__end { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; }

/* ---------- The stage and gate track: a process of steps, with the decisions that close them ---------- */
.sx-track { display: grid; grid-template-columns: repeat(var(--sx-track-steps), minmax(0, 1fr)); row-gap: var(--sx-space-4); margin: 0; padding: 0; list-style: none; }
.sx-track__gate { grid-row: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; margin: 0 var(--sx-space-1); overflow-wrap: anywhere;
  padding: var(--sx-space-2) var(--sx-space-3); border-radius: var(--sx-radius-control) var(--sx-radius-control) 0 0;
  border-bottom: 2px solid var(--sx-line-box); font-size: var(--sx-size-label); color: var(--sx-text-2); text-decoration: none; }
.sx-track__gate-no { color: var(--sx-muted); }
.sx-track__gate-name { font-size: var(--sx-size-ui); font-weight: var(--sx-weight-medium); color: var(--sx-text); }
.sx-track__gate .sx-stage { font-size: var(--sx-size-label); margin-top: var(--sx-space-1); }
.sx-track__gate-when { font-size: var(--sx-size-label); color: var(--sx-muted); font-variant-numeric: tabular-nums; }
.sx-track__gate--done { border-bottom-color: var(--sx-accent); }
.sx-track__gate--current { background: var(--sx-selected); border-bottom-color: var(--sx-accent); }
.sx-track__gate--reopened { border-bottom-color: var(--sx-attention-mark); }
.sx-track__gate--ahead .sx-track__gate-name { color: var(--sx-text-2); font-weight: var(--sx-weight-regular); }
/* Neighbouring stage names keep at least a 16-pixel gap (each step pads its sides by 8): a longer name takes another
   line rather than run up against the next. */
.sx-track__step { grid-row: 2; position: relative; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: var(--sx-space-2);
  padding: 0 var(--sx-space-2); text-align: center; }
.sx-track__step::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--sx-line-box); }
.sx-track__step--first::before { left: 50%; }
.sx-track__step--last::before { right: 50%; }
.sx-track__step--done::before { background: var(--sx-accent); }
.sx-track__step--current::before { background: linear-gradient(to right, var(--sx-accent) 50%, var(--sx-line-box) 50%); }
.sx-track__step--first.sx-track__step--current::before { background: var(--sx-line-box); }
.sx-track__node { position: relative; z-index: 1; flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--sx-raised); box-shadow: inset 0 0 0 1.5px var(--sx-line-field); font-size: var(--sx-size-label); color: var(--sx-muted);
  font-variant-numeric: tabular-nums; }
.sx-track__step--done .sx-track__node { background: var(--sx-mark); box-shadow: none; color: var(--sx-mark-ink); }
.sx-track__step--current .sx-track__node { box-shadow: inset 0 0 0 2px var(--sx-accent); color: var(--sx-text); font-weight: var(--sx-weight-medium); }
.sx-track__step--folded .sx-track__node { box-shadow: none; border: 1.5px dashed var(--sx-line-field); }
/* A stage name wraps on whole words only (Thai by the browser's word breaker, helped by the zero-width spaces its
   names carry), to as many lines as it needs; never inside a word. */
.sx-track__name { font-size: var(--sx-size-label); line-height: 1.3; color: var(--sx-muted); overflow-wrap: normal; }
.sx-track__step--done .sx-track__name { color: var(--sx-text-2); }
.sx-track__step--current .sx-track__name { color: var(--sx-text); font-weight: var(--sx-weight-medium); }
:lang(th) .sx-track__name { line-height: var(--sx-leading-tight); }
/* Row 3: the parts each gate locks, under that gate, so the track reads left to right as one flow. */
.sx-track__parts { grid-row: 3; min-width: 0; display: flex; flex-direction: column; gap: var(--sx-space-2); margin: 0 var(--sx-space-1); padding: var(--sx-space-2);
  border-radius: 0 0 var(--sx-radius-control) var(--sx-radius-control); }
.sx-track__parts--current { background: var(--sx-selected); }
.sx-part { display: flex; flex-direction: column; gap: var(--sx-space-2); min-width: 0; padding: var(--sx-space-3); border-radius: var(--sx-radius-control);
  background: var(--sx-surface); border: 1px solid var(--sx-line-box); color: var(--sx-text-2) !important; font-size: var(--sx-size-label); text-decoration: none; }
.sx-part__name { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sx-space-2); font-size: var(--sx-size-ui); font-weight: var(--sx-weight-medium); color: var(--sx-text); }
.sx-part__name small { font-size: var(--sx-size-label); font-weight: var(--sx-weight-regular); color: var(--sx-muted); }
.sx-part__line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-1) var(--sx-space-3); color: var(--sx-text-2); }
.sx-part__line .sx-icon { color: var(--sx-muted); }
.sx-part--ahead { flex-direction: row; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--sx-space-2); padding: var(--sx-space-2) var(--sx-space-3);
  background: transparent; border-style: dashed; border-color: var(--sx-line-control); }
.sx-part--ahead .sx-part__name { font-weight: var(--sx-weight-regular); color: var(--sx-text-2); }

/* ---------- Versions: each version of a piece, the current and the locked one marked ---------- */
.sx-versions { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--sx-space-1); }
.sx-version { display: inline-flex; align-items: center; justify-content: center; gap: var(--sx-space-1); min-width: 32px; min-height: 24px;
  padding: 0 var(--sx-space-2); border-radius: 6px; border: 1px solid var(--sx-line-control); font-size: var(--sx-size-label); color: var(--sx-text-2) !important;
  text-decoration: none; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sx-version:hover { background: var(--sx-selected); }
.sx-version[aria-current="true"] { border-color: var(--sx-accent); background: var(--sx-selected); color: var(--sx-text) !important; font-weight: var(--sx-weight-medium); }
.sx-version .sx-icon { width: 12px; height: 12px; }

/* ---------- The mark-up pattern: notes on a picture, a time and a line ---------- */
.sx-mark { flex: none; display: inline-flex; align-items: center; justify-content: center; width: var(--sx-mark-size); height: var(--sx-mark-size);
  border-radius: 50%; background: var(--sx-mark); color: var(--sx-mark-ink); box-shadow: 0 0 0 2px var(--sx-mark-ring);
  font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.sx-mark--flat { box-shadow: none; }
.sx-mark--sent { background: var(--sx-mark-ring); color: var(--sx-mark-ink); box-shadow: 0 0 0 2px var(--sx-mark); }
.sx-mark--done { background: var(--sx-raised); color: var(--sx-text-2); box-shadow: inset 0 0 0 1.5px var(--sx-line-field); }
.sx-mark--new { background: var(--sx-mark-ring); color: var(--sx-mark-ink); box-shadow: 0 0 0 2px var(--sx-mark), 0 0 0 6px var(--sx-mark-fill); }
.sx-markup { position: relative; }
.sx-markup > .sx-mark { position: absolute; transform: translate(-50%, -50%); z-index: 2; }
.sx-region { position: absolute; z-index: 1; border: 2px solid var(--sx-mark); border-radius: 4px; background: var(--sx-mark-fill);
  box-shadow: 0 0 0 1px var(--sx-mark-ring); }
.sx-region > .sx-mark { position: absolute; left: -13px; top: -13px; }
.sx-region--element { background: transparent; border-style: solid; }

.sx-notes { display: flex; flex-direction: column; min-height: 0; flex: 1; gap: var(--sx-space-3); }
.sx-notes__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sx-space-3); }
.sx-notes__head h2 { margin: 0; font-size: var(--sx-size-body); font-weight: var(--sx-weight-medium); }
/* The list scrolls, so it keeps 3px of room inside its edge, taken back by its margin: a ring drawn outside a card
   (the docked composer's edge, a focus outline) is never cut by the list's edge. */
.sx-notes__list { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: var(--sx-space-3); margin: -3px; padding: 3px; list-style: none; overflow: auto; }
/* The scroll cue: when notes run past the bottom of the panel, the list says how many are below. */
.sx-notes__more { position: sticky; bottom: 0; margin-top: auto; display: flex; justify-content: center; padding-top: var(--sx-space-6);
  background: linear-gradient(to bottom, transparent, var(--sx-panel) 55%); }
.sx-notes__foot { flex: none; display: flex; flex-direction: column; gap: var(--sx-space-2); padding-top: var(--sx-space-3); border-top: 1px solid var(--sx-line); }
.sx-note { display: flex; flex-direction: column; gap: var(--sx-space-2); padding: var(--sx-space-3) var(--sx-space-4); border-radius: var(--sx-radius-box);
  background: var(--sx-raised); border: 1px solid var(--sx-line); }
.sx-note[aria-current="true"] { border-color: var(--sx-accent); }
.sx-note__head { display: flex; align-items: center; gap: var(--sx-space-2); min-width: 0; }
.sx-note__where { min-width: 0; font-weight: var(--sx-weight-medium); } /* wraps, never cut: German and Thai places run longer */
.sx-note__when { margin-left: auto; flex: none; font-size: var(--sx-size-label); color: var(--sx-muted); white-space: nowrap; }
.sx-note__body { margin: 0; font-size: var(--sx-size-data); color: var(--sx-text); }
.sx-note__who { font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-note__foot { display: flex; align-items: flex-start; gap: var(--sx-space-2); padding-top: var(--sx-space-2); border-top: 1px solid var(--sx-line-row);
  font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-note__foot .sx-icon { margin-top: 2px; }
.sx-composer { position: absolute; z-index: 4; width: 320px; display: flex; flex-direction: column; gap: var(--sx-space-3); padding: var(--sx-space-4);
  border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-menu); }
.sx-composer--docked { position: static; width: auto; box-shadow: 0 0 0 1px var(--sx-accent); }
.sx-composer__head { display: flex; align-items: center; gap: var(--sx-space-2); }
.sx-composer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sx-space-3); }
.sx-composer__foot > .sx-actions { margin-left: auto; } /* the buttons take their own line before the words break up */

/* ---------- A document: text set as numbered lines, so a note can sit on a line ---------- */
.sx-doc { width: 100%; max-width: 820px; display: flex; flex-direction: column; gap: var(--sx-space-5); padding: var(--sx-space-6) var(--sx-space-8);
  border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-card); }
.sx-doc__head { display: flex; flex-direction: column; gap: var(--sx-space-2); padding-bottom: var(--sx-space-4); border-bottom: 1px solid var(--sx-line); }
.sx-doc__section { margin: var(--sx-space-2) 0 0; font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); letter-spacing: var(--sx-tracking-caps);
  text-transform: uppercase; color: var(--sx-muted); }
.sx-lines { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.sx-line { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; column-gap: var(--sx-space-3); align-items: start;
  padding: var(--sx-space-1) var(--sx-space-2); border-radius: var(--sx-radius-control); }
.sx-line:hover { background: var(--sx-selected); }
.sx-line__id { display: flex; align-items: center; gap: 6px; min-height: 24px; font-size: var(--sx-size-label); color: var(--sx-muted); font-variant-numeric: tabular-nums; }
.sx-line__text { margin: 0; font-size: var(--sx-size-body); color: var(--sx-text); }
.sx-line__meta { display: flex; align-items: center; gap: var(--sx-space-2); min-height: 24px; }
.sx-line--noted { background: var(--sx-selected); box-shadow: inset 2px 0 0 var(--sx-mark); }
.sx-line--added { background: var(--sx-selected); box-shadow: inset 2px 0 0 var(--sx-accent); }
.sx-line--removed .sx-line__text { color: var(--sx-muted); text-decoration: line-through; }
.sx-line--quiet .sx-line__text { color: var(--sx-text-2); font-style: normal; }
.sx-change { display: inline-flex; align-items: center; gap: 4px; font-size: var(--sx-size-label); color: var(--sx-text-2); white-space: nowrap; }
.sx-line__fact { display: inline-flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 var(--sx-space-2); border-radius: var(--sx-radius-pill);
  border: 1px solid var(--sx-line-control); font-size: var(--sx-size-label); color: var(--sx-text-2) !important; text-decoration: none; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.sx-line__fact--direction { border-style: dashed; }
.sx-line__fact .sx-icon { width: 12px; height: 12px; }

/* ---------- Comparing two versions side by side ---------- */
.sx-compare { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
/* A picture's stage stays dark in both looks: the well or the compare that holds a still, an animatic or a cut under
   review carries data-theme="dark" and takes the dark look's well and words, so a picture is judged against the same
   surround whichever look the person chose. Words over the picture keep their dark band the same way. */
.sx-well[data-theme="dark"], .sx-compare[data-theme="dark"] { background: var(--sx-well); color: var(--sx-text); }
.sx-compare__side { min-width: 0; display: flex; flex-direction: column; gap: var(--sx-space-4); padding: var(--sx-space-5) var(--sx-space-6); overflow: auto; }
.sx-compare__side + .sx-compare__side { border-left: 1px solid var(--sx-line); }
.sx-compare__head { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-3); }

/* ---------- A strip of frames: the scenes of a film, or the pages of a piece ---------- */
.sx-filmstrip { flex: none; display: flex; gap: var(--sx-space-3); padding: var(--sx-space-3) var(--sx-space-4); overflow-x: auto;
  background: var(--sx-surface); border-top: 1px solid var(--sx-line); }
.sx-frame { flex: 1 0 64px; max-width: 104px; display: flex; flex-direction: column; gap: var(--sx-space-1); font-size: var(--sx-size-label); color: var(--sx-text-2) !important;
  text-decoration: none; }
.sx-frame__pic { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--sx-raised); border: 1px solid var(--sx-line-box); }
.sx-frame[aria-current="true"] { color: var(--sx-text) !important; font-weight: var(--sx-weight-medium); }
.sx-frame[aria-current="true"] .sx-frame__pic { border-color: var(--sx-accent); box-shadow: 0 0 0 1px var(--sx-accent); }
/* A frame's count of notes is a small pill with the note icon, never a numbered mark: a mark's number is always one note's number. */
.sx-frame__count { position: absolute; right: var(--sx-space-1); top: var(--sx-space-1); display: inline-flex; align-items: center; gap: 2px; padding: 0 var(--sx-space-1);
  height: 20px; border-radius: var(--sx-radius-pill); background: var(--sx-surface); color: var(--sx-text); font-size: var(--sx-size-label); font-weight: var(--sx-weight-medium); line-height: 1; font-variant-numeric: tabular-nums; box-shadow: 0 0 0 1px var(--sx-line-box); }
.sx-frame__count svg { width: 12px; height: 12px; }
.sx-frame__count--mine { background: var(--sx-mark); color: var(--sx-mark-ink); box-shadow: none; }
.sx-frame__line { display: flex; justify-content: space-between; gap: var(--sx-space-1); font-variant-numeric: tabular-nums; }

/* ---------- The player: a transport and a timeline of tracks ---------- */
.sx-transport { flex: none; display: flex; align-items: center; gap: var(--sx-space-3); padding: var(--sx-space-2) var(--sx-space-4);
  background: var(--sx-surface); border-top: 1px solid var(--sx-line); font-variant-numeric: tabular-nums; }
.sx-play { flex: none; width: 40px; height: 40px; border: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--sx-primary-bg); color: var(--sx-primary-text) !important; }
.sx-play .sx-icon { fill: currentColor; }
.sx-transport__time { font-weight: var(--sx-weight-medium); }
.sx-transport__time span { color: var(--sx-muted); font-weight: var(--sx-weight-regular); }
.sx-transport__end { margin-left: auto; display: flex; align-items: center; gap: var(--sx-space-2); }
.sx-timeline { flex: none; position: relative; display: grid; grid-template-columns: 104px minmax(0, 1fr); row-gap: 6px; padding: var(--sx-space-2) var(--sx-space-4) var(--sx-space-3);
  background: var(--sx-surface); border-top: 1px solid var(--sx-line); }
.sx-timeline__label { display: flex; align-items: center; padding-right: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-timeline__lane { position: relative; height: 32px; }
.sx-timeline__lane--marks { height: 28px; }
.sx-timeline__lane--ruler { height: 36px; border-bottom: 1px solid var(--sx-line); }
.sx-timeline__tick { position: absolute; bottom: 0; height: 6px; border-left: 1px solid var(--sx-line-control); }
.sx-timeline__tick span { position: absolute; z-index: 5; bottom: 6px; left: 3px; padding-right: var(--sx-space-1); background: var(--sx-surface);
  font-size: var(--sx-size-label); color: var(--sx-muted); white-space: nowrap; }
.sx-timeline__lane--marks .sx-mark { position: absolute; top: 2px; z-index: 4; transform: translateX(-50%); }
.sx-clip { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; gap: var(--sx-space-1); padding: 0 var(--sx-space-2); overflow: hidden;
  border-radius: 6px; border: 1px solid var(--sx-line-control); background: var(--sx-raised); font-size: var(--sx-size-label); color: var(--sx-text-2); white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.sx-clip--words { background: transparent; border-style: dashed; }
.sx-clip--voice { background: transparent; border-color: transparent; padding: 0; }
.sx-clip[aria-current="true"] { border-color: var(--sx-accent); color: var(--sx-text); }
.sx-wave { width: 100%; height: 100%; }
.sx-wave rect { fill: var(--sx-muted); }
.sx-playhead { position: absolute; top: var(--sx-space-2); bottom: var(--sx-space-3); width: 2px; margin-left: -1px; background: var(--sx-text); z-index: 3; pointer-events: none; }
.sx-playhead::before { content: ""; position: absolute; top: -2px; left: -5px; width: 12px; height: 12px; border-radius: 3px; background: var(--sx-text); }

/* ---------- The bottom sheet: the side panel on a phone ---------- */
.sx-sheet { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; flex-direction: column; max-height: 72%;
  border-radius: var(--sx-radius-card) var(--sx-radius-card) 0 0; background: var(--sx-panel);
  box-shadow: 0 0 0 1px var(--sx-line-box), 0 -12px 32px rgba(5, 6, 20, 0.35); }
.sx-sheet__grip { flex: none; width: 36px; height: 4px; margin: var(--sx-space-2) auto 0; border-radius: 2px; background: var(--sx-line-box); }
.sx-sheet__bar { flex: none; display: flex; align-items: center; gap: var(--sx-space-2); min-height: 48px; padding: 0 var(--sx-space-4); }
.sx-sheet__body { min-height: 0; overflow: auto; display: flex; flex-direction: column; gap: var(--sx-space-3); padding: 0 var(--sx-space-4) var(--sx-space-4); }

/* ---------- At 1920 pixels and wider: the work grows and a viewer may open a second panel ---------- */
/* A second panel (.sx-panel--second) holds what the work is judged against: the script beside the
   animatic, the scene beside its still, the evidence beside a change. It is hidden below 1920 pixels,
   where the work keeps the room. Strip frames grow so more of each still can be seen. */
.sx-panel--second { display: none; }
@media (min-width: 1920px) {
  .sx-body > .sx-panel { width: 400px; }
  .sx-panel--second { display: flex; }
  .sx-frame { max-width: 176px; }
}
