.type-hero:has(> .code-ambient),
body[data-service="development"],
[data-service="development"] :is(.expert-visual, .winter-footer) {
  position: relative;
  isolation: isolate;
}

.code-ambient {
  --code-ink: #38463a;
  --code-caret: #3c641f;
  --code-step: clamp(14px, 1.08vw, 18px);
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
  color: var(--code-ink);
  font: 400 clamp(10px, .86vw, 14px)/var(--code-step) ui-monospace, "SFMono-Regular", Consolas, monospace;
  letter-spacing: 0;
  text-align: left;
}
.code-ambient[data-code-scene="page"] { position: fixed; }
.code-ambient:is([data-code-scene="demo"], [data-code-scene="footer"]) {
  --code-ink: #bfceaf;
  --code-caret: #b7ff38;
}

.code-pane {
  position: absolute;
  width: min(35ch, 34%);
  overflow: hidden;
  opacity: .66;
  mask-image: linear-gradient(to right, black 78%, transparent);
  -webkit-mask-image: linear-gradient(to right, black 78%, transparent);
}
.code-pane > div { display: flex; flex-direction: column; }
.code-row {
  display: flex;
  height: var(--code-step);
  align-items: baseline;
  white-space: pre;
}
.code-row::before {
  content: attr(data-line);
  flex: 0 0 3.1ch;
  color: var(--code-ink);
  opacity: .46;
}
.code-row:not(:last-child) { opacity: .61; }
.code-row:first-child { opacity: .33; }
.code-row:last-child::after {
  content: "";
  flex: 0 0 .48ch;
  align-self: center;
  height: .9em;
  margin-left: .23ch;
  background: var(--code-caret);
}

[data-code-scene="home"] .code-pane:first-child { top: 7%; right: 2.8%; width: min(31ch, 28%); }
[data-code-scene="home"] .code-pane:nth-child(2) { top: 54%; left: 4.35%; width: min(35ch, 33%); }
[data-code-scene="page"] .code-pane:first-child { top: 12%; right: 2.5%; }
[data-code-scene="page"] .code-pane:nth-child(2) { bottom: 15%; left: 1.7%; opacity: .49; }
[data-code-scene="demo"] .code-pane { bottom: 5%; left: 4.5%; width: min(37ch, 36%); }
[data-code-scene="footer"] .code-pane { top: 35%; left: 46%; width: 25%; opacity: .36; }
[data-service="development"] :is(.expert-intro, .expert-screen, .expert-related, .scope-row dt, .scope-row dd, .expert-close p) {
  background-color: var(--ink);
}

@media (min-width: 721px) and (max-width: 1000px) {
  [data-code-scene="home"] .code-pane:nth-child(2) { display: none; }
}
@media (max-width: 720px) {
  .code-ambient { --code-step: 12px; font-size: 9px; }
  .code-pane { width: min(29ch, 45%); }
  [data-code-scene="home"] .code-pane:first-child { top: 2%; right: 4.5%; width: 44%; }
  .code-pane:nth-child(2) { display: none; }
  [data-code-scene="page"] .code-pane:first-child { top: 9.5%; right: 1.5%; opacity: .48; }
  [data-code-scene="demo"] .code-pane { top: 8px; left: auto; right: 1%; bottom: auto; width: 41%; opacity: .49; }
  [data-code-scene="footer"] .code-pane { top: 6px; left: 40%; width: 28%; opacity: .28; }
}
@media (prefers-reduced-motion: reduce) {
  .code-row:last-child::after { display: none; }
}
@media print, (forced-colors: active) { .code-ambient { display: none; } }
