/* Signal OSX design system: the parts for making and signing off work, and the lockup's violet by class.
   Approved by the operator as version 0.5 on 16 November 2026 (DEC-SYS-20261116-01), with the Content Studio
   pages that first used them (DEC-CF-20261116-03). Link it fourth, after signal-osx.css,
   signal-osx-components.css and signal-osx-data-and-forms.css. It adds no value of its own: every colour, type
   size, weight, corner, shadow and space is a --sx- variable. Plain numbers are sizes of single parts only (a
   mark's diameter, a thumbnail's width), as in the other stylesheets. Rules: ../specs/making.md */

/* ---------- 0. The lockup's violet by class, so a product page carries no colour of its own ----------
   The lockup markup in specs/markup.md writes fill="#5A81FA" on its third polygon, which check-system-values.cjs
   reports on any product page (OI-105). With this sheet linked, the same polygon takes class="sx-lockup__accent"
   instead. The rule belongs with the frame, in signal-osx-components.css, and moves there at that sheet's next
   change (OI-151). */
.sx-lockup .sx-lockup__accent { fill: var(--sx-accent); }

/* ---------- 1. The format canvas: one format at its true proportion, with its safe area and keep-clear zones ---------- */
.sx-canvas { margin: 0; display: flex; flex-direction: column; gap: var(--sx-space-2); min-width: 0; }
.sx-canvas__art { position: relative; display: block; overflow: hidden; background: var(--sx-well); margin: 0; padding: 0; border: 0; cursor: pointer;
  box-shadow: 0 0 0 1px var(--sx-line-box); border-radius: 0; }
.sx-canvas__art > svg, .sx-canvas__art > img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.sx-canvas__zone { position: absolute; pointer-events: none; }
.sx-canvas__zone--safe { outline: 1.5px dashed var(--sx-accent); outline-offset: -1px; }
.sx-canvas__zone--keep { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--sx-scrim) 6px 9px);
  outline: 1.5px solid var(--sx-attention-mark); outline-offset: -1px; }
.sx-canvas__cap { display: flex; flex-direction: column; gap: var(--sx-space-1); min-width: 0; }
.sx-canvas__name { font-size: var(--sx-size-ui); font-weight: var(--sx-weight-medium); color: var(--sx-text); }
.sx-canvas__size { font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-canvas__state { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); }
/* Chosen: the canvas whose checks and copy the panel is showing */
.sx-canvas--chosen .sx-canvas__art { box-shadow: 0 0 0 2px var(--sx-accent); }
/* A card chosen for a decision taken on several at once */
.sx-card--chosen { box-shadow: 0 0 0 2px var(--sx-accent); }
/* Being made: the canvas holds its shape and says so; no spinner over the work */
.sx-canvas--making .sx-canvas__art { background: repeating-linear-gradient(135deg, var(--sx-well) 0 10px, var(--sx-panel) 10px 20px); }
.sx-canvas__wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: var(--sx-space-2);
  font-size: var(--sx-size-label); color: var(--sx-text-2); text-align: center; padding: var(--sx-space-2); }
/* Failed: the last good version stays, dimmed, with a red outline; the reason is in the caption */
.sx-canvas--failed .sx-canvas__art { box-shadow: 0 0 0 1.5px var(--sx-danger); }
.sx-canvas--failed .sx-canvas__art > svg { opacity: 0.4; }
/* Skipped on purpose: an outline only, and the stated reason */
.sx-canvas--skipped .sx-canvas__art { background: transparent; box-shadow: none; outline: 1.5px dashed var(--sx-line-field); outline-offset: -1px; }
/* The key under a canvas that shows zones */
.sx-zone-key { display: flex; flex-wrap: wrap; gap: var(--sx-space-4); margin: 0; padding: 0; list-style: none; font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-zone-key li { display: inline-flex; align-items: center; gap: var(--sx-space-2); }
.sx-zone-key__mark { width: 16px; height: 12px; display: inline-block; }
.sx-zone-key__mark--safe { outline: 1.5px dashed var(--sx-accent); outline-offset: -1px; }
.sx-zone-key__mark--keep { outline: 1.5px solid var(--sx-attention-mark); outline-offset: -1px;
  background: repeating-linear-gradient(135deg, transparent 0 3px, var(--sx-scrim) 3px 5px); }
/* A board of canvases: every format of a line together, bottoms aligned */
.sx-board { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sx-space-8) var(--sx-space-6); }

