/* The Agents (/architecture/squids/): page-only styles. The shell is layer.css.
   Acts: hero (shell) · one identity, one job (flow + reveal) · every Squid has
   its own computer (pin, the peak, the signature Take over move) · one Squid
   leads (pan, the org chart) · type / and teach it (a short pin, not the peak;
   moved from the old SDK page, 2026-10-01) · ask for a routine (reveal wipe;
   moved the same day) · copy the definition, never the memory (flow) · the
   other nine and the close (shell). */

.lh__tile { left: 50%; top: 48%; }
@media (max-width: 700px) { .lh__tile { top: 27%; } }

/* ---------------------------------------------------------------- 1 · one identity, one job */
.idx-sec { padding-block: clamp(88px, 10vw, 150px); }
.idx-sec .lwrap.split { align-items: start; }
.idx__copy .prose { margin-top: 18px; }

.ro { margin: 0; padding: clamp(18px, 2.2vw, 26px); }
.ro__task { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 11px 14px; border-radius: 11px; border: 1px dashed color-mix(in oklab, var(--lh) 50%, var(--line-2)); background: color-mix(in oklab, var(--lh) 6%, var(--panel-2)); }
.ro__task i { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in oklab, var(--lh) 30%, #12141c); color: #fff; font: 600 11px/1 var(--sc-font-mono); font-style: normal; }
.ro__task p { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--fg-body); }
.ro__task b { color: var(--sc-ink); font-weight: 600; }

