/* /digital-twin-fde-test/ #engineers (lab/pages/dt_build.py). Structure after Temporal's "How it works"
   (https://temporal.io): one diagram in a dashed frame that gains a box per step, monospace capitals inside the boxes, no
   text on any line. Pinned like Linear's features panel (https://linear.app); numbered steps lit one at a time after
   Palantir AIP "Beyond Chat" (https://www.palantir.com/platforms/aip/). Violet for live, amber for a person's turn. */
.erp .bd-split { --v: #9a6bff; --vl: #b6abff; --turn: #e88122; --ok: #4ade80;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 620px); align-items: start; gap: clamp(40px, 6vw, 96px); }
.erp .bd-side { position: sticky; top: 14vh; }
.erp .bd-steps { display: grid; gap: 14px; margin: clamp(24px, 3vw, 36px) 0 clamp(28px, 3vw, 40px); padding: 0; list-style: none; max-width: 520px; }
.erp .bd-steps li { display: grid; grid-template-columns: 34px 1fr; column-gap: 12px; row-gap: 3px; }
.erp .bd-steps em { grid-row: span 2; padding-top: 3px; color: var(--vl); font: 500 12px/1.4 var(--sc-font-mono); font-style: normal; letter-spacing: .08em; }
.erp .bd-steps b { color: #f4f3ef; font: 600 17px/1.25 var(--sc-font-display); letter-spacing: -.01em; }
.erp .bd-steps span { color: #bdb6d0; font: 400 14.5px/1.45 var(--sc-font-text); }

/* the figure: a tall track, the diagram pinned inside it */
.erp .bd { margin: 0; }
.erp .bd-pin { border-radius: 20px; padding: clamp(14px, 1.6vw, 20px);
  background: radial-gradient(70% 60% at 50% 40%, rgb(154 107 255 / .12), transparent 70%), linear-gradient(180deg, rgb(22 18 42 / .92), rgb(10 8 20 / .96));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .12), inset 0 1px 0 rgb(255 255 255 / .12), 0 40px 90px -40px rgb(0 0 0 / .95);
  transition: box-shadow .6s; }
.erp .bd-bar { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 2px 4px 12px;
  color: #8f88a6; font: 500 10.5px/1.2 var(--sc-font-mono); letter-spacing: .16em; text-transform: uppercase; }
.erp .bd-count { color: #d8d1ea; font-weight: 500; white-space: nowrap; }
.erp .bd-count em { color: var(--vl); font-style: normal; }
.erp .bd-count i { margin-left: 8px; color: #f4f3ef; font-style: normal; }
.erp .bd-cap { display: none; min-height: 2.9em; margin: 0 4px 12px; color: #bdb6d0; font: 400 13.5px/1.45 var(--sc-font-text); }
.erp .bd-canvas { position: relative; aspect-ratio: 600 / 620; container-type: inline-size; border-radius: 12px; outline: 1px dashed rgb(154 107 255 / .35); outline-offset: 0; }
.erp .bd-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.erp .bd-lines path { fill: none; stroke: var(--v); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke;
  stroke-dasharray: 1; stroke-dashoffset: 0; filter: drop-shadow(0 0 4px rgb(154 107 255 / .6)); }

/* boxes: label in mono capitals inside, never on a line */
.erp .bd-b { position: absolute; box-sizing: border-box; display: flex; flex-direction: column; gap: clamp(2px, .6cqw, 5px);
  padding: clamp(6px, 1.9cqw, 12px) clamp(7px, 2.2cqw, 14px); border-radius: clamp(7px, 1.6cqw, 11px); overflow: hidden;
  background: linear-gradient(180deg, rgb(32 26 58 / .96), rgb(16 13 30 / .98));
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / .13), 0 14px 30px -18px rgb(0 0 0 / .9); }
.erp .bd-b small { color: #8f88a6; font: 500 clamp(7.5px, 1.65cqw, 10px)/1.1 var(--sc-font-mono); letter-spacing: .14em; text-transform: uppercase; }
.erp .bd-b b { color: #f4f3ef; font: 600 clamp(10px, 2.5cqw, 15px)/1.2 var(--sc-font-display); letter-spacing: -.01em; white-space: nowrap; }
.erp .bd-b span, .erp .bd-b p, .erp .bd-b dt, .erp .bd-b dd { margin: 0; color: #bdb6d0; font: 400 clamp(8.5px, 1.95cqw, 12px)/1.3 var(--sc-font-text); }
.erp .bd-src { box-shadow: inset 0 0 0 1px rgb(255 255 255 / .13), inset 0 2px 0 var(--c), 0 14px 30px -18px rgb(0 0 0 / .9); }
.erp .bd-src small { color: color-mix(in oklab, var(--c) 65%, #fff); }
.erp .bd-ro { align-self: start; margin-top: auto; padding: 2px 7px; border-radius: 99px; color: #d8d1ea; font: 500 clamp(7px, 1.5cqw, 9.5px)/1.4 var(--sc-font-mono);
  font-style: normal; letter-spacing: .1em; text-transform: uppercase; background: rgb(255 255 255 / .06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14); }
.erp .bd-chips { display: flex; flex-wrap: wrap; gap: clamp(3px, 1cqw, 6px); }
.erp .bd-chips span { padding: 2px clamp(5px, 1.2cqw, 8px); border-radius: 6px; color: #f4f3ef; font: 500 clamp(8px, 1.9cqw, 12px)/1.4 var(--sc-font-mono);
  white-space: nowrap; background: color-mix(in oklab, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 55%, transparent); }
.erp .bd-note { display: flex; align-items: center; gap: 6px; }
.erp .bd-dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--turn); box-shadow: 0 0 8px var(--turn); }
.erp .bd-model dl { display: grid; gap: clamp(2px, .6cqw, 4px); margin: clamp(2px, .8cqw, 6px) 0 0; }
.erp .bd-model dl div { display: flex; justify-content: space-between; padding-top: clamp(2px, .6cqw, 4px); border-top: 1px solid rgb(255 255 255 / .07); }
.erp .bd-model dd { color: var(--vl); font-family: var(--sc-font-mono); }
.erp .bd-turn { display: flex; align-items: center; gap: 7px; }
.erp .bd-turn i { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--turn); box-shadow: 0 0 10px var(--turn); }
.erp .bd-act { box-shadow: inset 0 0 0 1px rgb(232 129 34 / .45), 0 14px 30px -18px rgb(0 0 0 / .9); }
.erp .bd-squid { padding-right: clamp(46px, 13cqw, 76px); }
.erp .bd-live { position: absolute; top: 50%; right: clamp(8px, 2.2cqw, 14px); transform: translateY(-50%); display: inline-flex; align-items: center; gap: 6px;
  color: #d8d1ea; font: 500 clamp(7.5px, 1.6cqw, 10px)/1 var(--sc-font-mono); font-style: normal; letter-spacing: .12em; text-transform: uppercase; }
.erp .bd-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--v); box-shadow: 0 0 10px var(--v); }
@container (max-width: 430px) {
  .erp .bd-note, .erp .bd-squid span { display: none; }
  .erp .bd-link span { font-size: 7.5px; line-height: 1.2; }
  .erp .bd-chips { flex-wrap: nowrap; gap: 3px; }
  .erp .bd-chips span { padding: 1px 4px; font-size: 7.5px; }
}
@media (max-width: 520px) {
  .erp .bd-canvas { aspect-ratio: 600 / 800; }
  .erp .bd-bar > span { display: none; }
  .erp .bd-bar { justify-content: flex-end; }
}

/* scroll states, only when the script runs and motion is allowed */
.erp .bd-split.js .bd-track { height: calc(6 * 62vh + 76vh); }
.erp .bd-split.js .bd { position: sticky; top: 12vh; }
.erp .bd-split.js .bd-b { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .5s cubic-bezier(.2, .7, .2, 1), transform .5s cubic-bezier(.2, .7, .2, 1); }
.erp .bd-split.js .bd-b.in { opacity: 1; transform: none; }
.erp .bd-split.js .bd-lines path { stroke-dashoffset: 1; transition: stroke-dashoffset .7s cubic-bezier(.4, 0, .2, 1) .15s; }
.erp .bd-split.js .bd-lines path.in { stroke-dashoffset: 0; }
.erp .bd-split.js .bd-steps li { transition: opacity .4s; }
.erp .bd-split.js .bd-steps li:not(.in) { opacity: .38; }
.erp .bd-split.js .bd-steps { gap: 10px; }
.erp .bd-split.js .bd-steps span { max-height: 4.5em; overflow: hidden; transition: max-height .45s cubic-bezier(.2, .7, .2, 1), opacity .35s; }
.erp .bd-split.js .bd-steps li:not(.on) span { max-height: 0; opacity: 0; }
.erp .bd-split.js .bd-steps li.on em { color: #f4f3ef; }
.erp .bd-split.js .bd-steps li.on b { color: #fff; }
.erp .bd.live .bd-pin { box-shadow: inset 0 0 0 1px rgb(154 107 255 / .5), inset 0 1px 0 rgb(255 255 255 / .14), 0 0 60px -20px rgb(154 107 255 / .55), 0 40px 90px -40px rgb(0 0 0 / .95); }
.erp .bd.live .bd-live::before { animation: bd-pulse 1.6s ease-in-out infinite; }
@keyframes bd-pulse { 50% { opacity: .35; } }

@media (max-width: 900px) {
  .erp .bd-split { grid-template-columns: 1fr; }
  .erp .bd-side { position: static; }
  .erp .bd-split.js .bd-steps { display: none; }
  .erp .bd-split.js .bd-cap { display: block; }
  .erp .bd-split.js .bd-track { height: calc(6 * 55vh + 70vh); }
  .erp .bd-split.js .bd { top: 76px; }
}
@media (prefers-reduced-motion: reduce) { .erp .bd.live .bd-live::before { animation: none; } }