/* ---------- 2. The check list: each check passed, advice, held or blocking, with its reason ---------- */
.sx-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sx-checklist__item { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: var(--sx-space-1) var(--sx-space-3);
  padding: var(--sx-space-2) 0; border-bottom: 1px solid var(--sx-line-row); font-size: var(--sx-size-ui); }
.sx-checklist__item:last-child { border-bottom: 0; }
.sx-checklist__mark { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.sx-checklist__mark svg { width: 12px; height: 12px; }
.sx-checklist__name { color: var(--sx-text); }
.sx-checklist__why { grid-column: 2; font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-checklist__item--pass .sx-checklist__mark { color: var(--sx-accent); box-shadow: inset 0 0 0 1.5px var(--sx-accent); }
.sx-checklist__item--pass .sx-checklist__name { color: var(--sx-text-2); }
.sx-checklist__item--advice .sx-checklist__mark { color: var(--sx-muted); box-shadow: inset 0 0 0 1.5px var(--sx-line-field); }
.sx-checklist__item--hold .sx-checklist__mark { color: var(--sx-attention-text); box-shadow: inset 0 0 0 1.5px var(--sx-attention-mark); }
.sx-checklist__item--hold .sx-checklist__name { color: var(--sx-attention-text); font-weight: var(--sx-weight-medium); }
.sx-checklist__item--block .sx-checklist__mark { color: var(--sx-danger-on); background: var(--sx-danger); }
.sx-checklist__item--block .sx-checklist__name { color: var(--sx-danger); font-weight: var(--sx-weight-medium); }
/* One line summing up a piece's checks, beside a canvas or in a queue */
.sx-checksum { display: inline-flex; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-checksum__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1.5px var(--sx-accent); }
.sx-checksum--pass .sx-checksum__dot { background: var(--sx-accent); }
.sx-checksum--hold { color: var(--sx-attention-text); }
.sx-checksum--hold .sx-checksum__dot { box-shadow: inset 0 0 0 1.5px var(--sx-attention-mark); }
.sx-checksum--block { color: var(--sx-danger); }
.sx-checksum--block .sx-checksum__dot { background: var(--sx-danger); box-shadow: none; }

/* ---------- 3. The decision panel: approve, hold or drop, with a reason, and the trail ---------- */
.sx-decide { display: flex; flex-direction: column; gap: var(--sx-space-4); padding: var(--sx-space-5); border-radius: var(--sx-radius-card);
  background: var(--sx-raised); box-shadow: var(--sx-shadow-card); }
.sx-decide__head { display: flex; flex-direction: column; gap: var(--sx-space-1); }
.sx-decide__options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sx-space-2); }
.sx-decide__option { display: flex; flex-direction: column; align-items: flex-start; gap: var(--sx-space-1); min-height: 64px;
  padding: var(--sx-space-3); border: 1px solid var(--sx-line-control); border-radius: var(--sx-radius-control); background: transparent;
  text-align: left; color: var(--sx-text) !important; min-width: 0; overflow-wrap: break-word; }