.ro__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ro__item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line-2); background: var(--panel-2); transition: border-color .4s var(--ease), background-color .4s var(--ease); }
.ro__item.match { border-color: var(--lh); background: color-mix(in oklab, var(--lh) 10%, var(--panel-2)); }
.ro__av { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; font: 600 13px/1 var(--sc-font-mono); background: #2a2146; color: #d9d2ff; }
.ro__item.match .ro__av { background: color-mix(in oklab, var(--lh) 45%, #2a2146); color: #fff; }
.ro__body { min-width: 0; flex: 1; }
.ro__namerow { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ro__name { font-weight: 600; font-size: 14.5px; color: var(--sc-ink); }
.ro__title { font-size: 11.5px; font-weight: 600; color: var(--lh); white-space: nowrap; }
.ro__desc { margin: 4px 0 0; font-size: 13px; line-height: 1.5; color: var(--fg-body); }
.ro__meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.ro__apps { display: flex; gap: 5px; }
.ro__apps img { width: 18px; height: 18px; border-radius: 5px; background: #fff; padding: 2px; }
.ro__conv { margin-left: auto; flex: none; font-size: 11px; font-weight: 600; color: var(--ink-4); white-space: nowrap; }
.ro__item.match .ro__conv { color: var(--lh); }
.ro__conv::before { content: "●"; margin-right: 5px; font-size: 7px; vertical-align: 1px; color: #3fbf6f; }
@media (max-width: 560px) {
  .ro { padding: 14px; }
  .ro__item { padding: 12px; }
  .ro__conv { display: none; }
}

/* ---------------------------------------------------------------- 2 · the peak: every Squid has its own computer */
.dsk__stage { max-width: 1180px; margin-inline: auto; padding: calc(var(--bar-h) + 24px) clamp(20px, 6vw, 90px) 30px; }
.dsk__head { max-width: 640px; margin: 0 auto 26px; text-align: center; }
.dsk__head .lede { margin: 14px auto 0; }

.dsw { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 24px 46px -24px rgb(0 0 0 / .75); }
.dsw__bar-status { margin-left: auto; font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: #12141c; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease); }
.dsw__bar-status.working { color: #b9f5cf; border-color: #1f5f3a; background: #0f2a1b; }
.dsw__bar-status.paused { color: #ffd9a0; border-color: #6a4a14; background: #2a1e0c; }
.dsw__bar-status.driving { color: #ffe08a; border-color: #6a5814; background: #2a260c; }
.dsw__bar-status.resumed { color: #b9d4ff; border-color: #22406a; background: #0c1a2a; }

.dsw__body { display: grid; grid-template-columns: 1.3fr 1fr; min-height: 300px; }
.dsw__browser { position: relative; padding: 16px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.dsw__url { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--sc-font-mono); color: var(--ink-4); padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 9px; margin-bottom: 14px; }
.dsw__url i { width: 8px; height: 8px; border-radius: 50%; background: #3fbf6f; flex: none; }
.dsw__page { position: relative; flex: 1; min-height: 168px; border-radius: 11px; background: #0b0d13; padding: 16px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.dsw__row { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; background: var(--panel-2); font-size: 12.5px; color: var(--fg-body); }
.dsw__row b { color: var(--sc-ink); font-weight: 600; }
.dsw__row i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lh); }

.dsw__pause { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 12px; padding: 18px; border-radius: 11px; background: rgb(8 9 13 / .92); opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s; }
.dsw__pause.show { opacity: 1; visibility: visible; }
.dsw__pause p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--sc-ink); max-width: 34ch; }
.dsw__pause p b { color: #ffd9a0; }
.dsw__takeover { min-height: 44px; padding: 0 18px; border-radius: 9px; border: 1px solid color-mix(in oklab, var(--lh) 55%, transparent); background: color-mix(in oklab, var(--lh) 22%, #12141c); color: #fff; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background-color .18s var(--ease), transform .12s var(--ease); }
.dsw__takeover:hover { background: color-mix(in oklab, var(--lh) 32%, #12141c); }
.dsw__takeover:active { transform: scale(.97); }
.dsw__takeover:disabled { opacity: .5; cursor: default; }
.dsw__vault { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #b9d4ff; opacity: 0; transform: translateY(4px); transition: opacity .3s var(--ease), transform .3s var(--ease); }
.dsw__vault.show { opacity: 1; transform: none; }
.dsw__vault::before { content: "🔒"; font-size: 11px; }

.dsw__term { background: #05060a; padding: 14px 16px; display: flex; flex-direction: column; }
.dsw__term-lbl { margin: 0 0 10px; font-size: 11px; font-weight: 600; color: var(--ink-4); }
.dsw__termlines { flex: 1; margin: 0; font: 12px/1.65 var(--sc-font-mono); color: #8fe6a8; white-space: pre-wrap; word-break: break-word; min-height: 168px; }
.dsw__termlines .muted { color: #4a5a4e; }
.dsw__cursor { display: inline-block; width: 7px; height: 13px; margin-left: 1px; background: #8fe6a8; vertical-align: -2px; animation: dsw-blink 1s step-end infinite; }
@keyframes dsw-blink { 50% { opacity: 0; } }

.dsk__rail { list-style: none; display: flex; gap: 8px; margin: 22px 0 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.dsk__rail li { font-size: 11.5px; font-weight: 600; padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-4); transition: color .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease); }
.dsk__rail li.on { color: #fff; border-color: var(--lh); background: color-mix(in oklab, var(--lh) 28%, #12141c); }

@media (max-width: 900px) {
  .dsw__body { grid-template-columns: 1fr; }
  .dsw__browser { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .dsk__head h2 { font-size: 26px; }
  .dsw__body { min-height: 0; }
  .dsw__page, .dsw__termlines { min-height: 130px; }
  .dsw__pause { padding: 14px; }
  .dsw__takeover { width: 100%; }
}

/* ---------------------------------------------------------------- 3b · type / and teach it (short pin, moved from the old SDK page)
   Deliberately smaller than the peak: a quarter of its span, and the copy
   ("that same desktop") reads as a continuation of it rather than a rival. */
.tsk__stage { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: clamp(28px, 4vw, 72px); align-items: center; padding: calc(var(--bar-h) + 20px) clamp(20px, 7vw, 120px) 28px; }
.tsk__lede { max-width: 46ch; }
.tsk__steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 0; }
.tsk__steps li { position: relative; padding: 14px 0 14px 30px; border-top: 1px solid var(--line); opacity: .42; transition: opacity .3s var(--ease); }
.tsk__steps li:first-child { border-top: 0; }
.tsk__steps li::before { content: ""; position: absolute; left: 0; top: 19px; width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); transition: background-color .3s var(--ease), transform .3s var(--ease); }
.tsk__steps li.on { opacity: 1; }
.tsk__steps li.on::before { background: var(--lh); transform: scale(1.3); }
.tsk__steps b { display: block; font-size: 15px; font-weight: 600; color: var(--sc-ink); }
.tsk__steps span { display: block; margin-top: 4px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }

.tsk__mock .win { box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 18px 30px -18px rgb(0 0 0 / .7); }
.tw__body { position: relative; min-height: clamp(340px, 42vh, 410px); }
.tw__pane { position: absolute; inset: 18px 18px 20px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .3s var(--ease), transform .35s var(--ease), visibility .3s; }
.tw__pane.on { opacity: 1; visibility: visible; transform: none; }

.tw__inputline { display: flex; align-items: center; gap: 2px; margin: 0 0 18px; padding: 10px 14px; border-radius: 10px; background: #0b0d13; border: 1px solid var(--line-2); font: 500 15px/1 var(--sc-font-mono); color: #fff; }
.tw__caret { width: 2px; height: 16px; background: var(--lh); animation: twblink 1s step-end infinite; }
@keyframes twblink { 50% { opacity: 0; } }
.tw__plbl { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: var(--ink-4); }
.tw__palette ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tw__palette li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--fg-body); background: #12141c; }
.tw__palette li.on { border-color: color-mix(in oklab, var(--lh) 55%, transparent); background: color-mix(in oklab, var(--lh) 14%, #12141c); color: #fff; font-weight: 600; }

.tw__rec { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 13.5px; font-weight: 600; color: #ff9c8f; }
.tw__dot { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; animation: twpulse 1.2s var(--ease) infinite; }
@keyframes twpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.tw__cap { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.tw__cap li { position: relative; padding: 9px 12px 9px 30px; border-radius: 9px; background: #12141c; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--fg-body); }
.tw__cap li::before { content: "\2713"; position: absolute; left: 11px; top: 9px; color: #7fe3ab; font-size: 12px; font-weight: 700; }
.tw__hint { margin: 0; font-size: 12.5px; color: var(--ink-4); }

.tw__sh { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 16px; }
.tw__sh b { font-size: 15px; color: var(--sc-ink); }
.tw__shape { margin: 0; display: grid; gap: 12px; }
.tw__shape div { padding-top: 12px; border-top: 1px solid var(--line); }
.tw__shape div:first-child { border-top: 0; padding-top: 0; }
.tw__shape dt { font-size: 12px; font-weight: 600; color: var(--lh); margin: 0 0 4px; }
.tw__shape dd { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--fg-body); }

.tw__note { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: var(--fg-body); }
.tw__note b { color: var(--sc-ink); }
.tw__diff { margin: 0 0 14px; padding: 12px 14px; border-radius: 10px; background: #0b0d13; border: 1px solid var(--line-2); }
.tw__difflbl { margin: 0 0 8px; font-size: 11.5px; font-weight: 600; color: var(--ink-4); }
.tw__rm, .tw__add { margin: 0; padding: 7px 10px; border-radius: 7px; font: 500 12.5px/1.5 var(--sc-font-mono); }
.tw__rm { color: #ff9c8f; background: rgb(255 95 87 / .1); text-decoration: line-through; text-decoration-color: rgb(255 95 87 / .5); }
.tw__add { margin-top: 6px; color: #9df5bd; background: rgb(52 211 153 / .12); }
.tw__act { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.tw__btn { min-height: 38px; padding: 0 16px; border-radius: 9px; font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background-color .18s var(--ease), border-color .18s var(--ease); }
.tw__btn--acc { border: 1px solid color-mix(in oklab, var(--lh) 55%, transparent); background: color-mix(in oklab, var(--lh) 18%, #12141c); color: #fff; }
.tw__btn--acc:hover { background: color-mix(in oklab, var(--lh) 28%, #12141c); }
.tw__btn--rej { border: 1px solid var(--line-2); background: #12141c; color: var(--ink-2); }
.tw__btn--rej:hover { color: var(--sc-ink); }
.tw__btn.on { box-shadow: inset 0 0 0 1.5px currentColor; }
.tw__btn:active { transform: translateY(1px); }
.tw__owner { margin: 0; font-size: 12.5px; color: var(--ink-4); min-height: 1.4em; }

@media (max-width: 960px) {
  .tsk__stage { grid-template-columns: 1fr; align-content: start; gap: 14px; padding: calc(var(--bar-h) + 12px) 16px 12px; }
  .tsk__lede, .tsk__steps span { font-size: 14px; }
  .tsk__steps { margin-top: 16px; }
  .tw__body { min-height: clamp(300px, 50vh, 400px); }
}
@media (max-width: 860px), (pointer: coarse) { .tw__btn { min-height: 44px; } }
@media (prefers-reduced-motion: reduce) {
  .tsk__steps li { transition: none; }
  .tw__caret, .tw__dot { animation: none; }
  .tw__pane { transition-duration: .01s; transform: none; }
  .tw__btn:active { transform: none; }
}

/* ---------------------------------------------------------------- 3c · ask for a routine, or wait for one (reveal wipe, moved from the old SDK page) */
.sto-sec { padding-block: clamp(88px, 9vw, 140px); }
.sto__ask { margin: 22px 0 0; padding: 16px 18px; border-radius: 12px; background: var(--tint); border: 1px solid var(--line); font-family: var(--sc-font-display); font-style: italic; font-weight: 500; font-size: 17px; line-height: 1.5; color: var(--sc-ink); max-width: 46ch; }
.sto__fig { margin: 0; }
.sto__card { padding: 20px 22px 22px; }
.sto__subj { margin: 0 0 16px; font-family: var(--sc-font-display); font-weight: 600; font-size: 20px; letter-spacing: -.015em; color: var(--sc-ink); text-wrap: pretty; }
.sto__card dl { margin: 0 0 16px; display: grid; gap: 0; }
.sto__card dl div { display: grid; grid-template-columns: 90px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.sto__card dl div:first-child { border-top: 0; padding-top: 0; }
.sto__card dt { color: var(--ink-4); }
.sto__card dd { margin: 0; font-weight: 600; color: var(--sc-ink); }
.sto__trig { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.sto__types { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sto__types li { font-size: 13.5px; font-weight: 600; padding: 9px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--sc-ink); background: var(--panel); }
.sto__wh { margin: 18px 0 0; max-width: 58ch; color: var(--sc-ink-soft); font-size: 14.5px; line-height: 1.6; }
@media (max-width: 860px), (pointer: coarse) { .sto__types li { min-height: 44px; display: inline-flex; align-items: center; } }

/* ---------------------------------------------------------------- 3 · one Squid leads: the org chart (pan)
   The heading and the lead card sit in an opaque fixed left column (34-38% of
   the stage), clear of the nav rail, for the whole pan. A static ~80px fade
   (ground colour to transparent) sits at the column's right edge so a card
   passing underneath softens rather than cutting hard. Only .org__rail (the
   specialist cards) moves; it starts past the fade and the last card lands
   flush in view. */
.org__stage { --org-col: clamp(400px, 36vw, 560px); --org-fade: 80px; overflow: hidden; }
.org__head {
  position: absolute; z-index: 2; inset: 0 auto 0 0; width: var(--org-col);
  display: flex; flex-direction: column; justify-content: center; gap: 0;
  padding: 0 28px 0 clamp(20px, 6vw, 100px);
  background: #fcfbff;
}
.t-dark .org__head { background: #08090d; }
.org__head h2 { font-size: clamp(30px, 3vw, 44px); }
.org__head .lede { margin-top: 12px; font-size: clamp(14.5px, 1.05vw, 16.5px); line-height: 1.55; }
.org__head .org__node { margin-top: 20px; }
.org__fade {
  position: absolute; z-index: 2; top: 0; bottom: 0; left: var(--org-col); width: var(--org-fade); pointer-events: none;
  background: linear-gradient(to right, #fcfbff 0%, transparent 100%);
}
.t-dark .org__fade { background: linear-gradient(to right, #08090d 0%, transparent 100%); }
.org__rail { position: relative; height: 100%; display: flex; align-items: center; gap: 0; padding: 0 clamp(20px, 7vw, 120px) 0 calc(var(--org-col) + var(--org-fade)); }
.org__node { flex: none; width: clamp(300px, 21vw, 370px); padding: clamp(24px, 2.2vw, 30px); border-radius: 18px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 1px 2px rgb(26 16 51 / .05); }
.org__node--lead { width: auto; border: 1.5px solid var(--lc); background: color-mix(in oklab, var(--lc) 6%, var(--panel)); }
.org__node--note { background: transparent; border-style: dashed; box-shadow: none; }
.org__badge { display: inline-block; margin: 0 0 14px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--lc); background: color-mix(in oklab, var(--lc) 14%, transparent); padding: 5px 11px; border-radius: 999px; }
.org__node h3 { margin: 0; font-family: var(--sc-font-display); font-weight: 600; font-size: clamp(21px, 1.7vw, 25px); letter-spacing: -.015em; color: var(--sc-ink); }
.org__reports { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-4); }
.org__reports b { color: var(--sc-ink); }
.org__node > p:last-child { margin: 14px 0 0; font-size: 14.5px; line-height: 1.6; color: var(--fg-body); }
.org__link { flex: none; width: clamp(28px, 3vw, 48px); height: 2px; background: var(--line-2); position: relative; }
.org__link::before, .org__link::after { content: ""; position: absolute; top: 50%; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transform: translateY(-50%); }
.org__link::before { left: -3px; } .org__link::after { right: -3px; }
@media (max-width: 900px) {
  .org__stage { display: flex; flex-direction: column; justify-content: center; gap: 20px; }
  .org__head { position: static; width: auto; min-width: 0; background: none !important; padding: calc(var(--bar-h) + 16px) clamp(20px, 7vw, 120px) 0; }
  .org__head h2 { font-size: clamp(28px, 7vw, 38px); }
  .org__fade { display: none; }
  .org__rail { padding: 0 clamp(20px, 7vw, 120px) 24px; }
  .org__node, .org__node--lead { width: 80vw; }
}
@media (prefers-reduced-motion: reduce) {
  .org > .org__stage { height: auto !important; overflow: visible !important; }
  .org__head { position: static !important; width: auto !important; background: none !important; padding: 40px clamp(20px, 7vw, 120px) 0; }
  .org__fade { display: none; }
  .org__rail { flex-wrap: wrap; transform: none !important; padding: 24px clamp(20px, 7vw, 120px) 40px !important; }
  .org__node { width: auto; flex: 1 1 240px; }
  .org__link { display: none; }
}

/* ---------------------------------------------------------------- 4 · copy the definition, never the memory */
.tpl-sec .lwrap.split { align-items: start; }
.tpl-sec .prose { margin-top: 18px; }
.tpl__facts { margin: 26px 0 0; display: grid; gap: 16px; }
.tpl__facts div { padding-top: 14px; border-top: 1px solid var(--line-2); }
.tpl__facts p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--sc-ink-soft); }
.tpl__facts b { display: block; font-size: 14.5px; font-weight: 600; color: var(--sc-ink); }

.tpl { margin: 0; padding: clamp(18px, 2.2vw, 24px); }
.tpl__grp { margin: 0 0 18px; }
.tpl__grp:last-child { margin-bottom: 0; }
.tpl__grph { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 12px; font-weight: 600; color: #b9f5cf; }
.tpl__grp--out .tpl__grph { color: #8a8f9b; }
.tpl__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 13px; color: var(--fg-body); }
.tpl__grp--out .tpl__row { color: var(--ink-4); }
.tpl__chk { flex: none; width: 17px; height: 17px; border-radius: 5px; display: grid; place-items: center; font: 700 10px/1 var(--sc-font-mono); }
.tpl__chk.on { background: #1f5f3a; color: #b9f5cf; }
.tpl__chk.off { border: 1.5px solid var(--line-2); color: var(--ink-4); }

@media (prefers-reduced-motion: reduce) {
  .ro__item { transition: none; }
  .dsw__pause, .dsw__vault, .dsw__bar-status, .dsk__rail li { transition: none; }
  .dsw__cursor { animation: none; }
}
