/* The Workspace (/architecture/workspace/): page-only styles. The shell is
   layer.css. Acts: hero (shell) · the room (reveal, light) · delegation you
   can watch (pin, the peak, dark, the signature: an openable task record
   anchored on a view-only Squid-to-Squid conversation, with a phone that
   takes the approval) · the roster (pan, light: pin, sections, hide,
   duplicate) · reach (flow, dark: per-Squid notifications, the rest of how
   it holds) · the other nine and the close (shell). */

/* ---------------------------------------------------------------- shared: a plain @mention */
.at { color: var(--lc); font-weight: 600; }

/* ---------------------------------------------------------------- 1 · the room (reveal) */
.wkr__fig { margin: 0; }
.wkr__fig .win { box-shadow: 0 1px 2px rgb(26 16 51 / .05), 0 6px 8px -4px rgb(26 16 51 / .06); }
.wkr__thread { list-style: none; margin: 0; padding: 18px 18px 20px; display: grid; gap: 14px; }
.wkr__m { display: flex; gap: 11px; align-items: flex-start; }
.wkr__m > img { width: 30px; height: 30px; flex: none; object-fit: cover; border-radius: 9px; box-shadow: inset 0 0 0 1.5px color-mix(in oklab, var(--c) 55%, transparent); }
.wkr__m .av { width: 30px; height: 30px; font-size: 12px; }
.wkr__m > div { min-width: 0; }
.wkr__n { margin: 0 0 3px; font-weight: 600; font-size: 13px; color: var(--sc-ink); }
.wkr__n span { color: var(--ink-4); font-weight: 500; margin-left: 6px; font-size: 11.5px; }
.wkr__m p:not(.wkr__n) { margin: 0; font-size: 14px; line-height: 1.55; color: var(--fg-body); }
.wkr__m .wkr__bub { display: inline-block; padding: 8px 12px; border-radius: 4px 12px 12px 12px; background: var(--tint); }
.wkr__copy .prose { margin-top: 20px; }
@media (max-width: 560px) { .wkr__thread { padding: 14px 14px 16px; gap: 11px; } }

/* ---------------------------------------------------------------- 2 · delegation you can watch (pin, the peak) */
.wkd__stage { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding: calc(var(--bar-h) + 20px) clamp(20px, 7vw, 120px) 28px; }
.wkd__lede { max-width: 46ch; }
.wkd__steps { list-style: none; margin: 26px 0 0; padding: 0; position: relative; min-height: 230px; }
.wkd__steps li { position: absolute; inset: 0 auto auto 0; max-width: 480px; opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .35s var(--ease), transform .45s var(--ease), visibility .35s; }
.wkd__steps li.on { opacity: 1; visibility: visible; transform: none; }
.wkd__k { margin: 0; font-size: 13px; font-weight: 600; color: var(--lh); letter-spacing: -0.005em; }
.wkd__t { margin: 8px 0 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(24px, 2.4vw, 34px); letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.wkd__steps li > p:not(.wkd__k) { margin: 12px 0 0; color: var(--fg-body); max-width: 42ch; line-height: 1.6; font-size: 15px; }

.wkd__frame { position: relative; }
.wkd__mock .win { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 18px 30px -18px rgb(0 0 0 / .7); }

.wkd__feed { list-style: none; margin: 0; padding: 16px 16px 4px; display: grid; gap: 11px; min-height: 118px; }
.wkd__msg { display: flex; gap: 10px; align-items: flex-start; animation: pop .4s var(--ease) both; }
.wkd__msg > img, .wkd__msg > .av { width: 26px; height: 26px; flex: none; object-fit: cover; border-radius: 8px; }
.wkd__msg .av { border-radius: 50%; font-size: 11px; }
.wkd__msg > div { min-width: 0; }
.wkd__n { margin: 0 0 2px; font-size: 12px; font-weight: 600; color: var(--sc-ink); }
.wkd__n span { color: var(--ink-4); font-weight: 500; margin-left: 5px; }
.wkd__msg p:not(.wkd__n):not(.wkd__quote) { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-body); }
.wkd__msg--h .wkd__bub { display: inline-block; padding: 8px 11px; border-radius: 4px 12px 12px 12px; background: #172335; border: 1px solid #22344d; color: #eef4ff; }
.wkd__quote { margin: 0 0 4px !important; font-size: 11.5px; color: var(--ink-4); font-weight: 500; }
@keyframes pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }

