/* Signal OSX design system: a product's own views, and deciding in words, 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), on the
   operator's approval of the three review room changes the surfaces map proposed (DEC-FILM-20261116-02). Rules:
   ../specs/views.md. The eighth stylesheet: link it after signal-osx-review.css. It reads the system's variables
   and adds no value of its own.

   Two parts:
   1. A view: a working page drawn without the product's header and left menu, so the same page runs inside an
      assistant, beside the chat or full screen, from 320 pixels to the whole screen. The view does not know
      whether it sits beside the chat or fills the screen (both report the same mode), so it lays itself out by
      the width it is given. The layer that takes the assistant's own colours and font (owned by the assistant
      card, DEC-SYS-20261116-04) goes on top of this unchanged.
   2. Deciding in words: the approved decision panel (version 0.5), extended so the same part serves a gate page, a
      view and the card that shows the person's words back for their own click. */

/* ---------- 1. A view: a working page with no header and no left menu ---------- */

/* The assistant tells the view how much of its edge it covers (its message box, its bar on a phone). The
   assistant card's layer sets these two from those numbers; a view's own controls stay inside them. */
/* A page that reads down (a film, notes, a gate) scrolls as one, its bar staying at the top; a viewer is one screen
   high, as on the web. */
.sx-view .sx-app { min-height: 100vh; box-sizing: border-box; padding-top: var(--sx-safe-top, 0); padding-bottom: var(--sx-safe-bottom, 0); }

/* The view's own bar, in place of the header: back to the film, what is open and its version, the page's own
   controls, and the way to the same place in the review room on the web. No account, no search, no bell: the
   assistant has those. */
.sx-viewbar { position: sticky; top: 0; z-index: 5; flex: none; display: flex; align-items: center; gap: var(--sx-space-2); min-height: 48px; padding: 0 var(--sx-space-3) 0 var(--sx-space-2);
  border-bottom: 1px solid var(--sx-line); background: var(--sx-bg); }
