/* Industry pages, #gap and #lose (2026-10-27), built by industry_kit.gap_story() and lose() from lab/pages/usecases/gap.json.
   Saife: "i still don't get the point of these ... explain in laymens terms what problem its solving", then "rebuild it in a
   more informative way for someone to actually understand how this digital twin solves this issue".
   #gap is a stepped explainer pinned for five screens of scroll, one step per screen, so nothing moves while it is read:
   - the rail of named steps (active step in ink with a violet rule, the rest dim) and one sentence per step: Attio,
     https://attio.com, Projects/Marrinn/research/motion-references-2026-10/twin-gap-explainer/gl-attio-*;
   - two system cards apart with "Not connected" under the gap, then joined inside one Digital Twin frame: Ramp,
     "Systems that never spoke" (gl-ramp-*);
   - #lose: Senzing's three warning cards (vx-senzing-2), inverted into what is lost.
   Finish follows the twin player beneath it (ind-twin.css): Inter, tone-only fills at 12px, one hairline, violet the
   twin, amber a person's decision and the clash, green done, red only for the harm. The one bright object is the Digital
   Twin frame at step 4. Default markup is the final state; ind-gap.js drives data-s. */
.gx { --v: #9a6bff; --vl: #c9b6ff; --a: #e88122; --g: #4ade80; --r: #ff8f8f; --ink: #f4f3ef; --soft: #c9c3da; --dim: #8f88a6;
  --faint: #5f5975; --fill: rgb(255 255 255 / .045); --rule: rgb(255 255 255 / .09); --out: cubic-bezier(.22, 1, .36, 1);
  position: relative; height: 520vh; padding: 0; }
.gx__pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-items: center; }
.gx__in { width: 100%; padding-top: 64px; }
.gx__h { margin: 0 0 clamp(28px, 5vh, 52px); max-width: 22ch; }
.gx__body { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.gx svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- the rail */
.gx-rail { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.gx-rail li { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 0 10px 18px; color: var(--faint);
  font: 500 16px/1.2 var(--sc-font-text); cursor: pointer; transition: color .35s var(--out); }
.gx-rail li::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; border-radius: 1px; background: transparent; transition: background .35s var(--out); }
.gx-rail__n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .14);
  font-size: 12px; font-variant-numeric: tabular-nums; flex: none; transition: background .35s, color .35s, box-shadow .35s; }
.gx-rail li:hover { color: var(--soft); }
.gx-rail li.is-past { color: var(--dim); }
.gx-rail li.is-past .gx-rail__n { background: rgb(154 107 255 / .16); color: var(--vl); box-shadow: none; }
.gx-rail li.is-on { color: var(--ink); }
.gx-rail li.is-on::before { background: var(--v); }
.gx-rail li.is-on .gx-rail__n { background: var(--v); color: #fff; box-shadow: none; }

/* ---- the sentence for the step */
.gx-says { display: grid; min-height: 3.9em; margin-bottom: clamp(22px, 3.5vh, 36px); font: 500 clamp(20px, 1.9vw, 27px)/1.3 var(--sc-font-text);
  letter-spacing: -.015em; color: var(--ink); }
.gx-say { grid-area: 1 / 1; margin: 0; max-width: 40ch; opacity: 0; transform: translateY(10px); transition: opacity .45s var(--out), transform .55s var(--out); }
.gx-say.is-on { opacity: 1; transform: none; }

/* ---- the stage */
.gx-stage { position: relative; display: grid; gap: 16px; max-width: 760px; padding: 52px 22px 22px; border-radius: 18px; }
.gx-twin { position: absolute; inset: 0; border-radius: 18px; border: 1px solid rgb(154 107 255 / .55); pointer-events: none;
  background: radial-gradient(80% 60% at 50% 0%, rgb(154 107 255 / .14), transparent 70%), rgb(16 12 32 / .55);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .18), 0 0 60px -18px rgb(154 107 255 / .7);
  opacity: 0; transform: scale(.98); transition: opacity .5s var(--out), transform .6s var(--out); }
.gx-twin__k { position: absolute; left: 22px; top: 18px; color: var(--vl); font: 500 13px/1 var(--sc-font-text); }
.gx-twin b { position: absolute; left: 22px; top: 18px; padding-left: 96px; color: var(--ink); font: 600 13px/1 var(--sc-font-text); }
.gx-stage[data-s="3"] .gx-twin, .gx-stage[data-s="4"] .gx-twin { opacity: 1; transform: none; }