.wkd__card { margin: 0 16px 16px; padding: 14px 16px 16px; border-radius: 12px; border: 1px solid var(--line-2); background: #0b0d13; opacity: 0; max-height: 0; overflow: hidden; transition: opacity .4s var(--ease), max-height .5s var(--ease); }
.wkd__card.show { opacity: 1; max-height: 900px; }
.wkd__cardk { margin: 0; font-size: 11.5px; font-weight: 600; color: var(--lh); }
.wkd__cardt { margin: 6px 0 0; font-family: var(--sc-font-display); font-weight: 600; font-size: 17px; letter-spacing: -.015em; color: var(--sc-ink); line-height: 1.3; }
.wkd__cardm { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--fg-body); }
.wkd__cardm span { color: var(--ink-4); font-weight: 600; margin-right: 5px; }
.wkd__convbtn { margin-top: 14px; min-height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid color-mix(in oklab, var(--lh) 50%, transparent); background: color-mix(in oklab, var(--lh) 14%, #12141c); color: #fff; font-weight: 600; font-size: 13px; cursor: pointer; transition: background-color .18s var(--ease); }
.wkd__convbtn:hover { background: color-mix(in oklab, var(--lh) 24%, #12141c); }
.wkd__convbtn:active { transform: translateY(1px); }

.wkd__conv { margin-top: 14px; padding-top: 0; max-height: 0; opacity: 0; overflow: hidden; transition: max-height .5s var(--ease), opacity .4s var(--ease), padding-top .4s var(--ease); border-top: 0 solid var(--line-2); }
.wkd__conv.open { max-height: 600px; opacity: 1; padding-top: 14px; border-top-width: 1px; }
.wkd__convh { margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .01em; color: var(--lc); }
.wkd__conv ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.wkd__conv li { display: flex; gap: 9px; align-items: flex-start; }
.wkd__conv li img { width: 22px; height: 22px; flex: none; border-radius: 7px; object-fit: cover; }
.wkd__conv li p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--fg-body); }
.wkd__conv li b { display: block; font-size: 11.5px; color: var(--sc-ink); margin-bottom: 2px; font-weight: 600; }

.wkd__phone { position: absolute; right: clamp(-6px, -1.4vw, -18px); bottom: -18px; width: 200px; margin: 0; border-radius: 20px; background: #14151d; border: 1px solid #2a2d38; box-shadow: 0 20px 30px -14px rgb(0 0 0 / .65), inset 0 1px 0 rgb(255 255 255 / .06);
  opacity: 0; transform: translateY(26px) scale(.94); pointer-events: none; transition: opacity .5s var(--ease), transform .5s var(--ease); }
.wkd__phone.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.wkd__phonebar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 0; font: 500 10.5px/1 var(--sc-font-mono); color: var(--ink-4); }
.wkd__phonebar em { font-style: normal; }
.wkd__phonebody { padding: 8px 14px 16px; }
.wkd__phonek { margin: 6px 0 0; font-size: 12.5px; font-weight: 600; color: #fff; }
.wkd__phonet { margin: 4px 0 0; font-size: 12px; line-height: 1.45; color: var(--ink-2); }
.wkd__phonebtns { display: flex; gap: 8px; margin-top: 12px; }
.wkd__approve, .wkd__later { flex: 1; min-height: 34px; border-radius: 8px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--line-2); }
.wkd__approve { background: color-mix(in oklab, var(--lh) 22%, #12141c); border-color: color-mix(in oklab, var(--lh) 55%, transparent); color: #fff; }
.wkd__approve:hover { background: color-mix(in oklab, var(--lh) 32%, #12141c); }
.wkd__approve[disabled] { opacity: .75; cursor: default; }
.wkd__later { background: #0e0f16; color: var(--ink-2); }
.wkd__phone.approved .wkd__phonek { color: #b9f5cf; }
.wkd__phone figcaption { position: absolute; left: 0; right: 0; top: 100%; margin-top: 10px; white-space: nowrap; }
.demo-scn--dark { color: var(--ink-4); }

@media (max-width: 960px) {
  .wkd__stage { grid-template-columns: 1fr; align-content: start; gap: 14px; padding: calc(var(--bar-h) + 12px) 16px 60px; }
  .wkd__copy .h2 { font-size: 26px; }
  .wkd__lede { display: none; }
  .wkd__steps { margin-top: 10px; min-height: 118px; }
  .wkd__t { font-size: 21px; }
  .wkd__steps li > p:not(.wkd__k) { font-size: 13.5px; margin-top: 6px; }
  .wkd__phone { position: static; margin: 16px auto 0; width: min(240px, 72vw); transform: none; }
  .wkd__phone.show { transform: none; }
}

/* ---------------------------------------------------------------- 3 · the roster (pan) */
/* The lead (heading+lede) is taken out of flow (.sc-stage is already the
   nearest positioned ancestor, via the engine's own sticky) so the panning
   .wkg__rail is the stage's only in-flow child and starts flush at x:0, the
   same coordinate space the engine measures scrollWidth-vs-viewport against.
   That keeps "the last item lands flush at the right edge" true. The lead
   sits ABOVE the track (z-index, opaque ground): an opaque panel the cards
   travel behind, never a heading the cards travel over or clip through. */
.wkg__stage { display: flex; align-items: center; overflow: hidden; padding-block: calc(var(--bar-h) + 20px) 24px; --wkg-lead-w: clamp(420px, 36vw, 560px); }
.wkg__lead { position: absolute; top: 0; left: 0; bottom: 0; width: var(--wkg-lead-w); z-index: 2; background-color: #fcfbff; padding-left: clamp(20px, 7vw, 120px); padding-right: 40px; display: flex; flex-direction: column; justify-content: center; }
.wkg__lead .h2 { font-size: clamp(32px, 3.4vw, 46px); }
.wkg__lead .lede { max-width: 34ch; }
/* a static, non-moving fade over the track's leading edge: the section
   ground colour to transparent, wide enough that a card crossing it is
   fully blended out before the hard edge, never left mid-word beside the
   heading. It never transforms; only the rail underneath it moves. */
.wkg__fade { position: absolute; top: 0; bottom: 0; left: var(--wkg-lead-w); width: 80px; z-index: 2; background: linear-gradient(to right, #fcfbff 0%, #fcfbff 45%, transparent 100%); pointer-events: none; }
.wkg__rail { display: flex; align-items: center; gap: 22px; padding-right: clamp(20px, 7vw, 120px); }
.wkg__card { flex: none; align-self: center; width: clamp(320px, 25vw, 380px); min-height: clamp(420px, 52vh, 540px); padding: 30px 28px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1px 2px rgb(26 16 51 / .05); display: flex; flex-direction: column; gap: 24px; }
.wkg__top { display: flex; flex-direction: column; gap: 10px; }
.wkg__mid { display: flex; flex-direction: column; gap: 12px; }
.wkg__kind { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--lc); }
.wkg__card .h4 { margin-top: 0; font-size: clamp(20px, 1.7vw, 23px); line-height: 1.25; }
.wkg__desc { margin: 0; font-size: 14.5px; line-height: 1.62; color: var(--fg-body); }
.wkg__minirow { display: flex; align-items: center; gap: 10px; margin: 0; padding: 11px 13px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); font-size: 13.5px; font-weight: 600; color: var(--sc-ink); }
.wkg__minirow img { width: 30px; height: 30px; border-radius: 8px; object-fit: cover; flex: none; }
.wkg__minirow--ghost { opacity: .8; }
.wkg__minirow .chip { margin-left: auto; }
.wkg__pinbtn, .wkg__hidebtn { margin-left: auto; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--sc-ink); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wkg__pinbtn[aria-pressed="true"] { background: var(--lc); border-color: var(--lc); color: #fff; }
.wkg__hidebtn[aria-pressed="true"] { background: var(--panel-2); color: var(--ink-2); text-decoration: line-through; }
.wkg__note { margin-top: auto; font-size: 13px; line-height: 1.55; color: var(--ink-2); }
.wkg__label { display: block; margin: 4px 0 0; font-size: 11.5px; font-weight: 600; color: var(--ink-4); }
.wkg__select { width: 100%; min-height: 42px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--sc-ink); font: 500 14px var(--sc-font-text); }
.wkg__dupbtn { margin-left: auto; min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in oklab, var(--lc) 50%, transparent); background: color-mix(in oklab, var(--lc) 10%, transparent); color: var(--lc); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wkg__dupout { margin: 0; }
.wkg__end { flex: none; width: 320px; align-self: center; padding-left: 16px; }
.wkg__end .lede { margin-top: 10px; }
/* Under 760px there is not enough width for an opaque lead column beside a
   readable card, so the pan gives way to the same stacked layout as reduced
   motion: heading on top, cards wrapped in normal document flow below it. */
@media (max-width: 760px) {
  .wkg { height: auto !important; }
  .wkg > .wkg__stage { height: auto !important; overflow: visible !important; }
  .wkg__stage { flex-wrap: wrap; padding-block: clamp(56px, 8vw, 90px); }
  .wkg__lead { position: static; flex: 1 1 100%; width: auto; max-width: none; background: none; padding-right: clamp(20px, 7vw, 120px); }
  .wkg__lead .h2 { max-width: none; }
  .wkg__fade { display: none; }
  .wkg__rail { flex: 1 1 100%; flex-wrap: wrap; width: auto; transform: none !important; padding-right: clamp(20px, 7vw, 120px); }
  .wkg__card { align-self: stretch; width: 80vw; min-height: 0; }
  .wkg__end { flex-basis: 100%; width: auto; padding-left: 0; }
}
/* reduced motion: the lead never moves under the transform-pan, but the
   generic scrollcraft floor turns the WHOLE stage (lead included) into a
   native horizontal scroller, which would drag the heading away too. Re-lay
   the act as a wrapped, stacked set instead: lead on its own line, cards
   wrapped below it, nothing to pan and nothing hidden past a fold. */
@media (prefers-reduced-motion: reduce) {
  .wkg { height: auto !important; }
  .wkg > .wkg__stage { height: auto !important; overflow: visible !important; }
  .wkg__stage { flex-wrap: wrap; padding-block: clamp(56px, 6vw, 90px); }
  .wkg__lead { position: static; flex: 1 1 100%; width: auto; max-width: 720px; background: none; padding-right: clamp(20px, 7vw, 120px); }
  .wkg__lead .h2 { max-width: none; }
  .wkg__fade { display: none; }
  .wkg__rail { flex: 1 1 100%; flex-wrap: wrap; width: auto; transform: none !important; padding-right: 0; }
  .wkg__card { align-self: stretch; flex: 1 1 280px; width: auto; min-height: 0; }
  .wkg__end { flex-basis: 100%; width: auto; padding-left: 0; }
}

/* ---------------------------------------------------------------- 4 · reach: notifications per Squid (flow) */
.wkn .split { align-items: start; }
.wkn__copy .prose { margin-top: 20px; }
.wkn__list { list-style: none; margin: 0; padding: 16px; display: grid; gap: 12px; }
.wkn__row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wkn__row img { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; flex: none; }
.wkn__row b { font-size: 13.5px; font-weight: 600; color: var(--sc-ink); flex: 1 1 auto; min-width: 110px; }
.wkn__sw { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line-2); background: #12141c; color: var(--ink-2); font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wkn__sw[aria-pressed="true"] { background: color-mix(in oklab, var(--lh) 24%, #12141c); border-color: color-mix(in oklab, var(--lh) 55%, transparent); color: #fff; }
.wkn__sw i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4); }
.wkn__sw[aria-pressed="true"] i { background: var(--lh); }
.wkn__sum { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-4); }
.wkn__sum b { color: var(--sc-ink); }
@media (max-width: 900px) { .wkn__copy { order: -1; } }
@media (max-width: 560px) {
  .wkn__list { padding: 12px; gap: 14px; }
  .wkn__row b { flex-basis: 100%; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .wkd__steps li { transform: none !important; }
  .wkd__msg { animation: none; }
  .wkd__phone { transition-duration: .01s; transform: none; }
  .wkd__phone:not(.show) { display: none; }
  .wkd__card, .wkd__conv { transition-duration: .01s; }
}
