/* ============================================================
   CERNAL home page — "Journey into the cell"
   ------------------------------------------------------------
   Layers on style.css (tokens: --ink, --pipe-blue-soft, --acc-*,
   --cernal-red, --font-*). Scroll-driven: every chapter is a tall
   section holding one sticky 100vh stage; static/cell-home.js turns
   scroll position into a 0..1 progress value per chapter.

   Rules kept from the design system: no gradients, no glow, blue is
   environment, red marks one thing per frame (the key / trigger).
   Without JavaScript every step is simply stacked and readable.
   ============================================================ */

body.cj-home { background: var(--paper); }
body.cj-home footer.footer { position: relative; z-index: 3; margin-top: 0 !important; }

.cj { position: relative; }

/* the fixed cytoplasm canvas sits behind the first three chapters */
.cj-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; background: var(--paper);
}
.no-js .cj-canvas { display: none; }

.cj-ch { position: relative; z-index: 1; }
.cj-stick {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  overflow: hidden; display: flex; align-items: flex-end;
}
.cj-ch--clear { background: transparent; }
.cj-ch--pipe { background: var(--pipe-blue-soft); }
.cj-ch--paper { background: var(--paper); }

/* chapter heights = how long each scene lasts */
#ch-enter  { height: 240vh; }
#ch-print  { height: 340vh; }
#ch-focus  { height: 184vh; }
#ch-switch { height: 376vh; }
#ch-and    { height: 300vh; }
/* a clear chapter that follows a clear chapter starts where the last one stops pinning */
#ch-print, #ch-focus { margin-top: -100vh; }
#ch-build  { height: 208vh; }

/* ---------- text cards ---------- */
.cj-steps {
  position: relative; z-index: 4; width: 100%;
  padding: 0 16px 28px; pointer-events: none;
}
.cj-step {
  position: absolute; left: 16px; right: 16px; bottom: 28px;
  max-width: 460px; padding: 18px 20px 16px;
  background: var(--card); border: var(--border-w) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink); border-radius: 6px;
  opacity: 0; transform: translateY(22px);
  transition: opacity 320ms var(--ease-standard), transform 420ms var(--ease-standard);
  pointer-events: none;
}
.cj-step.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cj-step h2, .cj-step h3 {
  font-family: var(--font-display); font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  line-height: 1.12; margin: 6px 0 8px; border: 0; padding: 0;
}
.cj-step p { margin: 0 0 8px; color: var(--ink-2); font-size: 0.98rem; line-height: 1.5; }
.cj-step p:last-child { margin-bottom: 0; }
.cj-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--acc, var(--pipe-blue)); font-weight: 700;
}
.cj-step--blue   { --acc: var(--acc-blue); }
.cj-step--green  { --acc: var(--acc-green); }
.cj-step--teal   { --acc: var(--acc-teal); }
.cj-step--violet { --acc: var(--acc-violet); }
.cj-step--gold   { --acc: var(--acc-gold); }
.cj-step--red    { --acc: var(--cernal-red); }
.cj-key { color: var(--cernal-red); font-weight: 800; }
.cj-lock { color: var(--pipe-blue-deep); font-weight: 800; }

@media (min-width: 992px) {
  .cj-steps { padding: 0 48px 0; height: 100%; }
  .cj-step { left: 48px; right: auto; bottom: auto; top: 96px; width: 440px; }
  .cj-step--low { top: auto; bottom: 48px; }
  .cj-step--right { left: auto; right: 48px; }
}

/* ---------- hero overlay (chapter 1) ---------- */
.cj-hero {
  position: absolute; z-index: 4; left: 0; right: 0; top: 0;
  padding: 104px 16px 0; text-align: center; pointer-events: none;
  transition: opacity 200ms linear;
}
.cj-hero__plate {
  display: inline-block; max-width: min(92vw, 760px); padding: 18px 26px 20px;
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--ink);
}
.cj-hero__logo { display: block; height: 36px; width: auto; margin: 0 auto 10px; }
.cj-hero .cj-kicker { color: var(--pipe-blue); font-size: 12px; }
.cj-hero h1 {
  font-family: var(--font-display); font-weight: 700; margin: 10px auto 12px;
  font-size: clamp(2rem, 5.2vw, 3.8rem); line-height: 1.02; max-width: 15ch;
  letter-spacing: -0.02em; border: 0; padding: 0;
}
.cj-hero h1 em { font-style: normal; color: var(--pipe-blue); }
.cj-hero p { max-width: 52ch; margin: 0 auto; color: var(--ink-2); font-size: clamp(1rem, 1.6vw, 1.2rem); }
/* secondary plate paragraphs: smaller and tighter than the lead line, and
   left-aligned so the longer blocks do not read as ragged centred text */
.cj-hero p.cj-hero__sum,
.cj-hero p.cj-hero__how {
  max-width: 64ch; text-align: left; line-height: 1.38;
}
.cj-hero p.cj-hero__sum { font-size: 0.84rem; margin-top: 10px; }
.cj-hero p.cj-hero__how { font-size: 0.78rem; margin-top: 7px; }
.cj-hero .pill-btn { pointer-events: auto; margin-top: 14px; }
/* stacked widths: the taller plate has to stay inside one 100svh stage,
   so the type and the rhythm tighten rather than the plate overflowing */
@media (max-width: 991.98px) {
  .cj-hero { padding-top: 84px; }
  .cj-hero__plate { padding: 14px 18px 16px; }
  .cj-hero__logo { height: 32px; margin-bottom: 8px; }
  .cj-hero h1 { font-size: clamp(1.6rem, 4.6vw, 3.8rem); margin: 8px auto 10px; }
  .cj-hero p { font-size: clamp(0.92rem, 1.6vw, 1.2rem); }
  .cj-hero p.cj-hero__sum { font-size: 0.78rem; line-height: 1.34; margin-top: 9px; }
  .cj-hero p.cj-hero__how { font-size: 0.73rem; line-height: 1.34; margin-top: 6px; }
  .cj-hero .pill-btn { margin-top: 11px; }
}
/* short phones (e.g. 375x667): tighten further so the button is not clipped
   by the sticky stage */
@media (max-width: 991.98px) and (max-height: 700px) {
  .cj-hero { padding-top: 56px; }
  .cj-hero__logo { height: 26px; margin-bottom: 6px; }
  .cj-hero h1 { font-size: clamp(1.4rem, 4.2vw, 3.8rem); margin: 6px auto 8px; }
  .cj-hero p { font-size: clamp(0.86rem, 1.6vw, 1.2rem); }
  .cj-hero p.cj-hero__sum { font-size: 0.72rem; line-height: 1.3; margin-top: 7px; }
  .cj-hero p.cj-hero__how { font-size: 0.68rem; line-height: 1.3; margin-top: 5px; }
  .cj-hero .pill-btn { margin-top: 9px; }
}
.cj-skip { position: fixed; z-index: 20; top: 76px; right: 12px; background: var(--paper); box-shadow: var(--shadow-sm); visibility: hidden; opacity: 0; transition: opacity 200ms linear; }
.cj-skip.is-on { visibility: visible; opacity: 1; }
.no-js .cj-skip { display: none; }
@media (min-width: 992px) {
  .cj-skip { top: auto; bottom: 16px; right: 16px; }
  .js .cj-hero { right: 42%; bottom: 0; display: flex; align-items: center; justify-content: center; padding: 72px 24px 0; }
  .js .cj-hero__plate { display: block; max-width: 680px; }
  .js .cj-hero__logo { height: 48px; }
  .js .cj-hero h1 { max-width: none; font-size: clamp(2rem, 3.5vw, 3.1rem); }
  .js .cj-hero p { max-width: none; }
  .js .cj-hero p.cj-hero__sum { font-size: 0.9rem; }
  .js .cj-hero p.cj-hero__how { font-size: 0.82rem; }
}
/* short desktop viewports (e.g. 1280x720): tighten the plate's vertical rhythm
   so the taller card still fits inside one 100svh stage */