.gx-pair { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); align-items: center;
  transition: grid-template-columns .6s var(--out); }
.gx-stage[data-s="3"] .gx-pair, .gx-stage[data-s="4"] .gx-pair { grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr); }
.gx-sys { padding: 16px 18px; border-radius: 12px; background: var(--fill); transition: background .4s, box-shadow .4s, opacity .4s; }
.gx-sys__h { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font: 400 13px/1.2 var(--sc-font-text); color: var(--dim); }
.gx-sys__h b { color: var(--soft); font-weight: 600; }
.gx-lg { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #fff; flex: none; }
.gx-lg img { width: 14px; height: 14px; object-fit: contain; }
.gx-sys__f { margin: 0; color: var(--ink); font: 500 17px/1.35 var(--sc-font-text); letter-spacing: -.01em; }
.gx-sys__now { margin-left: auto; padding-left: 10px; color: #ffc58f; font: 600 12px/1 var(--sc-font-text); font-style: normal; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.gx-stage[data-s="1"] .gx-sys__now, .gx-stage[data-s="2"] .gx-sys__now { opacity: 1; }
.gx-stage[data-s="1"] .gx-sys--a, .gx-stage[data-s="2"] .gx-sys--a { box-shadow: inset 0 0 0 1px rgb(232 129 34 / .5); background: rgb(232 129 34 / .06); }
.gx-stage[data-s="1"] .gx-sys--b, .gx-stage[data-s="2"] .gx-sys--b { opacity: .55; }

/* the gap between them: a dashed rule and a label under it (never on it), then a solid violet join */
.gx-link { position: relative; height: 60px; }
.gx-link i { position: absolute; left: 8px; right: 8px; top: 50%; height: 0; border-top: 1.5px dashed rgb(255 255 255 / .22); transition: border-color .4s; }
.gx-link span { position: absolute; left: 50%; top: calc(50% + 10px); transform: translateX(-50%); white-space: nowrap; font: 500 12px/1 var(--sc-font-text); transition: opacity .3s; }
.gx-link__no { color: var(--dim); }
.gx-link__yes { opacity: 0; color: var(--vl); }
.gx-stage[data-s="2"] .gx-link i { border-top-color: rgb(255 143 143 / .6); }
.gx-stage[data-s="2"] .gx-link__no { color: var(--r); }
.gx-stage[data-s="3"] .gx-link i, .gx-stage[data-s="4"] .gx-link i { left: 0; right: 0; border-top: 2px solid var(--v); box-shadow: 0 0 10px rgb(154 107 255 / .8); }
.gx-stage[data-s="3"] .gx-link span, .gx-stage[data-s="4"] .gx-link span { opacity: 0; }

/* rows under the pair: two slots. Slot 1 holds the action, then the flag; slot 2 the harm, then the decision */
.gx-harm, .gx-flag, .gx-dec { position: relative; z-index: 1; margin: 0; display: flex; align-items: center; gap: 12px; min-height: 56px;
  padding: 12px 16px; border-radius: 12px; font: 400 15.5px/1.4 var(--sc-font-text); color: var(--soft);
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .4s var(--out), transform .5s var(--out), visibility 0s .4s; }
.gx-harm, .gx-flag { grid-row: 2; grid-column: 1; }
.gx-dec { grid-row: 3; grid-column: 1; }
.gx-harm svg, .gx-flag svg { width: 18px; height: 18px; flex: none; }
.gx-harm { background: rgb(255 120 120 / .07); box-shadow: inset 0 0 0 1px rgb(255 143 143 / .32); color: #ffe3e3; }
.gx-harm span { display: grid; gap: 3px; }
.gx-harm small { color: var(--r); font: 600 12px/1 var(--sc-font-text); }
.gx-harm svg { color: var(--r); }
.gx-flag { background: rgb(232 129 34 / .08); box-shadow: inset 0 0 0 1px rgb(232 129 34 / .55), 0 0 26px -10px rgb(232 129 34 / .6); color: var(--ink); }
.gx-flag svg { color: var(--a); }
.gx-flag span { display: grid; gap: 3px; }
.gx-flag small { color: #ffc58f; font: 600 12px/1 var(--sc-font-text); }
.gx-stage[data-s="2"] .gx-harm,
.gx-stage[data-s="3"] .gx-flag, .gx-stage[data-s="4"] .gx-flag, .gx-stage[data-s="4"] .gx-dec { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

/* the decision: a named role, amber until approved, then green */
.gx-dec { background: var(--fill); color: var(--soft); }
.gx-ini { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(232 129 34 / .16); color: #ffc58f; flex: none; }
.gx-ini svg { width: 18px; height: 18px; }
.gx-dec__t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.gx-dec__t b { color: var(--ink); font-weight: 600; }
.gx-btn { position: relative; display: grid; flex: none; }
.gx-btn > span { grid-area: 1 / 1; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 9px; font: 600 14px/1 var(--sc-font-text); transition: opacity .3s; }
.gx-btn__a { background: var(--a); color: #1a0e02; box-shadow: 0 0 18px -4px rgb(232 129 34 / .7); }
.gx-btn__d { opacity: 0; background: rgb(74 222 128 / .14); color: var(--g); }
.gx-btn__d svg { width: 14px; height: 14px; stroke-width: 2.2; }
.gx-stage.is-ok .gx-btn__a { opacity: 0; }
.gx-stage.is-ok .gx-btn__d { opacity: 1; }
.gx-stage.is-ok .gx-ini { background: rgb(74 222 128 / .14); color: var(--g); }

/* ---- #lose: the cost of not having a Digital Twin, a red failure log (2026-10-27). Rebuilt from Causely's "Without
   Causely" panel (https://www.causely.ai/, research/motion-references-2026-10/cost-of-no-twin/gal-causely-*): a red-dot label
   on dark glass, rows that land one by one, red rims, then the green "with" side, which here is the twin story below.
   Red means a failure, the fourth meaning colour beside violet (a Squid), amber (a person) and green (done). Lit, not
   lightened: a red rim and halo on dark glass. */
.gl { --rd: #ff7a72; --rd2: #ffb3ad; }
.gl h2 .hl, .gl [data-fill] .hl .fw.on { color: var(--rd) !important; }
.gl [data-fill] .hl .fw.lit, .gl h2 .hl:not(:has(.fw)) { text-shadow: 0 0 30px rgb(255 90 80 / .5); }
.gl-log { position: relative; margin: clamp(30px, 5vh, 48px) 0 0; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgb(44 16 26 / .74), rgb(15 10 22 / .9) 46%);
  box-shadow: inset 0 0 0 1px rgb(255 110 100 / .3), 0 0 90px -36px rgb(255 80 70 / .6); }
.gl-log::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--rd) 30%, var(--rd) 70%, transparent); opacity: .85; }
.gl-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid rgb(255 110 100 / .16);
  font: 500 12px/1 var(--sc-font-mono); letter-spacing: .08em; text-transform: uppercase; }
.gl-live { display: inline-flex; align-items: center; gap: 10px; color: var(--rd); }
.gl-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--rd); box-shadow: 0 0 0 0 rgb(255 110 100 / .6); animation: gl-pulse 1.8s ease-out infinite; }
@keyframes gl-pulse { 70% { box-shadow: 0 0 0 9px rgb(255 110 100 / 0); } 100% { box-shadow: 0 0 0 0 rgb(255 110 100 / 0); } }
.gl-n { color: #b9b2cc; }
.gl-n b { color: var(--rd2); font-weight: 600; }
.gl-rows { margin: 0; padding: 0; list-style: none; }
.gl-row { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 18px 24px;
  border-top: 1px solid rgb(255 255 255 / .06); transition: opacity .5s var(--out, ease-out), transform .5s var(--out, ease-out), background 1.2s; }
.gl-row:first-child { border-top: 0; }
.gl-row::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--rd); opacity: .55; }
.gl-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgb(255 110 100 / .12); color: var(--rd2); box-shadow: inset 0 0 0 1px rgb(255 110 100 / .22); }
.gl-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.gl-t { display: grid; gap: 4px; min-width: 0; }
.gl-t b { color: #f4f3ef; font: 600 17px/1.3 var(--sc-font-text); letter-spacing: -.01em; }
.gl-t span { color: #b9b2cc; font: 400 15px/1.45 var(--sc-font-text); }
.gl-sys { display: inline-flex; align-items: center; gap: 6px; justify-self: end; white-space: nowrap; }
.gl-sys em { padding: 6px 9px; border-radius: 7px; background: rgb(255 255 255 / .05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .1); color: #d8d2e8; font: 500 12px/1 var(--sc-font-mono); font-style: normal; }
.gl-sys s { color: var(--rd); font: 600 15px/1 var(--sc-font-text); text-decoration: none; }
/* the agent row: why AI agents fail in the same gaps. Violet, the agent colour, so it reads as a different kind of line
   from the red failures above it; it lands after the last failure. */
.gl-ag { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 18px; padding: 20px 24px;
  border-top: 1px solid rgb(154 107 255 / .22); background: linear-gradient(90deg, rgb(154 107 255 / .12), rgb(154 107 255 / .03)); }
.gl-ic--ag { background: rgb(154 107 255 / .16); color: #c9b6ff; box-shadow: inset 0 0 0 1px rgb(154 107 255 / .35), 0 0 22px -6px rgb(154 107 255 / .6); }
.gl-ag .gl-t b { color: #e4dcff; }
.gl-ag .gl-t span { color: #c7c0dc; }
.gl.is-js .gl-ag { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--out, ease-out), transform .6s var(--out, ease-out); }
.gl.is-js.is-done .gl-ag { opacity: 1; transform: none; }
.gl.is-js.is-done .gl-next { transition-delay: .5s; }
.gl-next { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-top: 1px solid rgb(74 222 128 / .18); background: rgb(74 222 128 / .05);
  color: #6ee79a; font: 500 12px/1 var(--sc-font-mono); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; }
.gl-next i { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 10px rgb(74 222 128 / .7); }
.gl-next:hover { background: rgb(74 222 128 / .1); }
.gl-next::after { content: "\2193"; margin-left: auto; font-size: 15px; }
/* motion: with JS the rows wait, then land one by one with a red flash (ind-gap.js); without JS they all show */
.gl.is-js .gl-row { opacity: 0; transform: translateY(10px); }
.gl.is-js .gl-row.is-in { opacity: 1; transform: none; }
.gl-row.is-new { background: rgb(255 90 80 / .1); }
.gl.is-js .gl-next { opacity: 0; transition: opacity .6s; }
.gl.is-js.is-done .gl-next { opacity: 1; }
@media (max-width: 860px) {
  .gx { height: 560vh; }
  .gx__in { padding-top: 56px; }
  .gx__h { margin-bottom: 14px; font-size: 26px; }
  .gx__body { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .gx-rail { display: flex; gap: 6px; }
  .gx-rail li { padding: 0; gap: 8px; font-size: 13px; }
  .gx-rail li::before { display: none; }
  .gx-rail li:not(.is-on) .gx-rail__t { display: none; }
  .gx-says { min-height: 5.4em; margin-bottom: 10px; font-size: 17px; }
  .gx-stage { gap: 10px; padding: 44px 12px 12px; }
  .gx-pair, .gx-stage[data-s="3"] .gx-pair, .gx-stage[data-s="4"] .gx-pair { grid-template-columns: minmax(0, 1fr); }
  .gx-link { height: 30px; }
  .gx-link i { left: 50%; right: auto; top: 4px; bottom: 4px; width: 0; height: auto; border-top: 0; border-left: 1.5px dashed rgb(255 255 255 / .22); }
  .gx-stage[data-s="3"] .gx-link i, .gx-stage[data-s="4"] .gx-link i { left: 50%; right: auto; border-top: 0; border-left: 2px solid var(--v); }
  .gx-link span { top: 50%; left: calc(50% + 12px); transform: translateY(-50%); }
  .gx-sys { padding: 12px 14px; }
  .gx-sys__f { font-size: 15px; }
  .gx-harm, .gx-flag, .gx-dec { min-height: 0; padding: 10px 12px; font-size: 14px; }
  .gx-dec { flex-wrap: wrap; }
  .gl-bar { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px 16px; }
  .gl-row { grid-template-columns: 32px minmax(0, 1fr); gap: 10px 12px; align-items: start; padding: 16px; }
  .gl-ic { width: 32px; height: 32px; border-radius: 8px; }
  .gl-ic svg { width: 17px; height: 17px; }
  .gl-t b { font-size: 16px; }
  .gl-t span { font-size: 14.5px; }
  .gl-sys { grid-column: 2; justify-self: start; flex-wrap: wrap; white-space: normal; }
  .gl-next { padding: 14px 16px; }
  .gl-ag { grid-template-columns: 32px minmax(0, 1fr); gap: 12px; align-items: start; padding: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .gl-live i { animation: none; }
  .gx { height: auto; }
  .gx__pin { position: static; height: auto; padding: 96px 0; }
  .gx-says { display: grid; gap: 8px; min-height: 0; }
  .gx-say { grid-area: auto; opacity: 1; transform: none; }
  .gx-rail { display: none; }
}
/* system name and kind stay on one line beside the "Acting now" tag */
.gx-sys__h b { white-space: nowrap; }
.gx-sys__h > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
