/* Content Studio's mock-ups: page layout only. Every colour, size, weight, corner, shadow and space is a
   Signal OSX variable; check-system-values.cjs must pass on this folder (halden-skin.css aside, which holds the
   example brand's colours). Parts any product could use are in the system, in
   system/signal-osx/tokens/signal-osx-making.css (version 0.5), not written here. */

html, body { margin: 0; min-height: 100%; }
.cs-search { width: 220px; }
.sx-app { position: relative; min-height: 100vh; }
.cs-filters .sx-select { width: auto; flex: 1 1 150px; }

/* A page's head: back link, title and facts on the left, actions on the right */
.cs-crumb { display: inline-flex; align-items: center; gap: var(--sx-space-2); color: var(--sx-text-2) !important; text-decoration: none; font-size: var(--sx-size-ui); min-height: 24px; }
.cs-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--sx-space-4); }
.cs-head__words { display: flex; flex-direction: column; gap: var(--sx-space-2); min-width: 0; }
.cs-head__title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-3); }
.cs-facts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-2) var(--sx-space-4); margin: 0; font-size: var(--sx-size-label); color: var(--sx-text-2); }
.cs-facts span { display: inline-flex; align-items: center; gap: var(--sx-space-1); }
.cs-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-2); }
.cs-row--between { justify-content: space-between; }
.cs-stack { display: flex; flex-direction: column; gap: var(--sx-space-3); min-width: 0; }
.cs-stack--loose { gap: var(--sx-space-5); }
.cs-stack > p, .cs-panel > p { margin: 0; }
.cs-section-label { margin: 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); }

/* Studio: the work on the left, the panel on the right */
.cs-studio { flex: 1; min-width: 0; display: flex; }
.cs-work { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--sx-space-6); padding: var(--sx-space-6) var(--sx-space-8) var(--sx-space-10); background: var(--sx-well); }
.cs-panel { gap: var(--sx-space-4); }
.cs-panel { padding-top: 0; }
.cs-pic { display: block; position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--sx-radius-control); background: var(--sx-well); }
.cs-pic > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.cs-pic__car { position: absolute; inset: 0; }

/* Sign-off: the formats on the left, the decision on the right; one column on a narrow window */
.cs-decide-page { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sx-space-8); align-items: start; }
/* v4 (studio OI-169): a set of formats sized to its column at every width. Each canvas takes a column of at least
   150 pixels (two to a row on a phone) and keeps the format's own proportion from the aspect ratio in its markup. */
.cs-set { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--sx-space-6) var(--sx-space-4); align-items: end; }
.cs-set .sx-canvas__art { width: 100%; height: auto; }
.cs-side { display: flex; flex-direction: column; gap: var(--sx-space-5); }
.cs-formats { display: flex; flex-direction: column; gap: var(--sx-space-2); }
.cs-formats .sx-check { padding: var(--sx-space-1) 0; }
.cs-box { display: flex; flex-direction: column; gap: var(--sx-space-3); padding: var(--sx-space-5); border-radius: var(--sx-radius-card); background: var(--sx-raised); box-shadow: var(--sx-shadow-card); }
.cs-box > h2 { margin: 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); }

/* The sign-off queue */
.cs-queue { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sx-space-4); }
.cs-queue .sx-card { gap: var(--sx-space-3); min-width: 0; }
.cs-queue .sx-card__title { text-decoration: none; }
.cs-queue__thumbs { min-height: 64px; display: flex; align-items: flex-end; }

/* A piece: the format large on the left, its record on the right */
.cs-piece { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--sx-space-8); align-items: start; }
.cs-dl { display: grid; grid-template-columns: minmax(140px, auto) minmax(0, 1fr); gap: var(--sx-space-2) var(--sx-space-5); margin: 0; font-size: var(--sx-size-data); }
.cs-dl dt { color: var(--sx-muted); font-size: var(--sx-size-label); padding-top: var(--sx-space-1); }
.cs-dl dd { margin: 0; color: var(--sx-text); overflow-wrap: anywhere; }

/* A tiny shape of a format in a table */
.cs-shape { display: inline-block; vertical-align: middle; box-sizing: border-box; border: 1px solid var(--sx-line-field); }
.cs-shape-cell { width: 56px; }

