.scene-systems {
  min-height: 100svh;
  padding: 0;
  background: #070b14;
}

/* Keep this scene's horizontal branch control in the breathing room above the data field. */
.scene-systems > .scene-side-arrow--right {
  top: calc(
    clamp(48px, 7vh, 78px) +
    32px +
    68px +
    18px +
    26px +
    clamp(17px, 2.5vh, 26px) -
    18px
  );
  bottom: auto;
}

.systems-section-mount {
  display: block;
  min-height: 100svh;
}

.systems-v2 {
  --systems-bg: #070b14;
  --systems-ink: #f2f1ed;
  --systems-muted: #8791a4;
  --systems-line: rgba(141, 165, 204, .28);
  --systems-violet: #956dff;
  --systems-cyan: #4edff2;
  --systems-lime: #b6f04a;
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  color: var(--systems-ink);
  background:
    radial-gradient(circle at 60% 45%, rgba(45, 73, 126, .08), transparent 42%),
    linear-gradient(135deg, #070b14 0%, #09101d 52%, #07101b 100%);
  font-family: var(--sans, "Manrope", sans-serif);
  isolation: isolate;
}

.systems-v2::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .24;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(124, 146, 184, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 146, 184, .02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

.systems-v2__ambient {
  position: absolute;
  z-index: -1;
  inset: 18% 8% auto;
  height: 52%;
  opacity: .38;
  filter: blur(80px);
  pointer-events: none;
  background:
    radial-gradient(circle at var(--pointer-x, 48%) var(--pointer-y, 50%), rgba(111, 76, 232, .12), transparent 26%),
    radial-gradient(circle at 58% 48%, rgba(59, 206, 225, .06), transparent 36%);
}

.systems-v2__shell {
  width: min(calc(100% - 128px), 1220px);
  min-height: 100svh;
  margin-inline: auto;
  padding: clamp(48px, 7vh, 78px) 0 clamp(42px, 6vh, 68px);
}

.systems-v2__header {
  display: block;
  padding: 0 0 clamp(34px, 5vh, 52px);
}

.systems-v2__eyebrow {
  margin: 0 0 22px;
  color: #8590a4;
  font: 10px/1 var(--mono, monospace);
  letter-spacing: .16em;
}

.systems-v2__heading h2 {
  max-width: none;
  margin: 0;
  color: var(--systems-ink);
  font-size: clamp(2.35rem, 4vw, 3.65rem);
  font-weight: 400;
  letter-spacing: -.065em;
  line-height: .98;
  white-space: nowrap;
}

.systems-v2__intro {
  max-width: none;
  margin: 18px 0 0;
  color: #b8bdc8;
  font-size: clamp(.98rem, 1.25vw, 1.18rem);
  line-height: 1.35;
  letter-spacing: -.02em;
  white-space: nowrap;
}

.systems-v2__field {
  --progress: 54%;
  position: relative;
  height: clamp(430px, 51vh, 520px);
  overflow: hidden;
  border: 1px solid var(--systems-line);
  background:
    radial-gradient(circle at 58% 48%, rgba(31, 49, 82, .17), transparent 42%),
    rgba(5, 10, 20, .58);
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .16), 0 26px 90px rgba(0, 0, 0, .16);
  cursor: crosshair;
  touch-action: pan-y;
}

.systems-v2__field::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  content: "";
  pointer-events: none;
  opacity: .55;
  background:
    radial-gradient(circle at var(--field-x, 50%) var(--field-y, 45%), rgba(149, 109, 255, .075), transparent 15%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, .012), transparent);
}

.systems-v2__canvas {
  position: absolute;
  inset: 0 0 72px;
  display: block;
  width: 100%;
  height: calc(100% - 72px);
}

.systems-v2__cursor-note {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(144, 154, 174, .66);
  font: 8px/1 var(--mono, monospace);
  letter-spacing: .13em;
  pointer-events: none;
}

.systems-v2__cursor-note span {
  width: 5px;
  height: 5px;
  border: 1px solid var(--systems-cyan);
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(78, 223, 242, .42);
}

.systems-v2__insight {
  position: absolute;
  z-index: 4;
  top: 38%;
  left: 80%;
  display: flex;
  width: min(19%, 220px);
  align-items: flex-start;
  gap: 14px;
  pointer-events: none;
  opacity: calc(.32 + var(--decision-opacity, .68));
  transform: translateY(-50%);
}

.systems-v2__insight-dot {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-top: 3px;
  border: 1px solid rgba(225, 255, 170, .8);
  border-radius: 50%;
  background: var(--systems-lime);
  box-shadow: 0 0 22px rgba(182, 240, 74, .34);
}