.sx-viewbar__back { flex: none; }
.sx-viewbar__what { display: flex; align-items: center; gap: var(--sx-space-2); min-width: 0; }
.sx-viewbar__what > .sx-icon { flex: none; color: var(--sx-muted); }
.sx-viewbar__name { flex: 0 1 auto; min-width: 0; white-space: nowrap; font-weight: var(--sx-weight-medium); color: var(--sx-text); }
.sx-viewbar__what .sx-tag { flex: none; }
.sx-viewbar__film { flex: 0 100 auto; min-width: 0; white-space: nowrap; font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-viewbar__end { margin-left: auto; flex: none; display: flex; align-items: center; gap: var(--sx-space-2); }
.sx-viewbar__end .sx-seg button { white-space: nowrap; }
.sx-viewbar__web { white-space: nowrap; text-decoration: none; }

/* A side bar that folds away: the notes, the facts, the scene. Its head carries the fold button; the bar's own
   button opens it again. */
.sx-fold-button { flex: none; margin-left: auto; }
.sx-view .sx-notes__head { justify-content: flex-start; }
.sx-viewbar__open-panel { display: none; }

/* Narrower than 1024 pixels (beside the chat on a large screen, or full screen on a small one): the film's name and
   the words beside each control fold away, and the notes side bar starts folded so the work keeps the width; the
   bar's button opens it over the work. Narrower than 768 the page takes its one-column layout, as on a phone, with
   the notes as a sheet from the bottom. */
@media (max-width: 1023px) {
  .sx-viewbar__film, .sx-viewbar__words { display: none; }
  .sx-viewbar__open-panel { display: inline-flex; }
  .sx-view .sx-body > .sx-panel:not(.sx-panel--second) { display: none; }
}

/* ---------- 2. Deciding in words: the decision panel of version 0.5, extended ---------- */

/* Version 0.8. The system has one part for deciding: the decision panel (.sx-decide in
   tokens/signal-osx-making.css, approved in version 0.5 with Content Studio, DEC-SYS-20261116-01). The review room
   first drew a second part for the same job; it is withdrawn, and what it did is added here to the approved panel.
   Every rule below adds a modifier or an element the panel did not have; none changes a 0.5 rule, so every page
   built on 0.5 looks exactly as it did.

   .sx-decide--words: the person's own words are the decision (a Film Platform gate, the sign-off tool). The
   options are the panel's three option buttons; the words field is always there and a choice without words is not
   a decision. Its states are modifiers beside --words: --confirm (words typed elsewhere shown back for the
   person's own click), --recorded (who, the words, when and where, and revoke), --waive (a failed check accepted in
   words), --closed (nothing open), --reviewer (an operator decides), --replaced (an older copy, buttons off).
   Revoking opens the system's pop-up window holding the panel's field and foot. .sx-decide--in-card: inside an
   assistant's card, which owns the frame and the buttons. The three outcome words are the product's own (decision
   D4 of the review room plan): the part never writes them. */
.sx-decide--words { container: sx-decide / inline-size; }
.sx-decide__words { display: flex; flex-direction: column; gap: var(--sx-space-3); min-width: 0; }
.sx-decide__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--sx-space-3); }
.sx-decide__foot .sx-decide__who { color: var(--sx-muted); }
.sx-decide__foot .sx-decide__who > .sx-icon { flex: none; }
.sx-decide__foot .sx-actions { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

/* The words as they will be recorded, or as they were: the outcome, then the person's own words, quoted. */
.sx-decide__outcome { margin: 0; font-size: var(--sx-size-title); font-weight: var(--sx-weight-medium); color: var(--sx-text); }
.sx-decide__quote { margin: 0; padding: var(--sx-space-3) var(--sx-space-4); border-left: 2px solid var(--sx-accent);
  border-radius: 0 var(--sx-radius-control) var(--sx-radius-control) 0; background: var(--sx-surface); color: var(--sx-text); font-size: var(--sx-size-body); }
.sx-decide__source { margin: 0; font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-decide__record { display: flex; align-items: flex-start; gap: var(--sx-space-3); }
.sx-decide__record > div { flex: 1; display: flex; flex-direction: column; gap: var(--sx-space-2); min-width: 0; }

/* Closed, and the reviewer's view: nothing to decide here, so the panel is quiet. */
.sx-decide--closed, .sx-decide--reviewer { background: transparent; box-shadow: none; border: 1px dashed var(--sx-line-box); }

/* An older copy of a confirmation that a newer one has replaced: the words stay readable, the buttons are gone,
   and one line says what replaced it. Nothing can be recorded from it. */
.sx-decide--replaced .sx-decide__quote { border-left-color: var(--sx-line-control); color: var(--sx-text-2); }
.sx-decide--replaced .sx-decide__outcome { color: var(--sx-text-2); }

/* Inside an assistant's card: the card is the frame and holds the buttons (its own rule: at most two, bottom
   left, the main one first), so the panel drops its own surface. */
.sx-decide--in-card { padding: 0; background: none; box-shadow: none; border-radius: 0; }

/* Narrow (a phone, the panel beside the chat, a card): the options stack, each button takes the full width, the
   main one last, nearest the thumb, and the line saying who decides sits above them. */
@container sx-decide (max-width: 479px) {
  .sx-decide--words .sx-decide__options { grid-template-columns: minmax(0, 1fr); }
  .sx-decide--words .sx-decide__option { min-height: 0; }
  .sx-decide--words .sx-decide__foot { flex-direction: column; align-items: stretch; }
  .sx-decide--words .sx-decide__foot .sx-actions { margin-left: 0; flex-direction: column; align-items: stretch; }
  .sx-decide--words .sx-decide__foot .sx-button { justify-content: center; }
}

/* ---------- 3. Found inside the assistant (the cards order's stand-in Claude, 16 November 2026) ---------- */

/* Inside an assistant (the host layer on), the assistant's own bar closes the view and opens it elsewhere, so the
   view drops its own way back; "Open in the review room" stays, in words where there is room. */
.sx-host .sx-viewbar__back { display: none; }
.sx-host .sx-viewbar { padding-left: var(--sx-space-4); }

/* A status line never cuts a word, in a view or on the web page. Its items are short phrases. As it narrows, the
   line drops whole items from the middle, always keeping its first item and its end; if what is left is still too
   long, the first item runs onto a second line rather than being cut. The widths are the status line's own, so the
   rule holds in any frame. */
.sx-statusbar { container-type: inline-size; padding-block: var(--sx-space-1); }
.sx-statusbar > span { flex: none; }
.sx-statusbar > span:first-child { flex: 0 1 auto; min-width: 0; white-space: normal; }
@container (max-width: 1099px) { .sx-statusbar > span:nth-child(n+3):not(.sx-statusbar__end) { display: none; } }
@container (max-width: 759px) { .sx-statusbar > span:nth-child(2):not(.sx-statusbar__end) { display: none; } }

/* A tool in a rail is named on screen when it is pointed at or reached by keyboard, as well as to a screen reader
   (its aria-label), and the chosen tool is marked by a bar at the rail's edge as well as by its colour. For every
   page with a rail, in a view or not. */
.sx-rail .sx-tool { position: relative; }
.sx-rail .sx-tool[aria-pressed="true"]::before { content: ""; position: absolute; left: calc(-1 * var(--sx-space-2)); top: var(--sx-space-2); bottom: var(--sx-space-2);
  width: var(--sx-space-1); border-radius: 0 var(--sx-radius-pill) var(--sx-radius-pill) 0; background: var(--sx-text); }
.sx-rail .sx-tool:hover::after, .sx-rail .sx-tool:focus-visible::after { content: attr(aria-label); position: absolute; z-index: 20; left: calc(100% + var(--sx-space-3)); top: 50%;
  transform: translateY(-50%); padding: var(--sx-space-1) var(--sx-space-2); border-radius: var(--sx-radius-control); background: var(--sx-raised); box-shadow: var(--sx-shadow-menu);
  color: var(--sx-text); font-size: var(--sx-size-label); font-weight: var(--sx-weight-regular); white-space: nowrap; pointer-events: none; }

/* Words are never cut inside a word anywhere in a view (the Design Director at 320 pixels, 16 November 2026). A group
   marked sx-whole shows each of its items whole or not at all: an item that does not fit moves to a second line, which
   the group's one-line height hides. The zero-width first item is what lets even the first real item move. The view
   bar's name and film, a clip's label on a timeline, a one-column view's title and a sheet's caption use it; the film
   name gives way before the name. */
.sx-whole, .sx-viewbar__name, .sx-viewbar__film { display: flex; flex-wrap: wrap; align-items: center; align-content: flex-start; column-gap: 0;
  height: 1lh; overflow: hidden; }
.sx-clip.sx-whole { height: auto; }
.sx-whole::before, .sx-viewbar__name::before, .sx-viewbar__film::before { content: ""; width: 0; height: 100%; }
.sx-whole > * { flex: none; white-space: nowrap; }
.sx-whole > * + * { margin-left: var(--sx-space-1); }
.sx-whole--dots > * + *::before { content: "·"; margin-right: var(--sx-space-1); }

/* A row that scrolls sideways says so, on every page: while there is more to its right (the row's scroll position, set
   as sx-hscroll--more by the page), the row's edge fades and a round button at the edge shows the way; it scrolls the
   row by a screen. A row with nothing more to show has neither. */
.sx-hscroll { position: relative; min-width: 0; }
.sx-hscroll__more { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: var(--sx-target, var(--sx-control-height));
  height: var(--sx-target, var(--sx-control-height)); display: none; align-items: center; justify-content: center; padding: 0;
  border-radius: var(--sx-radius-pill); border: 1px solid var(--sx-line-control); background: var(--sx-raised); color: var(--sx-text);
  box-shadow: var(--sx-shadow-menu); cursor: pointer; }
.sx-hscroll--more > .sx-hscroll__more { display: inline-flex; }
.sx-hscroll--more > :first-child { mask-image: linear-gradient(to right, black calc(100% - var(--sx-space-10) * 2), transparent); }

/* A clip's label is never crossed by the playhead: clips with words sit above the playhead's line, which shows in the
   ruler, the notes lane, the sound lanes and the gaps between clips; the clip under it is outlined as current. */
.sx-clip.sx-whole { z-index: 4; }
.sx-clip--words.sx-whole { background: var(--sx-surface); }

/* A side panel's heading in a view never breaks: the caption (a count, a version range) takes its own line under the
   heading, and the heading shares its line only with the fold button. */
.sx-view .sx-notes__head { flex-wrap: wrap; row-gap: var(--sx-space-1); }
.sx-view .sx-notes__head > h2 { white-space: nowrap; }
.sx-view .sx-notes__head > .sx-caption { order: 1; flex-basis: 100%; }