/* A board drawn inside a picture sheet for the index page */
.cs-index { display: flex; flex-direction: column; gap: var(--sx-space-8); }
.cs-index ul { margin: 0; padding-left: var(--sx-space-5); display: flex; flex-direction: column; gap: var(--sx-space-1); }

@media (max-width: 1023px) {
  .cs-decide-page, .cs-piece { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .sx-main { padding: var(--sx-space-5) var(--sx-space-4); }
  .cs-head { flex-direction: column; align-items: stretch; }
  .cs-head .sx-actions { flex-direction: column; align-items: stretch; }
  .sx-decide__options { grid-template-columns: minmax(0, 1fr); }
  .sx-decide__option { min-height: 0; }
  .cs-queue { grid-template-columns: minmax(0, 1fr); }
}

/* v3: P10 to P13 */
.cs-name { max-width: 420px; }
.cs-changes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sx-space-4); }
.cs-change .sx-actions { justify-content: flex-end; }
.cs-shapes { display: inline-flex; align-items: flex-end; gap: var(--sx-space-1); }
.cs-shape-cell:has(.cs-shapes) { width: 168px; }

/* v4: P18 Connections. The name is the row's heading; the state column holds the system's stage mark only. */
.cs-conn td:first-child { min-width: 160px; }
.cs-conn__who { display: flex; flex-direction: column; gap: var(--sx-space-1); }
.cs-conn__name { color: var(--sx-text); font-weight: var(--sx-weight-medium); }
.cs-conn td:last-child { white-space: nowrap; }
.cs-conn__fallback { display: flex; align-items: flex-start; gap: var(--sx-space-2); margin: 0; font-size: var(--sx-size-ui); color: var(--sx-text-2); }
.cs-conn__fallback .sx-icon { flex: none; margin-top: var(--sx-space-1); color: var(--sx-muted); }

/* v5: a platform's logo in a 32-pixel tile on the raised surface, the official file inside at up to 20 pixels
   (change request 213). The slot stands in for the file in the pack's pictures; the product puts the file there. */
.cs-conn__id { display: flex; align-items: center; gap: var(--sx-space-3); }
.cs-logo { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--sx-radius-control); background: var(--sx-raised); border: 1px solid var(--sx-line); }
.cs-logo > img, .cs-logo > svg { max-width: 20px; max-height: 20px; }
.cs-logo__slot { width: 20px; height: 20px; border-radius: var(--sx-radius-control); outline: 1px dashed var(--sx-line-field); outline-offset: -1px; }

/* v5: P14 Briefs and campaigns and P15 Brand knowledge (studio issues 226 and 227). */
.cs-split { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--sx-space-8); align-items: start; }
.cs-title-link { font-weight: var(--sx-weight-medium); color: var(--sx-text); }
.cs-list { margin: 0; padding-left: var(--sx-space-5); display: flex; flex-direction: column; gap: var(--sx-space-1); }
/* Scoped to P14 and P15, so the boxes of earlier pages keep their paragraph spacing (Codex reviewer, studio PR 231). */
.cs-split .cs-box > p, .cs-kinds .cs-box > p { margin: 0; }
/* A box that opens and closes: the brief's own words on P14, an inherited kind on P15. */
.cs-more > summary { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-3); cursor: pointer; list-style: none; min-height: 24px; }
.cs-more > summary::-webkit-details-marker { display: none; }
.cs-more > summary > span:first-child { 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); }
.cs-more > summary > span.cs-kind__head { font-size: var(--sx-size-ui); letter-spacing: normal; text-transform: none; color: var(--sx-text); }
.cs-more[open] > summary .sx-icon { transform: rotate(180deg); }
.cs-more:not([open]) { gap: 0; }
/* P15: the kinds of knowledge, with a list to jump to each beside them. */
.cs-kinds { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--sx-space-8); align-items: start; }
.cs-jump { position: sticky; top: var(--sx-space-5); display: flex; flex-direction: column; gap: var(--sx-space-2); }
.cs-jump ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.cs-jump a { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-2); min-height: 32px; padding: 0 var(--sx-space-2); border-radius: var(--sx-radius-control); color: var(--sx-text-2); text-decoration: none; font-size: var(--sx-size-ui); }
.cs-jump a:hover { background: var(--sx-surface); color: var(--sx-text); }
.cs-jump__mark { display: inline-flex; color: var(--sx-muted); }
.cs-kind__head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sx-space-3); margin: 0; letter-spacing: normal; text-transform: none; }
.cs-box > h2.cs-kind__head { font-size: var(--sx-size-ui); color: var(--sx-text); letter-spacing: normal; text-transform: none; }
.cs-kind .cs-kind__name { font-size: var(--sx-size-ui); font-weight: var(--sx-weight-medium); letter-spacing: normal; text-transform: none; color: var(--sx-text); }
/* A brand's colour, shown as data beside its name and code: the colour is the brand's record, not the page's. */
.cs-swatch-name { display: inline-flex; align-items: center; gap: var(--sx-space-2); }
.cs-swatch { flex: none; width: 16px; height: 16px; border-radius: var(--sx-radius-control); border: 1px solid var(--sx-line-field); }
@media (max-width: 1023px) {
  .cs-split, .cs-kinds { grid-template-columns: minmax(0, 1fr); }
  .cs-jump { position: static; }
}
@media (max-width: 767px) {
  .cs-split .cs-dl, .cs-kinds .cs-dl { grid-template-columns: minmax(0, 1fr); gap: var(--sx-space-1); }
  .cs-split .cs-dl dd, .cs-kinds .cs-dl dd { margin-bottom: var(--sx-space-2); }
}