.sx-decide__option > span { hyphens: auto; }
.sx-decide__option strong { font-weight: var(--sx-weight-medium); display: inline-flex; align-items: center; gap: var(--sx-space-2); }
.sx-decide__option span { font-size: var(--sx-size-label); color: var(--sx-text-2); font-weight: var(--sx-weight-regular); }
.sx-decide__option[aria-pressed="true"] { border-color: var(--sx-primary-bg); box-shadow: inset 0 0 0 1px var(--sx-primary-bg); background: var(--sx-selected); }
.sx-decide__option[disabled] { opacity: 0.5; cursor: not-allowed; }
/* Why a choice is not available: always in words, next to the choice */
.sx-decide__why { display: flex; align-items: flex-start; gap: var(--sx-space-2); margin: 0; font-size: var(--sx-size-label); color: var(--sx-danger); }
.sx-decide__why svg { flex: none; margin-top: 1px; }
.sx-decide__who { display: flex; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-decide__done { display: flex; flex-direction: column; gap: var(--sx-space-2); }
/* The trail: every decision and change, newest last, each with who, when and from where */
.sx-trail { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.sx-trail__item { position: relative; display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: var(--sx-space-3); padding-bottom: var(--sx-space-4); }
.sx-trail__item::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 1px; background: var(--sx-line-box); }
.sx-trail__item:last-child { padding-bottom: 0; }
.sx-trail__item:last-child::before { display: none; }
.sx-trail__dot { width: 9px; height: 9px; margin: 5px 0 0 3px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--sx-line-field); background: var(--sx-panel); }
.sx-trail__item--decision .sx-trail__dot { background: var(--sx-accent); box-shadow: none; }
.sx-trail__item--back .sx-trail__dot { box-shadow: inset 0 0 0 1.5px var(--sx-attention-mark); }
.sx-trail__what { font-size: var(--sx-size-ui); color: var(--sx-text); }
.sx-trail__meta { display: block; font-size: var(--sx-size-label); color: var(--sx-muted); }

/* ---------- 4. A copy field: one fixed field, its limit, its version and where its words came from ---------- */
.sx-copy { display: flex; flex-direction: column; gap: var(--sx-space-2); }
.sx-copy__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sx-space-2); }
.sx-copy__head .sx-field__label { font-weight: var(--sx-weight-medium); }
.sx-copy__limits { font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-copy__over { color: var(--sx-danger); font-weight: var(--sx-weight-medium); }
.sx-copy__source { display: inline-flex; align-items: center; gap: var(--sx-space-1); font-size: var(--sx-size-label); color: var(--sx-muted); }

/* ---------- 5. The lineage line: what a piece was made from, each with its version ---------- */
.sx-lineage { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: stretch; gap: var(--sx-space-2); }
.sx-lineage__step { display: flex; flex-direction: column; gap: var(--sx-space-1); min-width: 0; padding: var(--sx-space-3);
  border-radius: var(--sx-radius-box); background: var(--sx-raised); box-shadow: 0 0 0 1px var(--sx-line-box); }
.sx-lineage__kind { display: inline-flex; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-lineage__name { font-size: var(--sx-size-ui); font-weight: var(--sx-weight-medium); color: var(--sx-text); overflow-wrap: anywhere; }
.sx-lineage__ver { font-size: var(--sx-size-label); color: var(--sx-text-2); }
.sx-lineage__join { display: flex; align-items: center; color: var(--sx-muted); }

/* ---------- 6. The cross-product mark: something waiting in another Signal OSX product ---------- */
.sx-xmark { display: flex; align-items: flex-start; gap: var(--sx-space-3); padding: var(--sx-space-3) var(--sx-space-4); border-radius: var(--sx-radius-box);
  background: var(--sx-raised); box-shadow: 0 0 0 1px var(--sx-line-box); font-size: var(--sx-size-ui); }
.sx-xmark__product { display: inline-flex; align-items: center; gap: var(--sx-space-1); 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-xmark__text { display: flex; flex-direction: column; gap: var(--sx-space-1); min-width: 0; flex: 1; }
.sx-xmark__text p { margin: 0; }
.sx-xmark a { display: inline-flex; align-items: center; gap: var(--sx-space-1); font-weight: var(--sx-weight-medium); }
.sx-xmark--waiting { box-shadow: inset 3px 0 0 var(--sx-attention-mark), 0 0 0 1px var(--sx-line-box); }

/* ---------- 7. Shared with the AI Asset Store: the may-use mark and the picker ---------- */
.sx-mayuse { display: inline-flex; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-text); white-space: nowrap; }
.sx-mayuse::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 0; }
.sx-mayuse--usable::before { background: var(--sx-accent); }
.sx-mayuse--limits::before { background: linear-gradient(90deg, var(--sx-accent) 50%, transparent 50%); box-shadow: inset 0 0 0 1.5px var(--sx-accent); }
.sx-mayuse--ending { color: var(--sx-attention-text); }
.sx-mayuse--ending::before { box-shadow: inset 0 0 0 1.5px var(--sx-attention-mark); }
.sx-mayuse--ended, .sx-mayuse--blocked { color: var(--sx-danger); }
.sx-mayuse--ended::before, .sx-mayuse--blocked::before { background: var(--sx-danger); }
.sx-mayuse--notyet { color: var(--sx-text-2); }
.sx-mayuse--notyet::before, .sx-mayuse--retired::before { box-shadow: inset 0 0 0 1.5px var(--sx-line-field); }
.sx-mayuse--retired { color: var(--sx-muted); }
/* The picker: the store's Library in miniature, inside another product's page */
.sx-assetpick { width: 880px; max-width: calc(100% - 32px); max-height: calc(100% - 48px); display: flex; flex-direction: column; gap: var(--sx-space-4);
  padding: var(--sx-space-6); border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-menu); overflow: hidden; }