@media (min-width: 992px) and (max-height: 820px) {
  .js .cj-hero { padding-top: 60px; }
  .js .cj-hero__plate { padding: 14px 24px 16px; }
  .js .cj-hero h1 { font-size: clamp(1.8rem, 2.9vw, 2.6rem); margin: 8px auto 10px; }
  .js .cj-hero p { font-size: clamp(0.95rem, 1.3vw, 1.08rem); }
  .js .cj-hero p.cj-hero__sum { font-size: 0.86rem; line-height: 1.34; margin-top: 8px; }
  .js .cj-hero p.cj-hero__how { font-size: 0.79rem; line-height: 1.34; margin-top: 6px; }
  .js .cj-hero .pill-btn { margin-top: 11px; }
}

/* ---------- fingerprint label ---------- */
.cj-printlabel {
  position: absolute; z-index: 3; font-family: var(--font-mono); font-size: 12px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; background: var(--paper); color: var(--ink);
  border: var(--border-w) solid var(--ink); padding: 4px 10px; border-radius: 4px;
  opacity: 0; transition: opacity 250ms; pointer-events: none; transform: translate(-50%, 0);
}

/* ---------- SVG stages ---------- */
.cj-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.cj-svg text { font-family: var(--font-mono); }
.cj-lockkey { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; pointer-events: none; }
.cj-lockkey svg { width: min(86vw, 640px); height: auto; overflow: visible; }

/* ---------- depth readout + rail ---------- */
.cj-depth {
  position: fixed; left: 16px; bottom: 16px; z-index: 20; font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink);
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 4px;
  padding: 5px 9px 5px 9px; display: none; pointer-events: none;
}
.cj-depth b { color: var(--pipe-blue); }
.cj-depth i { display: inline-block; width: 28px; height: 0; border-top: 3px solid var(--ink); vertical-align: middle; margin-right: 8px; position: relative; }
.cj-depth i::before, .cj-depth i::after { content: ""; position: absolute; top: -8px; height: 10px; border-left: 2px solid var(--ink); }
.cj-depth--seq i { display: none; }
.cj-depth i::before { left: 0; } .cj-depth i::after { right: 0; }
.cj-rail {
  position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 20;
  display: none; flex-direction: column; gap: 10px;
}
.cj-rail a {
  display: block; width: 12px; height: 12px; border: var(--border-w) solid var(--ink);
  border-radius: 50%; background: var(--paper); position: relative;
  transition: transform var(--dur-fast) var(--ease-bounce), background var(--dur-fast);
}
.cj-rail a:hover { transform: scale(1.35); }
.cj-rail a.is-on { background: var(--pipe-blue); transform: scale(1.25); }
.cj-rail a span {
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%); white-space: nowrap;
  font-family: var(--font-mono); font-size: 11px; background: var(--ink); color: #fff;
  padding: 2px 7px; border-radius: 3px; opacity: 0; pointer-events: none; transition: opacity var(--dur-fast);
}
.cj-rail a:hover span, .cj-rail a:focus-visible span { opacity: 1; }
@media (min-width: 992px) { .cj-depth { display: block; } .cj-rail { display: flex; } }
.no-js .cj-depth, .no-js .cj-rail { display: none; }

/* ---------- AND gate controls ---------- */
.cj-and-ctl { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cj-toggle {
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 4px;
  padding: 7px 12px; cursor: pointer; box-shadow: 3px 3px 0 var(--ink); color: var(--ink);
  transition: transform var(--dur-fast), box-shadow var(--dur-fast);
}
.cj-toggle[aria-pressed="true"] { background: var(--cernal-red-soft); border-color: var(--cernal-red); color: var(--cernal-red-deep); box-shadow: 3px 3px 0 var(--cernal-red); }
.cj-toggle:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.cj-toggle:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.cj-verdict { font-family: var(--font-mono); font-size: 12px; margin-top: 10px; font-weight: 700; color: var(--ink); }

/* ---------- build chapter ---------- */
.cj-build-grid {
  position: absolute; z-index: 3; left: 0; right: 0; top: 84px; padding: 0 16px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 1100px; margin: 0 auto;
}
@media (min-width: 992px) { .cj-build-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; top: 104px; padding: 0 48px; } }
.cj-stn {
  background: var(--card); border: var(--border-w) solid var(--ink); border-radius: 6px;
  box-shadow: 4px 4px 0 var(--ink); padding: 10px 12px 12px; position: relative;
  opacity: calc(0.35 + 0.65 * var(--o, 0)); transition: none;
}
.cj-stn svg { display: block; width: 100%; height: auto; }
.cj-stn .cj-kicker { color: var(--acc); }
.cj-stn h3 { font-family: var(--font-display); font-size: 1.1rem; margin: 2px 0 4px; border: 0; padding: 0; }
.cj-stn p { margin: 0; font-size: 0.82rem; line-height: 1.38; color: var(--ink-2); }
.cj-ring-wrap { position: absolute; z-index: 3; left: 0; right: 0; bottom: 28px; display: grid; place-items: center; pointer-events: none; }
.cj-ring-wrap svg { width: min(92vw, 540px); height: auto; overflow: visible; }

/* ---------- videos + software button ---------- */
.cj-media { position: relative; z-index: 2; background: var(--paper); border-top: var(--border-w-bold) solid var(--ink); padding: 72px 0 64px; }
.cj-media h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 6px 0 24px; border: 0; padding: 0; }
.cj-media__grid { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 920px; margin-inline: auto; }
.cj-media__item { margin: 0; }
.cj-media__frame {
  position: relative; aspect-ratio: 16 / 9; background: var(--ink); border: var(--border-w) solid var(--ink);
  border-radius: 6px; box-shadow: 6px 6px 0 var(--ink); overflow: hidden;
}
.cj-media__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.cj-media__item figcaption { margin-top: 14px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.cj-media__btn {
  display: block; max-width: 920px; margin: 36px auto 0; padding: 20px 24px; text-align: center; text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(1.1rem, 2.4vw, 1.6rem); color: #fff;
  background: var(--cernal-red); border: var(--border-w) solid var(--ink); border-radius: 6px; box-shadow: 6px 6px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast);
}
.cj-media__btn:hover { color: #fff; transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
.cj-media__btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }

/* ---------- closing call to action ---------- */
.cj-cta { position: relative; z-index: 2; background: var(--pipe-blue-soft); border-top: var(--border-w-bold) solid var(--pipe-blue-deep); padding: 64px 0 72px; text-align: center; }
.cj-cta h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 0 0 18px; border: 0; padding: 0; }
.cj-cta__links { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.cj-cta__links a {
  font-family: var(--font-mono); font-weight: 700; font-size: 13px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 4px; padding: 10px 16px; box-shadow: 4px 4px 0 var(--ink);
  transition: transform var(--dur-fast) var(--ease-bounce), box-shadow var(--dur-fast);
}
.cj-cta__links a:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--ink); }
.cj-cta__links a.is-primary { background: var(--cernal-red); color: #fff; border-color: var(--ink); }

/* ---------- no-JS / reduced fallback: stack everything ---------- */
.no-js .cj-stick { position: relative; height: auto; min-height: 60vh; overflow: visible; padding: 96px 0 32px; }
.no-js .cj-ch { height: auto !important; }
.no-js .cj-steps { position: static; }
.no-js .cj-step { position: static; opacity: 1; transform: none; margin: 0 0 16px; }
.no-js .cj-ch--clear { background: var(--pipe-blue-soft); }
.no-js .cj-svg, .no-js .cj-lockkey, .no-js .cj-ring-wrap { display: none; }
.no-js .cj-build-grid { position: static; padding-top: 16px; }
.no-js .cj-stn { opacity: 1; }
.no-js .cj-hero { position: static; padding-top: 110px; background: var(--pipe-blue-soft); padding-bottom: 32px; }

@media (prefers-reduced-motion: reduce) {
  .cj-step { transition: none; }
}

/* ---------- hero story: the self-playing illustration (static/hero-story.js) ---------- */
.cj-story { display: none; }
.js .cj-story {
  display: block; position: absolute; z-index: 4; pointer-events: none;
  /* the stage starts under the navbar, so "bottom" is measured from below the visible screen */
  left: 16px; right: 16px; bottom: 80px;
  padding: 8px 10px 10px; background: var(--paper);
  border: var(--border-w) solid var(--ink); border-radius: 8px; box-shadow: 6px 6px 0 var(--ink);
}
.js .cj-story:not(.is-ready) { visibility: hidden; }
.cj-story__scene { position: relative; }
.cj-story svg { display: block; width: 100%; height: auto; }
/* a copy of the canvas cell that grows out of cell A when the visitor starts to scroll */
.cj-zoom { position: fixed; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 6; overflow: visible; }

.cj-story__bot {
  position: absolute; right: 1%; bottom: 3%; width: 19%; height: auto;
  transform-origin: 50% 100%; animation: cjBob 3.4s ease-in-out infinite;
}
@keyframes cjBob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-3%) rotate(1deg); }
}

/* the robot's line: large, with the stage name above it, and it blinks whenever the stage changes */
.cj-story__say {
  position: absolute; right: 1%; top: 2%; width: 30%; padding: 8px 10px 10px;
  background: var(--paper); border: var(--border-w) solid var(--ink); border-radius: 8px; box-shadow: 3px 3px 0 var(--ink);
  font-size: clamp(14px, 1.15vw, 17px); font-weight: 700; line-height: 1.25; color: var(--ink);
  opacity: 0; transition: opacity 200ms linear;
}
.cj-story__say.is-on { opacity: 1; }
.cj-story__say .k {
  display: block; margin-bottom: 3px; font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--pipe-blue-deep);
}
.cj-story__say.is-flash { animation: cjSayBlink 1.2s linear; }
@keyframes cjSayBlink {
  0%   { background: var(--pipe-blue-soft); transform: scale(0.93); }
  16%  { background: var(--paper); transform: scale(1.05); }
  32%  { background: var(--pipe-blue-soft); transform: scale(1); }
  48%  { background: var(--paper); }
  64%  { background: var(--pipe-blue-soft); }
  80%  { background: var(--paper); }
  100% { background: var(--paper); transform: none; }
}
.cj-story__say::after {
  content: ""; position: absolute; bottom: -8px; right: 24%; width: 12px; height: 12px;
  background: inherit; border-right: var(--border-w) solid var(--ink); border-bottom: var(--border-w) solid var(--ink);
  transform: rotate(45deg);
}

/* stage buttons: click one to play it from its start */
.cj-story__chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0; padding: 0; list-style: none; pointer-events: auto; }
.cj-story__chips button {
  min-height: 26px; padding: 4px 10px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--paper); color: var(--ink-2); border: var(--border-w) solid var(--ink-3); border-radius: 999px;
  transition: background 200ms linear, color 200ms linear, border-color 200ms linear;
}
.cj-story__chips button:hover { color: var(--ink); border-color: var(--ink); }
.cj-story__chips button:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.cj-story__chips button.is-done { color: var(--ink); border-color: var(--ink-2); }
.cj-story__chips button.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }
.cj-story__tag { margin: 6px 0 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--ink-2); }

/* the title card's subtitle */
.cj-hero p.cj-hero__sub { max-width: 62ch; margin: 8px auto 0; text-align: left; line-height: 1.5; font-size: 0.8rem; }

@media (min-width: 992px) {
  /* two panels of one size: the title card on the left, the illustration on the right.
     static/hero-story.js sets --cj-ph to the taller of the two so their heights match too. */
  .cj-stick { --cj-pw: clamp(380px, 44vw, 700px); }
  .js .cj-hero {
    left: 4vw; right: auto; width: var(--cj-pw); top: 0; bottom: 0;
    padding: 0 0 112px; display: flex; align-items: center;
  }
  .js .cj-hero__plate {
    display: flex; flex-direction: column; justify-content: center;
    width: 100%; max-width: none; min-height: var(--cj-ph, 0px); padding: 28px 36px 30px;
  }
  .js .cj-hero__logo { height: 52px; }
  .js .cj-hero h1 { font-size: clamp(1.7rem, 2.5vw, 2.6rem); line-height: 1.08; margin: 14px auto 12px; text-wrap: balance; }
  .js .cj-hero p.cj-hero__sub { font-size: clamp(0.95rem, 1.12vw, 1.12rem); margin-top: 4px; }
  .js .cj-hero .pill-btn { align-self: center; margin-top: 18px; }
  .js .cj-story {
    left: auto; right: 4vw; bottom: auto; top: calc(50% - 56px); transform: translateY(-50%);
    width: var(--cj-pw); min-height: var(--cj-ph, 0px); padding: 12px 12px 14px;
    display: flex; flex-direction: column; justify-content: center;
  }
}

/* phones: the title card and the illustration stack, and must both fit one 100svh stage */
@media (max-width: 991.98px) {
  .cj-hero .cj-skip-btn { display: none; }         /* the floating "to the project" pill already does this */
}
@media (max-width: 991.98px) and (max-height: 800px) {
  .cj-hero p.cj-hero__sub { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 991.98px) and (max-height: 760px) {
  .cj-hero p.cj-hero__sub { -webkit-line-clamp: 3; }
}
@media (max-width: 991.98px) and (max-height: 700px) {
  .cj-story__tag { display: none; }
  .js .cj-story { bottom: 76px; padding: 8px 10px 10px; }
  .cj-story__chips { gap: 4px; }
  .cj-story__chips button { font-size: 10px; padding: 3px 6px; min-height: 24px; letter-spacing: 0.02em; }
}
@media (max-width: 991.98px) and (max-height: 620px) {
  .cj-hero p.cj-hero__sub { display: none; }
  .cj-story__chips { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cj-story__bot { animation: none; }
  .cj-story__say.is-flash { animation: none; }
  .cj-story__say, .cj-story__chips button { transition: none; }
}

/* ---------- first screen: title-card buttons, robot beside the illustration, scale ruler ---------- */
.cj-story__guide { display: contents; }

/* the three title-card buttons are one group: the main action on top, the two ways on beneath it */
.cj-hero__actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  width: 100%; max-width: 480px; margin: 22px auto 0;
}
.js .cj-hero .cj-hero__actions .pill-btn {
  margin: 0; align-self: stretch; min-height: 2.6rem; font-size: 0.9rem; white-space: nowrap;
}
.js .cj-hero .cj-hero__actions .cj-hero__cta { grid-column: 1 / -1; min-height: 3.2rem; font-size: 1.1rem; }
.cj-hero__more span { display: inline-block; animation: cjNudge 1.4s ease-in-out infinite; }
@keyframes cjNudge {
  0%, 100% { transform: translateY(-1px); }
  50% { transform: translateY(3px); }
}

/* the robot's artwork points right: on the left of the illustration it faces the scene as drawn;
   on phones it stands on the right, so it is turned to face left */
.cj-story__bot { scale: -1 1; }

/* stages, ruler and label: one group, centred under the illustration */
.cj-story__foot { display: flex; flex-direction: column; align-items: center; }
.cj-story__chips { justify-content: center; }
.cj-story__tag { text-align: center; }
.cj-story__ruler { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 8px; width: 100%; }
.cj-story__ruler svg { display: block; width: 20%; height: 14px; overflow: visible; }  /* 10 µm = one cell's width */
.cj-story__ruler path { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; }
.cj-story__rulerlab {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-2);
}