.systems-v2__insight p {
  margin: 0;
  color: #f1f0eb;
  font-size: clamp(.92rem, 1.4vw, 1.18rem);
  line-height: 1.28;
  letter-spacing: -.025em;
}

.systems-v2__control {
  position: absolute;
  z-index: 5;
  right: 28px;
  bottom: 20px;
  left: 28px;
}

.systems-v2__scale {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 11px;
  color: #788398;
  font: 10px/1 var(--mono, monospace);
  letter-spacing: .06em;
}

.systems-v2__scale span:nth-child(2) { color: #dddce3; text-align: center; }
.systems-v2__scale span:last-child { text-align: right; }
.systems-v2__range-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }

.systems-v2__control input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: ew-resize;
}

.systems-v2__control input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--systems-violet) 0 var(--progress), #172137 var(--progress) 100%);
  box-shadow: 0 0 12px rgba(149, 109, 255, .13);
}

.systems-v2__control input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  margin-top: -6px;
  appearance: none;
  border: 1px solid #fff;
  border-radius: 50%;
  background: #d9d9d7;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .08), 0 0 18px rgba(149, 109, 255, .42);
}

.systems-v2__control input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: #172137;
}

.systems-v2__control input[type="range"]::-moz-range-progress { height: 4px; background: var(--systems-violet); }
.systems-v2__control input[type="range"]::-moz-range-thumb { width: 17px; height: 17px; border: 1px solid #fff; border-radius: 50%; background: #d9d9d7; }
.systems-v2__control input[type="range"]:focus-visible { outline: 1px solid var(--systems-cyan); outline-offset: 7px; }

.systems-v2__footer {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr);
  gap: clamp(44px, 9vw, 128px);
  align-items: start;
  padding: clamp(30px, 4.5vh, 48px) 28px 0;
}

.systems-v2__footer > p {
  max-width: 760px;
  margin: 0;
  color: #dedde0;
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  line-height: 1.45;
  letter-spacing: -.025em;
}

.systems-v2__footer > div {
  display: grid;
  gap: 9px;
  padding-left: 22px;
  border-left: 1px solid rgba(149, 109, 255, .3);
}

.systems-v2__footer span {
  color: var(--systems-violet);
  font: 9px/1 var(--mono, monospace);
  letter-spacing: .13em;
}

.systems-v2__footer div p {
  max-width: 390px;
  margin: 0;
  color: var(--systems-muted);
  font-size: 11px;
  line-height: 1.6;
}

.systems-v2.is-entering .systems-v2__header,
.systems-v2.is-entering .systems-v2__field,
.systems-v2.is-entering .systems-v2__footer {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .systems-v2__shell { width: min(calc(100% - 72px), 1220px); }
  .systems-v2__header { padding-inline: 0; }
  .systems-v2__insight { left: 77%; width: 21%; }
  .systems-v2__footer { padding-inline: 12px; }
}

@media (max-width: 680px) {
  .scene-systems > .scene-side-arrow--right {
    top: auto;
    bottom: 18px;
    transform: none;
  }

  .systems-v2__shell { width: min(calc(100% - 30px), 600px); padding: 72px 0 54px; }
  .systems-v2__header { grid-template-columns: 1fr; gap: 18px; padding: 0 0 28px; }
  .systems-v2__eyebrow { margin-bottom: 17px; font-size: 9px; }
  .systems-v2__heading h2 { font-size: clamp(2.4rem, 11vw, 3.6rem); white-space: normal; }
  .systems-v2__intro { max-width: 94%; font-size: .98rem; white-space: normal; }
  .systems-v2__field { height: 610px; }
  .systems-v2__canvas { height: calc(100% - 78px); }
  .systems-v2__cursor-note { right: 12px; font-size: 7px; }
  .systems-v2__insight { top: 69%; left: 50%; width: 82%; justify-content: center; text-align: left; transform: translate(-50%, -50%); }
  .systems-v2__insight p { font-size: 1rem; }
  .systems-v2__control { right: 14px; bottom: 18px; left: 14px; }
  .systems-v2__scale { font-size: 8px; }
  .systems-v2__footer { grid-template-columns: 1fr; gap: 26px; padding: 30px 4px 0; }
  .systems-v2__footer > div { padding: 18px 0 0; border-top: 1px solid rgba(149, 109, 255, .3); border-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .systems-v2__field::before,
  .systems-v2__ambient { transition: none; }
}