.sx-assetpick__from { display: inline-flex; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-assetpick__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sx-space-4); }
.sx-assetpick__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-4); padding-top: var(--sx-space-4); border-top: 1px solid var(--sx-line); }
.sx-asset { display: flex; flex-direction: column; gap: var(--sx-space-2); padding: var(--sx-space-2); border: 0; border-radius: var(--sx-radius-box);
  background: transparent; text-align: left; color: var(--sx-text) !important; min-width: 0; }
.sx-asset__pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--sx-radius-control); background: var(--sx-well); }
.sx-asset__pic > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sx-asset__name { font-size: var(--sx-size-ui); font-weight: var(--sx-weight-medium); overflow-wrap: anywhere; }
.sx-asset__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-2); font-size: var(--sx-size-label); color: var(--sx-muted); }
.sx-asset[aria-pressed="true"] { background: var(--sx-selected); box-shadow: inset 0 0 0 2px var(--sx-accent); }
.sx-asset[aria-disabled="true"] { cursor: not-allowed; }
.sx-asset[aria-disabled="true"] .sx-asset__pic { opacity: 0.4; }
.sx-asset__why { font-size: var(--sx-size-label); color: var(--sx-text-2); }

/* ---------- 8. Truth labels: what a person must not mistake ---------- */
/* Example content: on every page of made-up data, and on any piece that can never be approved for real use */
.sx-truth { display: inline-flex; align-items: center; gap: var(--sx-space-2); min-height: 24px; padding: 0 var(--sx-space-2);
  border-radius: var(--sx-radius-pill); box-shadow: inset 0 0 0 1px var(--sx-line-field); font-size: var(--sx-size-label); color: var(--sx-text-2); white-space: nowrap; }
.sx-truth svg { color: var(--sx-muted); }
/* A tag in the header saying a word there is proposed, not ruled */
.sx-tag--unconfirmed { box-shadow: inset 0 0 0 1px var(--sx-attention-mark); background: transparent; color: var(--sx-attention-text); }

/* ---------- 9. Thumbnails of a set, in a queue or a list ---------- */
.sx-thumbs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--sx-space-2); max-width: 100%; min-width: 0; }
.sx-thumbs__one { position: relative; display: block; overflow: hidden; border-radius: 0; background: var(--sx-well); box-shadow: 0 0 0 1px var(--sx-line-box); }
.sx-thumbs__one > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.sx-thumbs__more { font-size: var(--sx-size-label); color: var(--sx-muted); }