@media (min-width: 992px) {
  .js .cj-hero__logo { height: 88px; }
  /* the left column holds the robot, so the group sits under the panels, not under the robot */
  .cj-story__foot { margin-left: 24%; width: 73.1%; }
  .cj-story__ruler svg { width: 25.8%; }
  /* the robot stands on the left of the illustration, its line directly above its head */
  .cj-story__guide {
    display: flex; flex-direction: column; justify-content: flex-end; gap: 10px;
    position: absolute; left: 1%; bottom: 2%; width: 23%;
  }
  .js .cj-story__guide .cj-story__say { position: relative; right: auto; top: auto; width: auto; }
  .js .cj-story__guide .cj-story__say::after { right: auto; left: 44%; }
  .cj-story__guide .cj-story__bot { position: static; width: 88%; align-self: center; scale: none; }
}

/* phones: only the main button stays in the title card (the skip pill at the top covers the rest) */
@media (max-width: 991.98px) {
  .cj-hero__more, .cj-hero__demo { display: none; }
  .cj-hero__actions { max-width: 340px; margin-top: 12px; }
  .js .cj-hero .cj-hero__actions .cj-hero__cta { min-height: 2.5rem; font-size: 0.9rem; }
  .cj-hero__logo { height: 40px; }
}
@media (max-width: 991.98px) and (max-height: 780px) {
  .cj-hero__logo { height: 32px; margin-bottom: 4px; }
  .cj-hero__actions { margin-top: 8px; }
  .cj-story__ruler { display: none; }
  .js .cj-hero .cj-hero__actions .cj-hero__cta { min-height: 2.2rem; }
}
@media (max-width: 991.98px) and (max-height: 700px) {
  .cj-hero__actions { display: none; }
  .cj-hero__logo { height: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  .cj-hero__more span { animation: none; }
}

/* the remaining title-card button spans the row, and the Watch & try heading lines up with the centred video */
.js .cj-hero .cj-hero__actions .cj-hero__more { grid-column: 1 / -1; }
.cj-media .container > .cj-kicker { display: block; max-width: 920px; margin-inline: auto; }
.cj-media .container > h2 { max-width: 920px; margin-inline: auto; }

/* the illustration card has no outline, only a blue edge at the right and bottom; the speech bubble takes the same blue */
.cj-story, .cj-story__say { --cj-edge: var(--pipe-blue); }
.js .cj-story { border: 0; box-shadow: 6px 6px 0 var(--cj-edge); }
.cj-story__say { border-color: var(--cj-edge); box-shadow: 3px 3px 0 var(--cj-edge); }
.cj-story__say::after { border-right-color: var(--cj-edge); border-bottom-color: var(--cj-edge); }

/* ---------- scroll cue: the card's blue edge runs on and turns into an arrow, with the button beneath it ---------- */
.cj-cue, .cj-arrow { display: none; }
@media (min-width: 992px) {
  .js .cj-arrow { display: block; position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; z-index: 4; }
  /* the same blue and thickness as the card's edge, so it reads as one line */
  .cj-arrow path { fill: none; stroke: var(--pipe-blue); stroke-width: 6; stroke-linejoin: round; }
  .cj-arrow #cjArrowLine { stroke-linecap: butt; }
  .cj-arrow #cjArrowHead { stroke-linecap: round; }
  .js .cj-cue { display: inline-flex; position: absolute; z-index: 5; left: 50%; top: 0; transform: translateX(-50%); padding: 0; background: none; border: 0; cursor: pointer; }
  .cj-cue__pill {
    display: inline-flex; align-items: center; min-height: 2.4rem; padding: 0.35rem 1.2rem;
    font-family: var(--font-sans); font-size: 0.95rem; font-weight: 700; line-height: 1.2; white-space: nowrap;
    color: var(--pipe-blue-deep); background: var(--pipe-blue-soft);
    border: 1.5px solid var(--pipe-blue-deep); border-radius: var(--radius-pill);
    transition: background-color 0.15s ease, color 0.15s ease;
  }
  .cj-cue:hover .cj-cue__pill, .cj-cue:focus-visible .cj-cue__pill { background: var(--pipe-blue-deep); color: #fff; }
  .cj-cue:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; border-radius: 999px; }
}
@media (prefers-reduced-motion: reduce) {
  .cj-cue__pill { transition: none; }
}

/* ---------- gate library chapter ---------- */
.cj-gates { position: relative; z-index: 2; background: var(--paper); border-top: var(--border-w-bold) solid var(--ink); padding: 72px 0 64px; }
.cj-gates .container > * { max-width: 1040px; margin-inline: auto; }
.cj-gates h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 6px auto 12px; border: 0; padding: 0; }
.cj-gates .cj-kicker { display: block; }
.cj-gates__lead { max-width: 62ch; margin-bottom: 28px; }
.cj-gates__art { display: block; width: 100%; max-width: 900px; height: auto; margin: 0 auto 32px; overflow: visible; }
.cj-gates__art .g-key { fill: var(--kc, var(--cernal-red)); stroke: var(--ink); stroke-width: 3; }
.cj-gates__art .g-keyhole { fill: var(--pipe-blue-soft); }
.cj-gates__art .g-ghost .g-key, .cj-gates__art .g-ghost { stroke-dasharray: 5 4; }
.cj-gates__art .g-lbody { fill: var(--pipe-blue); stroke: var(--ink); stroke-width: 3; }
.cj-gates__art .g-shackle { fill: none; stroke: var(--ink); stroke-width: 4.5; stroke-linecap: round; transform-box: fill-box; transform-origin: right bottom; }
.cj-gates__art .g-hole { fill: var(--pipe-blue-soft); }
.cj-gates__art .g-wire { fill: none; stroke: var(--pipe-blue); stroke-width: 3; stroke-linecap: round; }
.cj-gates__art .g-head { fill: none; stroke: var(--pipe-blue); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.cj-gates__art .g-chip { font-family: var(--font-mono); font-size: 13px; font-weight: 700; fill: var(--pipe-blue-deep); letter-spacing: 0.08em; }
.cj-gates__art .g-cap { font-family: var(--font-mono); font-size: 12px; fill: var(--ink-2); text-transform: uppercase; letter-spacing: 0.04em; }
.cj-gates__art .g-cap--lead { font-weight: 700; fill: var(--ink); }
.cj-gates__art .g-cell { fill: var(--paper); stroke: var(--ink-3); stroke-width: 3; }
.cj-gates__art .g-cell--on { fill: var(--acc-green-soft); stroke: var(--acc-green); }
.cj-gates__art .g-rna { fill: none; stroke-width: 3.5; stroke-linecap: round; }
.cj-gates__art .g-rna--grey { stroke: var(--ink-3); stroke-width: 3; }
.cj-gates__art .g-no { stroke: #7a0000; stroke-width: 4; stroke-linecap: round; }
.cj-gates__art .g-cap--head { fill: var(--pipe-blue-deep); font-weight: 700; }
.cj-gates__art .g-rays line { stroke: var(--acc-green); stroke-width: 3; stroke-linecap: round; }
.cj-gates__art .g-pulse { fill: var(--cernal-red); }
/* small left-to-right motion: keys bob, dashes and a pulse run to the lock, the lock opens, the cell glows */
@media (prefers-reduced-motion: no-preference) {
  .cj-gates__art .g-bob { animation: gBob 2.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
  .cj-gates__art .g-flow { stroke-dasharray: 9 7; animation: gFlow 1s linear infinite; }
  .cj-gates__art .g-pulse { animation: gRun 3.2s ease-in infinite; animation-delay: var(--d, 0s); }
  .cj-gates__art .g-lift { animation: gLift 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
  .cj-gates__art .g-rays { animation: gGlow 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
}
@keyframes gBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes gFlow { to { stroke-dashoffset: -16; } }
@keyframes gRun { 0% { transform: translateX(0); opacity: 0; } 10% { opacity: 1; } 70%, 100% { transform: translateX(var(--run)); opacity: 0; } }
@keyframes gLift { 0%, 55% { transform: none; } 70%, 90% { transform: rotate(-32deg) translateY(-3px); } 100% { transform: none; } }
@keyframes gGlow { 0%, 60% { opacity: 0.25; } 75%, 90% { opacity: 1; } 100% { opacity: 0.25; } }
.cj-gates .cj-media__btn { display: table; margin-inline: auto; }

/* ---------- the robot guide: one bubble per step, opposite the text card (desktop only) ---------- */
.cj-guide { display: none; }
@media (min-width: 992px) {
  .cj-guide {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    position: fixed; z-index: 19; right: 76px; bottom: 36px; width: 190px; pointer-events: none;
    opacity: 0; transform: translateY(14px); transition: opacity 300ms var(--ease-standard), transform 400ms var(--ease-standard);
  }
  .cj-guide.is-on { opacity: 1; transform: none; }
  .cj-guide--left { right: auto; left: 28px; bottom: 64px; }
  .cj-guide__say {
    position: relative; width: 100%; padding: 8px 10px 9px; box-sizing: border-box;
    background: var(--paper); border: var(--border-w) solid var(--pipe-blue); border-radius: 8px; box-shadow: 3px 3px 0 var(--pipe-blue);
    font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--ink);
  }
  .cj-guide__say::after {
    content: ""; position: absolute; bottom: -8px; left: 50%; margin-left: -6px; width: 12px; height: 12px;
    background: var(--paper); border-right: var(--border-w) solid var(--pipe-blue); border-bottom: var(--border-w) solid var(--pipe-blue);
    transform: rotate(45deg);
  }
  .cj-guide__say.is-flash { animation: cjSayBlink 1.2s linear; }
  .cj-guide__bot { width: 92px; height: auto; transform-origin: 50% 100%; animation: cjBob 3.4s ease-in-out infinite; }
  .cj-guide:not(.cj-guide--left) .cj-guide__bot { scale: -1 1; }   /* the artwork faces right: on the right it turns to face the page */
}
@media (prefers-reduced-motion: reduce) { .cj-guide__bot, .cj-guide__say.is-flash { animation: none; } .cj-guide { transition: none; } }

/* gate slide, second pass */
.cj-gates__art .g-lbody--ghost, .cj-gates__art .g-cell--ghost { fill: none; stroke: var(--ink-3); stroke-dasharray: 6 5; }
.cj-gates__art .g-shackle--ghost { stroke: var(--ink-3); stroke-dasharray: 5 4; }
.cj-gates__art .g-wire--ghost { stroke-dasharray: 6 6; opacity: 0.55; }
.cj-gates__art .g-block { stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.cj-gates__art .g-q { font-family: var(--font-display); font-size: 30px; font-weight: 700; fill: var(--ink-3); }
.cj-gates__art .g-tick { font-family: var(--font-mono); font-size: 13px; font-weight: 700; fill: var(--acc-green); }
.cj-gates__art .g-cap--small { font-size: 10px; }
.cj-gates__art .g-lbody { fill: var(--pipe-blue-soft); stroke: var(--pipe-blue-deep); }
.cj-gates__art .g-shackle { stroke: var(--pipe-blue-deep); }
.cj-gates__art .g-hole { stroke: var(--pipe-blue-deep); stroke-width: 1.5; }
.cj-gates__art .g-cap--lead { font-size: 14px; }
.cj-gates__art .g-cap { font-size: 12px; }

/* the robot guide, second pass: he stands under the text card, which is his speech bubble */
.cj-step--said::after {
  content: ""; position: absolute; left: 62px; bottom: -11px; width: 18px; height: 18px;
  background: var(--card); border-right: var(--border-w) solid var(--ink); border-bottom: var(--border-w) solid var(--ink);
  transform: rotate(45deg);
}
@media (min-width: 992px) {
  .cj-guide--card { right: auto; bottom: auto; width: auto; align-items: flex-start; }
  .cj-guide--card .cj-guide__say { display: none; }
  .cj-guide--card .cj-guide__bot { width: 108px; scale: none; }
}

/* ---------- why it matters ---------- */
.cj-why { position: relative; z-index: 2; background: var(--pipe-blue-soft); border-top: var(--border-w-bold) solid var(--ink); padding: 72px 0 64px; }
.cj-why .container > * { max-width: 1040px; margin-inline: auto; }
.cj-why .cj-kicker { display: block; }
.cj-why h2 { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); margin: 6px auto 12px; border: 0; padding: 0; text-wrap: balance; }
.cj-why__lead { max-width: 62ch; margin-bottom: 28px; }
.cj-why__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-bottom: 32px; align-items: start; }
.cj-why__col { display: flex; flex-direction: column; gap: 12px; }
.cj-why__card { background: var(--paper); border: var(--border-w) solid var(--acc); border-radius: 8px; box-shadow: 5px 5px 0 var(--acc); padding: 16px 18px 14px; }
.cj-why__card span { font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--acc); }
.cj-why__card h3 { font-size: 1.15rem; margin: 6px 0 6px; border: 0; padding: 0; }
.cj-why__card p { font-size: 0.93rem; margin: 0; color: var(--ink-2); }
.cj-why__sub { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--acc); margin: 14px 0 0; border: 0; padding: 0 0 0 10px; border-left: 4px solid var(--acc); }
.cj-stat { background: var(--paper); border: 1px solid var(--acc); border-left: 5px solid var(--acc); border-radius: 8px; padding: 12px 16px 12px; }
.cj-stat b { display: block; font-family: var(--font-display); font-size: 1.9rem; line-height: 1.1; color: var(--acc); }
.cj-stat p { font-size: 0.9rem; margin: 4px 0 0; color: var(--ink-2); }
.cj-stat--hero { background: var(--acc); border-color: var(--acc); }
.cj-stat--hero b { font-size: 2.6rem; color: #fff; }
.cj-stat--hero p { color: #fff; font-weight: 700; }
.cj-why__note { font-size: 0.8rem; color: var(--ink-2); margin: 0; }
.cj-why .cj-media__btn { display: table; margin-inline: auto; }
/* the card-less bubble stays in the left margin; with no margin to stand in, it is left out */
@media (min-width: 992px) { .cj-guide--left:not(.cj-guide--card) { left: 16px; width: 164px; } }
@media (max-width: 1279.98px) { .cj-guide:not(.cj-guide--card) { display: none; } }

/* the guide, third pass: one fixed spot. The text cards grow upward from just above him, so he never moves. */
@media (min-width: 992px) {
  .cj-stick { --gy: min(440px, calc(100svh - 190px)); }
  .cj-step:not(.cj-step--low):not(.cj-step--right) { top: auto; bottom: calc(100% - var(--gy)); }
  .cj-guide, .cj-guide--left, .cj-guide--card {
    display: block; left: 72px; right: auto; top: calc(min(440px, 100svh - 190px) + 12px); bottom: auto; width: 108px;
    transform: none; transition: opacity 400ms var(--ease-standard);
  }
  .cj-guide__bot { display: block; width: 108px; scale: none !important; }
  .cj-guide__say { position: absolute; bottom: calc(100% + 12px); left: -56px; width: 164px; transition: opacity 200ms linear; }
  .cj-guide__say::after { left: 62px; margin-left: 0; }
  .cj-guide--card .cj-guide__say, .cj-guide--mute .cj-guide__say { opacity: 0; visibility: hidden; }
}
@media (max-width: 1279.98px) { .cj-guide .cj-guide__say { display: none; } .cj-guide--aside { display: none; } }

/* supporters, in the title card */
.cj-hero__support { display: none; }
@media (min-width: 992px) {
  .js .cj-hero__support { display: block; margin-top: 22px; text-align: center; }
  .cj-hero__support span { display: block; margin-bottom: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
  .cj-hero__support ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .cj-hero__support li { padding: 5px 12px; font-size: 0.8rem; font-weight: 700; color: var(--pipe-blue-deep); border: 1.5px solid var(--pipe-blue); border-radius: 999px; }
  /* the text cards and the robot sit on the left, so the switch scene is drawn a little smaller, tucked to the right */
  #cjSwitch { transform: scale(0.82); transform-origin: 100% 100%; }
}

/* "why it matters", tidied: three equal columns that share their rows (card, label, stat, stat) */
.cj-why__grid { grid-template-columns: 1fr; row-gap: 12px; column-gap: 22px; align-items: stretch; }
.cj-why__col { display: contents; }
@media (min-width: 900px) {
  .cj-why__grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: auto auto auto auto; }
  .cj-why__col { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 12px; }
  .cj-why__card { height: 100%; box-sizing: border-box; }
  .cj-why__sub { align-self: end; margin: 8px 0 0; }
  .cj-stat { display: flex; flex-direction: column; justify-content: center; }
  .cj-stat--span { grid-row: 3 / 5; align-items: flex-start; }
  .cj-stat--span b { font-size: 2.6rem; }
}
.cj-why__note { text-align: center; margin: 4px auto 24px; }

/* supporters: logos instead of names */
@media (min-width: 992px) {
  .cj-hero__support ul { align-items: center; gap: 22px; }
  .cj-hero__support li { padding: 0; border: 0; border-radius: 0; line-height: 0; }
  .cj-hero__support img { display: block; width: auto; max-width: 150px; object-fit: contain; }
}

/* "why it matters" on white, flowing straight into the video */
.cj-why { background: var(--paper); padding-bottom: 8px; }
.cj-why__more { display: table; margin: 0 auto 36px; font-weight: 700; color: var(--pipe-blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.cj-why__more:hover { color: var(--ink); }
.cj-why__bridge { text-align: center; font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 700; margin: 0 auto; padding-bottom: 6px; color: var(--ink); }
.cj-why__bridge::after { content: "↓"; display: block; margin-top: 4px; font-size: 1.6rem; line-height: 1; color: var(--pipe-blue); }
.cj-why + .cj-media { border-top: 0; padding-top: 28px; }

/* reveal: each box slides in from the left as it scrolls into view, the columns one after another */
.js .cj-reveal { opacity: 0; transform: translateX(-36px); transition: opacity 600ms var(--ease-standard) var(--rv, 0s), transform 700ms var(--ease-standard) var(--rv, 0s); }
.js .cj-reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .cj-reveal { opacity: 1; transform: none; transition: none; } }

/* supporters: seven logos in the title card, and a slow scroller at the bottom of the page */
@media (min-width: 992px) {
  .cj-hero__support ul { gap: 12px 20px; }
  .cj-hero__support img { height: 30px; max-width: none; }
  .cj-hero__support li:nth-child(1) img { height: 34px; }
}
.cj-supporters { position: relative; z-index: 2; background: var(--paper); border-top: 1px solid var(--ink-3); padding: 28px 0 32px; text-align: center; }
.cj-supporters__title { font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin: 0 0 18px; border: 0; padding: 0; }
.cj-supporters__view { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cj-supporters__track { display: flex; align-items: center; gap: 64px; width: max-content; margin: 0; padding: 0; list-style: none; animation: cjSupport 40s linear infinite; }
.cj-supporters__view:hover .cj-supporters__track { animation-play-state: paused; }
.cj-supporters__track li { flex: none; line-height: 0; }
.cj-supporters__track img { display: block; height: 52px; width: auto; max-width: none; }
@keyframes cjSupport { to { transform: translateX(calc(-50% - 32px)); } }
@media (prefers-reduced-motion: reduce) {
  .cj-supporters__track { animation: none; width: auto; flex-wrap: wrap; justify-content: center; gap: 24px 40px; padding: 0 16px; }
  .cj-supporters__track li[aria-hidden="true"] { display: none; }
  .cj-supporters__view { -webkit-mask-image: none; mask-image: none; }
}

/* title card: a soft blue instead of white; the supporter logos stay on a white tray so their backgrounds blend in */
.js .cj-hero__plate { background: linear-gradient(180deg, #E3F0F9 0%, #D3E8F5 100%); }
@media (min-width: 992px) {
  .cj-hero__support ul { background: #fff; border-radius: 12px; padding: 12px 18px; border: 1px solid rgba(62, 92, 126, 0.25); }
}

/* "why it matters" without the top cards: the three headings lead, each over its numbers */
.cj-why__lead { margin-bottom: 36px; }
@media (min-width: 900px) {
  .cj-why__grid { grid-template-rows: auto auto auto; }
  .cj-why__col { grid-row: span 3; }
  .cj-stat--span { grid-row: 2 / 4; }
}
.cj-why__sub { font-family: var(--font-display); font-size: clamp(1.15rem, 1.7vw, 1.4rem); font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.2; margin: 0; padding: 2px 0 2px 12px; border-left-width: 6px; align-self: start; }
/* no intro paragraph under the title any more */
.cj-why h2 { margin-bottom: 32px; }

/* "why it matters", second look: solid colour blocks, icons, numbers that count up, boxes that lift */
.cj-why__sub { display: flex; align-items: center; gap: 12px; border-left: 0; padding: 0; }
.cj-why__icon { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; background: var(--acc); box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.cj-why__icon svg, .cj-stat__ghost svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cj-stat { position: relative; overflow: hidden; border: 0; border-left: 0; border-radius: 14px; padding: 16px 20px 16px; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.16); }
.cj-stat--solid { background: var(--acc); }
.cj-stat--solid b, .cj-stat--solid p { color: #fff; }
.cj-stat--soft { background: #fff; border: 2px solid var(--acc); box-shadow: 0 6px 0 var(--acc); }
.cj-stat--soft b { color: var(--acc); }
.cj-stat--soft p { color: var(--ink); }
.cj-stat b { font-size: 2.3rem; }
.cj-stat--span b { font-size: 3rem; }
.cj-stat p { font-weight: 600; }
.cj-stat__bar { display: block; height: 7px; margin-top: 12px; border-radius: 4px; background: rgba(255, 255, 255, 0.28); position: relative; overflow: hidden; }
.cj-stat--soft .cj-stat__bar { background: rgba(0, 0, 0, 0.08); }
.cj-stat__bar::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--v, 100%); border-radius: 4px; background: #fff; transform-origin: left; }
.cj-stat--soft .cj-stat__bar::after { background: var(--acc); }
.js .cj-stat__bar::after { transform: scaleX(0); transition: transform 1500ms var(--ease-standard) 300ms; }
.js .cj-reveal.is-in .cj-stat__bar::after { transform: scaleX(1); }
.cj-stat__ghost { position: absolute; right: -14px; bottom: -22px; opacity: 0.2; pointer-events: none; }
.cj-stat__ghost svg { width: 150px; height: 150px; stroke-width: 1.4; }
.cj-hand { transform-origin: 12px 13.5px; }
.cj-reveal.is-in:hover { transform: translateY(-6px); transition: transform 220ms var(--ease-standard), box-shadow 220ms; }
@media (prefers-reduced-motion: no-preference) {
  .cj-why__icon { animation: cjFloat 3.2s ease-in-out infinite; }
  .cj-why__icon--rise svg { animation: cjRise 2.4s ease-in-out infinite; }
  .cj-why__icon--pulse { animation: cjFloat 3.2s ease-in-out infinite, cjPulse 2.4s ease-in-out infinite; }
  .cj-hand { animation: cjTick 6s linear infinite; }
  .cj-stat__ghost .cj-hand { animation-duration: 12s; }
}
@keyframes cjFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -4px; } }
@keyframes cjRise { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(2px, -2px); } }
@keyframes cjPulse { 0%, 100% { scale: 1; } 50% { scale: 1.08; } }
@keyframes cjTick { to { transform: rotate(360deg); } }

/* proof of concept: the text and the two PoC links on the left, a smaller video on the right */
.cj-poc .container > .cj-kicker, .cj-poc .container > h2 { max-width: none; }
.cj-poc__grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: center; max-width: 1040px; margin-inline: auto; }
.cj-poc__text .cj-kicker { display: block; }
.cj-poc__text h2 { max-width: none; margin: 6px 0 12px; }
.cj-poc__text > p { max-width: 44ch; margin: 0 0 20px; }
.cj-poc__links { list-style: none; margin: 0 0 26px; padding: 0; display: grid; gap: 14px; }
.cj-poc__links a {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "tag title arrow" "tag sub arrow"; column-gap: 14px; align-items: center;
  padding: 14px 18px; text-decoration: none; color: var(--ink); background: #fff;
  border: 2px solid var(--acc); border-radius: 12px; box-shadow: 0 5px 0 var(--acc);
  transition: transform 180ms var(--ease-standard), box-shadow 180ms;
}
.cj-poc__links a:hover, .cj-poc__links a:focus-visible { transform: translateY(-4px); box-shadow: 0 9px 0 var(--acc); }
.cj-poc__links a:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
.cj-poc__tag { grid-area: tag; padding: 6px 10px; border-radius: 999px; background: var(--acc); color: #fff; font-family: var(--font-mono); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.cj-poc__links strong { grid-area: title; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
.cj-poc__links small { grid-area: sub; color: var(--ink-2); font-size: 0.88rem; }
.cj-poc__links i { grid-area: arrow; font-style: normal; font-weight: 700; font-size: 1.4rem; color: var(--acc); transition: transform 180ms var(--ease-standard); }
.cj-poc__links a:hover i { transform: translateX(4px); }
.cj-poc__video { margin: 0; }
@media (min-width: 900px) {
  .cj-poc__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); gap: 48px; }
}
@media (prefers-reduced-motion: reduce) { .cj-poc__links a, .cj-poc__links i { transition: none; } }
.cj-media .cj-poc__links { padding-left: 0; padding-right: 0; }

/* proof of concept, evened out: equal columns, the three PoC cards the same height, the button centred underneath */
.cj-poc .container { max-width: 1100px; }
.cj-poc__grid { align-items: stretch; }
.cj-poc__text { display: flex; flex-direction: column; justify-content: center; }
.cj-poc__links { margin-bottom: 0; }
.cj-poc__video { display: flex; flex-direction: column; justify-content: center; }
.cj-poc__video figcaption { text-align: center; }
.cj-media .cj-poc__cta { display: table; margin: 40px auto 0; }
.cj-why + .cj-media { padding-top: 56px; }
.cj-why__more { margin-bottom: 8px; }

/* proof of concept, third pass: the video is as tall as the text block and gets most of the width */
@media (min-width: 900px) {
  .cj-poc .container { max-width: 1240px; }
  .cj-poc__grid { max-width: 1160px; grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr); gap: 44px; align-items: stretch; }
  .cj-poc__video { display: flex; flex-direction: column; justify-content: flex-start; }
  .cj-poc__video .cj-media__frame { flex: 1; aspect-ratio: auto; min-height: 340px; height: auto; }
  .cj-poc__video .cj-media__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
  .cj-poc__links a { padding: 12px 18px; }
  .cj-poc__text h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
}
@media (min-width: 900px) {
  .cj-poc .container { max-width: 1100px; }
  .cj-poc__grid { max-width: 1040px; }
}

/* link to the full market analysis, under the market column */
.cj-why__report { align-self: start; justify-self: start; display: inline-flex; gap: 8px; align-items: center; margin-top: 4px; padding: 10px 18px; font-weight: 700; color: var(--acc); text-decoration: none; border: 2px solid var(--acc); border-radius: 999px; background: #fff; transition: background-color 160ms, color 160ms, transform 160ms var(--ease-standard); }
.cj-why__report:hover, .cj-why__report:focus-visible { background: var(--acc); color: #fff; transform: translateY(-2px); }
.cj-why__report:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
@media (min-width: 900px) {
  .cj-why__grid { grid-template-rows: auto auto auto auto; }
  .cj-why__col { grid-row: span 4; }
}
.cj-why__report { font-size: 0.88rem; padding: 10px 16px; justify-content: space-between; width: 100%; box-sizing: border-box; }

/* the way into the next slide */
.cj-why__next { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 40px auto 0; text-align: center; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: clamp(1.2rem, 2.2vw, 1.6rem); font-weight: 700; }
.cj-why__next i { font-style: normal; font-size: 1.8rem; line-height: 1; color: var(--pipe-blue); }
.cj-why__next:hover span, .cj-why__next:focus-visible span { text-decoration: underline; text-underline-offset: 5px; }
.cj-why__next:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 6px; border-radius: 6px; }
@media (prefers-reduced-motion: no-preference) { .cj-why__next i { animation: cjNudge 1.6s ease-in-out infinite; } }
.cj-why + .cj-media { padding-top: 40px; }
@media (min-width: 900px) { .cj-poc__video { margin-bottom: 6px; } }   /* the video frame ends exactly where the last PoC card ends */

/* proof-of-concept cards: their own colours (blue, violet, teal) and a cell icon each */
.cj-poc__links a { grid-template-columns: auto 1fr auto; grid-template-areas: "icon body arrow"; column-gap: 16px; padding: 12px 18px 12px 14px; }
.cj-poc__icon { grid-area: icon; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; border-radius: 50%; background: var(--acc); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
.cj-poc__icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cj-poc__icon .dot { fill: #fff; stroke: none; }
.cj-poc__body { grid-area: body; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.cj-poc__body .cj-poc__tag { padding: 3px 9px; font-size: 10px; margin-bottom: 3px; }
.cj-poc__links strong { grid-area: auto; }
.cj-poc__links small { grid-area: auto; }
@media (prefers-reduced-motion: no-preference) { .cj-poc__links a:hover .cj-poc__icon svg { animation: cjFloat 1.2s ease-in-out infinite; } }

/* the bridge into the proof: the three colours run down and join in one button, and a line carries on into the next slide */
.cj-bridge { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 1040px; margin: 36px auto 0; text-decoration: none; --p: 1; }
.cj-bridge__wires { display: none; width: 100%; height: 96px; overflow: visible; }
.cj-bridge__wires path { fill: none; stroke: var(--w); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }
.cj-bridge__pill {
  position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 10px; padding: 14px 28px; border-radius: 999px;
  background: var(--pipe-blue-deep); color: #fff; font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25); transition: transform 180ms var(--ease-standard), background-color 180ms;
}
.cj-bridge__pill i { font-style: normal; font-size: 1.3rem; line-height: 1; display: inline-block; }
.cj-bridge:hover .cj-bridge__pill, .cj-bridge:focus-visible .cj-bridge__pill { transform: translateY(-3px); background: var(--ink); }
.cj-bridge:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 6px; border-radius: 999px; }
.cj-bridge__tail { display: none; width: 5px; height: 56px; margin-top: -2px; background: linear-gradient(var(--pipe-blue-deep), var(--pipe-blue)); border-radius: 3px; transform-origin: top; transform: scaleY(var(--p)); }
@media (min-width: 900px) {
  .cj-bridge { margin-top: 28px; }
  .cj-bridge__wires, .cj-bridge__tail { display: block; }
  .cj-bridge__pill { margin-top: -3px; }
  .js .cj-bridge__pill { opacity: calc(0.25 + 0.75 * var(--p)); }
}
.cj-bridge.is-lit .cj-bridge__pill::after { content: ""; position: absolute; inset: -2px; border-radius: 999px; border: 3px solid var(--pipe-blue); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .cj-bridge.is-lit .cj-bridge__pill::after { animation: cjRipple 2.2s ease-out infinite; }
  .cj-bridge:hover .cj-bridge__pill i { animation: cjNudge 0.9s ease-in-out infinite; }
}
@keyframes cjRipple { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35, 1.9); } }
.cj-why + .cj-media { padding-top: 24px; }

/* the end of the page as one flow: the white proof slide melts into the blue, which carries on through the supporters to the footer */
.cj-poc { background: linear-gradient(180deg, #fff 0%, #fff 58%, var(--pipe-blue-soft) 100%); padding-bottom: 110px; }
.cj-poc + .cj-cta { border-top: 0; padding-top: 8px; }
.cj-cta + .cj-supporters { background: var(--pipe-blue-soft); border-top: 0; padding-top: 8px; }
.cj-cta + .cj-supporters .cj-supporters__view { background: #fff; border-radius: 18px; max-width: 1100px; margin: 0 auto; padding: 20px 0; box-shadow: 0 5px 0 rgba(62, 92, 126, 0.25); }
.cj-cta + .cj-supporters .cj-supporters__title { color: var(--pipe-blue-deep); }

/* the end of the page, tighter: smaller gaps from the button down to the footer, everything on one centre line */
.cj-poc { padding-bottom: 56px; }
.cj-media .cj-poc__cta { margin-top: 32px; }
.cj-poc + .cj-cta { padding: 0 0 20px; }
.cj-cta h2 { margin-bottom: 14px; }
.cj-cta + .cj-supporters { padding: 0 0 30px; }
.cj-cta + .cj-supporters .cj-supporters__title { margin-bottom: 10px; }
.cj-cta + .cj-supporters .cj-supporters__view { padding: 14px 0; }
.cj-cta__links { max-width: 1040px; margin-inline: auto; }
.cj-cta + .cj-supporters { padding-top: 14px; }

/* from the last blue slide into the white "why it matters": no line, the blue slowly turns to white */
.cj-why { border-top: 0; padding-top: 120px; }
.cj-why::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 260px; pointer-events: none; background: linear-gradient(180deg, var(--pipe-blue-soft) 0%, rgba(211, 232, 245, 0.55) 40%, #fff 100%); }
.cj-why > .container { position: relative; }

/* "Patent pending" on a diagonal ribbon across the corner of the 5-10 weeks box */
.cj-ribbon {
  position: absolute; top: 26px; right: -50px; z-index: 2; width: 210px; padding: 7px 0; text-align: center; transform: rotate(45deg);
  background: #fff; color: var(--acc-gold); font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25); overflow: hidden;
}
@media (prefers-reduced-motion: no-preference) {
  .cj-ribbon::after { content: ""; position: absolute; inset: 0 auto 0 -60%; width: 40%; background: linear-gradient(90deg, transparent, rgba(168, 124, 18, 0.35), transparent); transform: skewX(-20deg); animation: cjShine 4.5s ease-in-out infinite; }
}
@keyframes cjShine { 0%, 55% { left: -60%; } 100% { left: 130%; } }

/* "Patent pending" ribbon, second pass: sits further in so no letter is clipped, red with white letters so it stands out */
.cj-ribbon { top: 44px; right: -72px; width: 264px; padding: 8px 0; background: var(--cernal-red); color: #fff; font-size: 13px; letter-spacing: 0.14em; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); border-top: 2px solid rgba(255, 255, 255, 0.55); border-bottom: 2px solid rgba(255, 255, 255, 0.55); }
.cj-ribbon::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent); }

/* "Patent pending" ribbon, third pass: back to white, highlighted with dark-gold letters, gold edge stripes and a soft pulsing glow */
.cj-ribbon { background: #fff; color: #5C4000; font-weight: 800; font-size: 13px; letter-spacing: 0.14em; text-shadow: none; border-top: 3px solid var(--acc-gold); border-bottom: 3px solid var(--acc-gold); box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0.7); }
.cj-ribbon::after { background: linear-gradient(90deg, transparent, rgba(168, 124, 18, 0.4), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .cj-ribbon { animation: cjGlow 2.6s ease-in-out infinite; }
}
@keyframes cjGlow { 0%, 100% { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(255, 255, 255, 0); } 50% { box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3), 0 0 18px 4px rgba(255, 255, 255, 0.75); } }

/* narrow screens: the box is full width, so the heading drops below the "Patent pending" ribbon instead of running under it */
@media (max-width: 899.98px) {
  .cj-stat--span { padding-top: 62px; }
  .cj-ribbon { top: 38px; right: -66px; width: 240px; font-size: 12px; }
}
@media (max-width: 420px) {
  .cj-stat--span b { font-size: 2.5rem; }
  .cj-ribbon { top: 32px; right: -70px; width: 230px; font-size: 11px; letter-spacing: 0.12em; }
}

/* seven stage chips: a little smaller so they still sit on one line */
.cj-story__chips { gap: 5px; }
.cj-story__chips button { padding: 4px 8px; font-size: 10.5px; letter-spacing: 0.02em; }

/* the bar under the stages: the same moment, as a step in the software */
.cj-story__sw { display: grid; gap: 6px; width: 100%; margin-top: 10px; padding-top: 9px; border-top: 1px dashed var(--ink-3); pointer-events: none; }
.cj-story__swlab { font-family: var(--font-mono); font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--pipe-blue-deep); text-align: center; }
.cj-story__swbar { display: flex; gap: 4px; }
.cj-story__swbar i { flex: 1; height: 7px; border-radius: 4px; background: #DCE7F0; transition: background-color 250ms linear, transform 250ms var(--ease-standard); }
.cj-story__swbar i.is-done { background: var(--pipe-blue); }
.cj-story__swbar i.is-on { background: var(--pipe-blue-deep); transform: scaleY(1.5); }
.cj-story__swtxt { min-height: 2.5em; text-align: center; font-size: 13px; line-height: 1.25; color: var(--ink-2); }
.cj-story__swtxt b { color: var(--pipe-blue-deep); }
.cj-story__swtxt.is-flash { animation: cjSwIn 500ms var(--ease-standard); }
@keyframes cjSwIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .cj-story__swtxt.is-flash { animation: none; } .cj-story__swbar i { transition: none; } }
@media (max-width: 991.98px) and (max-height: 700px) { .cj-story__swtxt { display: none; } .cj-story__sw { margin-top: 6px; padding-top: 6px; } }

/* phones: the robot's line is a little narrower, so it stays in the free column beside the cells */
@media (max-width: 991.98px) { .js .cj-story__say { width: 28%; } }

/* Mobile opening screen: reserve the complete title/CTA before fitting the story.
   Desktop positioning and panel sizing remain in their existing >=992px rules. */
@media (max-width: 991.98px) {
  .js #ch-enter .cj-hero { padding-top: 20px; }
  .js #ch-enter .cj-hero__actions { display: grid; }
  .js #ch-enter .cj-hero .cj-hero__actions .cj-hero__cta {
    min-height: 44px; white-space: normal;
  }
  .js #ch-enter .cj-story {
    left: 50%; right: auto; bottom: auto;
    top: var(--cj-mobile-story-top, 320px);
    width: calc(100% - 32px);
    transform: translateX(-50%) scale(var(--cj-mobile-story-scale, 1));
    transform-origin: top center;
  }
}