/* P14: a campaign's plan versions, as a list in the side column (v5) */
.cs-versions { list-style: none; margin: 0; padding: 0; }
.cs-versions li { display: flex; flex-direction: column; gap: var(--sx-space-1); padding: var(--sx-space-3) 0; border-top: 1px solid var(--sx-line); }
.cs-versions li:first-child { border-top: 0; padding-top: 0; }
.cs-versions__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sx-space-3); }

/* Build pack v6: the pages that bring a plan or a copy deck in (P01, P02), and the sign-in pages (P21). */
.cs-form { display: flex; flex-direction: column; gap: var(--sx-space-5); max-width: 880px; }
.cs-form > .cs-crumb { align-self: flex-start; }
.cs-pair { display: grid; grid-template-columns: minmax(0, 1fr) 200px; gap: var(--sx-space-4); align-items: start; }
.cs-drops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sx-space-3); }
.cs-drop { min-height: 0; gap: var(--sx-space-1); }
.cs-box .cs-drop > p { margin: 0; }
.cs-stack--tight { gap: var(--sx-space-2); }
.cs-centre { text-align: center; }
.sx-message__text .cs-list { margin: var(--sx-space-2) 0 0; }
@media (max-width: 767px) {
  .cs-pair, .cs-drops { grid-template-columns: minmax(0, 1fr); }
}
/* v7: P17 People and roles, P19 Workspace settings and P20 First set-up, as the AI Asset Store draws its own, on the
   system's variables only. */
.cs-person { display: flex; align-items: center; gap: var(--sx-space-3); min-width: 0; }
.cs-measure { max-width: 72ch; margin: 0; }
.cs-rolerow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: var(--sx-space-3); }
.cs-start { align-self: flex-start; }
.cs-setup { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: var(--sx-space-3); }
.cs-setup__step { flex-direction: row; align-items: center; gap: var(--sx-space-5); }
.cs-setup__step > .cs-stack { flex: 1 1 auto; }
.cs-setup__step .sx-title { display: flex; align-items: center; gap: var(--sx-space-2); margin: 0; }
.cs-setup__step p { margin: 0; }
.cs-setup__n { flex: none; width: 32px; height: 32px; border-radius: var(--sx-radius-pill); display: flex; align-items: center; justify-content: center;
  background: var(--sx-selected); color: var(--sx-text); font-weight: var(--sx-weight-medium); }
@media (max-width: 767px) { .cs-setup__step { flex-direction: column; align-items: stretch; } .cs-rolerow { grid-template-columns: minmax(0, 1fr) auto; } }
.cs-filters .cs-search { width: auto; flex: 2 1 280px; }
