/* Compact interactive shells — phase + system + pricing; pairs with stephuary-interactive.js */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400&family=Inter:wght@400;500;600&family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400&display=swap');
@import url('stephuary-design-tokens.css');
@import url('stephuary-editorial.css');

:root {
  --sys-blue: #2b4fd4;
  --sys-blue-hi: #3a5ee0;
  --sys-gold: #c4a35a;
  --sys-ox: rgba(59, 13, 13, 0.35);
  --sys-reveal-duration: 0.55s;
}

#page-transition {
  position: fixed;
  inset: 0;
  z-index: 100000;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(ellipse 85% 75% at 50% 42%, rgba(6, 10, 22, 0.35), transparent 58%),
    linear-gradient(165deg, rgba(5, 5, 5, 0.97) 0%, rgba(8, 8, 7, 0.94) 45%, rgba(4, 6, 14, 0.98) 100%);
  transform: scale(1.04);
  transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
/* Block interaction only during outbound transition; entry overlay stays visual-only */
#page-transition.is-active {
  pointer-events: none;
  opacity: 1;
  transform: scale(1);
}
#page-transition.is-active.sh-outgoing {
  pointer-events: all;
  transform: scale(1.01);
  transition: opacity 0.26s cubic-bezier(0.22, 1, 0.36, 1), transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
#page-transition.sh-landing {
  opacity: 1;
  transform: scale(1.01);
  transition: none;
}
#page-transition.sh-landing.sh-revealing {
  opacity: 0;
  transform: scale(1);
  transition: opacity 0.48s cubic-bezier(0.22, 1, 0.36, 1), transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
html.sh-landing-pending {
  background: #050505;
}

body.sh-transition-out > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  transform: scale(var(--sh-exit-scale, 1.028)) translateZ(0);
  filter: brightness(0.94);
  transition:
    transform 0.26s cubic-bezier(0.22, 1, 0.36, 1),
    filter 0.26s ease;
}
body.sh-mobile-depth.sh-transition-out > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  transform: scale(1.014) translateZ(0);
}

body.sh-spatial-from-nav.sh-page-entry > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  opacity: 0;
  transform: translateY(18px) scale(0.998);
  transition: none;
}
body.sh-spatial-from-nav.sh-page-entry--reveal > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}

body.sh-page-soft-entry > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  opacity: 0;
  transform: translateY(12px);
  transition: none;
}
body.sh-page-soft-entry.sh-page-soft-entry--on > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.48s cubic-bezier(0.22, 1, 0.36, 1);
}

body.sh-page-ready.sh-has-env-depth > *:not(#sh-env-depth):not(#page-transition):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  transform: translateY(var(--sh-scroll-fg, 0px)) scale(var(--sh-scroll-scale, 1)) translateZ(0);
}
body.sh-page-entry:not(.sh-page-entry--reveal) > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap),
body.sh-page-soft-entry:not(.sh-page-soft-entry--on) > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  transition: none;
}

/* Compact header */
.sys-compact {
  position: relative;
  z-index: 2;
  max-height: min(50vh, 560px);
  min-height: 0;
  margin-top: 52px;
  padding: 0 20px 20px;
  overflow: hidden;
}
.sys-compact__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 0 0 4px 4px;
  background: linear-gradient(165deg, #050505 0%, rgba(59, 13, 13, 0.22) 42%, rgba(22, 35, 88, 0.2) 100%);
}
.sys-compact__bg canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.55;
  transition: opacity 1.1s ease;
}
body.sys-adaptive--dwell1 .sys-compact__bg canvas,
body.sys-adaptive--dwell2 .sys-compact__bg canvas,
body.sys-adaptive--dwell3 .sys-compact__bg canvas {
  opacity: 0.78;
}
body.sys-adaptive--dwell2 .sys-compact__bg canvas,
body.sys-adaptive--dwell3 .sys-compact__bg canvas {
  opacity: 0.84;
}
.sys-compact__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0 8px;
}
.sys-label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sys-gold);
  margin-bottom: 10px;
}
.sys-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: clamp(36px, 7vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: #f4ede0;
  margin-bottom: 10px;
}
.sys-lead {
  font-size: 15px;
  line-height: 1.55;
  color: rgba(203, 195, 180, 0.9);
  max-width: 40ch;
  margin: 0 auto 14px;
}

.sys-lead-note {
  font-size: 13px;
  line-height: 1.55;
  color: rgba(160, 152, 138, 0.92);
  max-width: 44ch;
  margin: 0 auto 12px;
}

.sys-visual {
  position: relative;
  height: 120px;
  max-width: 560px;
  margin: 12px auto 16px;
  border-radius: 4px;
  border: 1px solid rgba(244, 237, 224, 0.08);
  background: rgba(10, 9, 8, 0.45);
  overflow: hidden;
}
.sys-visual canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.sys-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.magnetic {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease;
}

.sys-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 28px;
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 2px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.35s ease, background 0.3s ease, border-color 0.3s ease, opacity 0.2s ease;
}
.sys-btn:active {
  transform: scale(0.97);
}
.sys-btn--pri {
  background: linear-gradient(165deg, #4d7cff 0%, var(--sys-blue) 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(43, 79, 212, 0.35);
}
.sys-btn--pri:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 36px rgba(43, 79, 212, 0.45);
}
.sys-btn--ghost {
  background: transparent;
  border-color: rgba(244, 237, 224, 0.12);
  color: rgba(160, 152, 137, 0.95);
}
.sys-btn--ghost:hover {
  border-color: rgba(58, 107, 255, 0.4);
  color: #f4ede0;
  transform: translateY(-1px) scale(1.02);
}

/* Layer stack (phase 3) */
.sys-visual[data-visual='layers'] {
  height: 140px;
}
.sys-layers {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 280px;
  margin: 0 auto;
  perspective: 400px;
}
.sys-layer {
  position: absolute;
  left: 50%;
  width: 88%;
  height: 44px;
  margin-left: -44%;
  border: 1px solid rgba(244, 237, 224, 0.1);
  border-radius: 4px;
  background: rgba(43, 79, 212, 0.06);
  transition: transform 0.45s ease, box-shadow 0.45s ease;
}
.sys-layer:nth-child(1) { top: 8px; transform: translateZ(0) translateY(0); }
.sys-layer:nth-child(2) { top: 38px; transform: translateZ(0) translateY(0); opacity: 0.85; }
.sys-layer:nth-child(3) { top: 68px; transform: translateZ(0) translateY(0); opacity: 0.65; }
.sys-visual:hover .sys-layer:nth-child(1) { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(43, 79, 212, 0.15); }
.sys-visual:hover .sys-layer:nth-child(2) { transform: translateY(-1px); }
.sys-visual:hover .sys-layer:nth-child(3) { transform: translateY(2px); }

/* System map (systems.html) */
.sh-system-map {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 12px;
}
.sh-map-node {
  flex: 1 1 140px;
  min-width: 120px;
  max-width: 200px;
  margin: 8px;
  padding: 22px 16px 20px;
  border: 1px solid rgba(244, 237, 224, 0.1);
  border-radius: 2px;
  background: rgba(13, 13, 11, 0.72);
  text-align: center;
  display: block;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}
.sh-map-node:hover {
  transform: translateY(-3px) scale(1.02);
  border-color: rgba(58, 107, 255, 0.45);
  box-shadow: 0 8px 36px rgba(43, 79, 212, 0.22);
}
.sh-map-node:active {
  transform: scale(0.98);
}
.sh-map-node__label {
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #c4a35a;
  margin-bottom: 10px;
  display: block;
}
.sh-map-node__name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 300;
  color: #f4ede0;
  letter-spacing: -0.02em;
  display: block;
}
.sh-map-connector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  flex-shrink: 0;
  color: rgba(110, 101, 88, 0.7);
  font-size: 14px;
  user-select: none;
}
@media (max-width: 720px) {
  .sh-map-connector {
    width: 100%;
    height: 20px;
    transform: rotate(90deg);
  }
  .sh-system-map {
    flex-direction: column;
    align-items: center;
  }
  .sh-map-node {
    max-width: 280px;
    width: 100%;
  }
}

/* Pricing tier meta */
.tier-meta {
  font-size: 13px;
  color: var(--text-4, #6e6558);
  margin-bottom: 12px;
  line-height: 1.5;
}
.tier-block {
  margin-bottom: 18px;
}
.tier-block h4 {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold, #c4a35a);
  margin-bottom: 8px;
  font-weight: 400;
  opacity: 0.9;
}
.price-acc[open] {
  box-shadow: 0 0 0 1px rgba(43, 79, 212, 0.12);
}

/* ——— Adaptive layer (dwell, scroll, progress, microfeedback) ——— */
body.sys-adaptive--dwell1 .sys-btn--pri,
body.sys-adaptive--dwell1 .tier-cta-primary,
body.sys-adaptive--dwell1 .btn--pri {
  box-shadow:
    0 0 0 1px rgba(58, 107, 255, 0.32),
    0 6px 26px rgba(43, 79, 212, 0.22);
}

@keyframes sysCtaPulseOnce {
  0% {
    box-shadow: 0 0 0 0 rgba(58, 107, 255, 0.35);
  }
  45% {
    box-shadow: 0 0 0 5px rgba(58, 107, 255, 0.12);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(58, 107, 255, 0);
  }
}
.sys-adaptive-cta-pulse.sys-btn--pri,
.sys-adaptive-cta-pulse.tier-cta-primary,
.sys-adaptive-cta-pulse.btn--pri {
  animation: sysCtaPulseOnce 1.05s ease-out 1 forwards;
}

body.sys-adaptive--dwell2 .sys-title {
  color: #f6efe4;
}
body.sys-adaptive--dwell2 .sys-lead {
  color: rgba(228, 220, 206, 0.96);
}

body.sys-adaptive--dwell3 .sys-btn--ghost,
body.sys-adaptive--dwell3 .btn--ghost {
  opacity: 1;
  border-color: rgba(196, 163, 90, 0.38);
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.14);
}

body.sys-adaptive--dwell3 .tier-cta-ghost {
  opacity: 1;
  border-color: rgba(196, 163, 90, 0.28);
}

.sys-adaptive--nearby {
  box-shadow:
    0 0 0 1px rgba(58, 107, 255, 0.32),
    0 8px 28px rgba(43, 79, 212, 0.12) !important;
  transition: box-shadow 0.45s ease !important;
}

.sys-adaptive--clicked {
  transform: scale(0.98);
  transition: transform 0.1s ease;
}

/* In-flow phase progress bar (capture / monetize / structure / automation / sovereignty) */
.progress-bar-wrap--collapsible .progress-meta {
  flex-wrap: nowrap;
  align-items: center;
}
.progress-bar-meta-end {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.progress-bar-toggle {
  flex-shrink: 0;
  width: 32px;
  height: 30px;
  padding: 0;
  border: 1px solid rgba(244, 237, 224, 0.14);
  border-radius: 2px;
  background: rgba(18, 17, 15, 0.85);
  color: rgba(196, 163, 90, 0.9);
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.progress-bar-toggle:hover {
  border-color: rgba(58, 107, 255, 0.45);
  background: rgba(43, 79, 212, 0.12);
  color: #f4ede0;
}
.progress-bar-toggle__icon {
  display: inline-block;
  transition: transform 0.25s ease;
}
.progress-bar-wrap--collapsed .progress-bar-toggle__icon {
  transform: rotate(-90deg);
}
.progress-bar-wrap--collapsed .progress-track {
  display: none !important;
}

.sys-phase-rail-wrap {
  position: fixed;
  left: max(12px, env(safe-area-inset-left, 0px));
  bottom: max(14px, env(safe-area-inset-bottom, 0px));
  z-index: 152;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  pointer-events: none;
}
.sys-phase-rail-wrap > * {
  pointer-events: auto;
}
.sys-phase-rail-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  max-width: min(100vw - 24px, 420px);
}
.sys-phase-rail-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 2px;
  border: 1px solid rgba(154, 130, 96, 0.22);
  background: rgba(10, 9, 8, 0.92);
  color: rgba(232, 224, 212, 0.82);
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  transition: border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.sys-phase-rail-nav__link:hover {
  border-color: rgba(58, 107, 255, 0.38);
  color: rgba(244, 237, 224, 0.95);
}
.sys-phase-rail-nav__hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 2px;
  border: 1px solid rgba(43, 79, 212, 0.28);
  background: rgba(43, 79, 212, 0.12);
  color: rgba(196, 163, 90, 0.95);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
.sys-phase-rail-nav__hub:hover {
  border-color: rgba(58, 107, 255, 0.45);
  background: rgba(43, 79, 212, 0.2);
}
.sys-phase-rail {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.sys-phase-rail__dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  min-height: 32px;
  padding: 4px;
  border-radius: 2px;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: rgba(244, 237, 224, 0.45);
  border: 1px solid rgba(244, 237, 224, 0.1);
  background: rgba(244, 237, 224, 0.04);
  transition: background 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease, color 0.35s ease;
}
.sys-phase-rail__dot:hover {
  color: rgba(244, 237, 224, 0.88);
  border-color: rgba(58, 107, 255, 0.28);
}
.sys-phase-rail__dot.is-visited {
  border-color: rgba(196, 163, 90, 0.42);
  background: rgba(196, 163, 90, 0.12);
  color: rgba(232, 224, 212, 0.75);
}
.sys-phase-rail__dot.is-current {
  background: rgba(43, 79, 212, 0.45);
  border-color: rgba(58, 107, 255, 0.48);
  color: rgba(244, 237, 224, 0.95);
  box-shadow: 0 0 14px rgba(43, 79, 212, 0.28);
}

.sh-map-node.is-phase-visited {
  border-color: rgba(196, 163, 90, 0.38) !important;
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.18);
}
.sh-map-node.is-phase-current {
  border-color: rgba(58, 107, 255, 0.42) !important;
  box-shadow: 0 0 22px rgba(43, 79, 212, 0.22);
}

a.phase-card.is-phase-visited {
  outline: 1px solid rgba(196, 163, 90, 0.35);
  outline-offset: 3px;
}
a.phase-card.is-phase-current {
  outline: 1px solid rgba(58, 107, 255, 0.45);
  outline-offset: 3px;
}

[data-reveal],
.st-reveal {
  transition: opacity var(--sys-reveal-duration, 0.55s) ease;
}

/* ——— Live output panel ——— */
.sh-live-panel {
  --sh-panel-bottom: 24px;
  --sh-panel-inline: 24px;
  box-sizing: border-box;
  position: fixed;
  left: auto;
  right: var(--sh-panel-inline);
  bottom: var(--sh-panel-bottom);
  width: min(340px, calc(100vw - 48px));
  max-width: 340px;
  min-width: min(300px, calc(100vw - 48px));
  z-index: 158;
  max-height: calc(100vh - var(--sh-panel-bottom) - 16px);
  max-height: calc(100dvh - var(--sh-panel-bottom) - 16px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.55s ease;
}
.sh-live-panel--visible {
  opacity: 1;
  pointer-events: auto;
}
.sh-live-panel__chrome {
  position: relative;
  border-radius: 3px;
  border: 1px solid rgba(244, 237, 224, 0.12);
  background: rgba(8, 8, 7, 0.92);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px);
  padding: 12px 12px 10px;
}
.sh-live-panel__min {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(244, 237, 224, 0.18);
  border-radius: 2px;
  background: rgba(18, 17, 15, 0.95);
  color: rgba(244, 237, 224, 0.92);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.sh-live-panel__min:hover {
  background: rgba(58, 107, 255, 0.2);
  border-color: rgba(58, 107, 255, 0.45);
  color: #f4ede0;
}
.sh-live-panel__top {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
  padding-right: 40px;
}
.sh-live-panel__phase {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 300;
  letter-spacing: -0.02em;
  color: #f4ede0;
  line-height: 1.25;
}
.sh-live-panel__status {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(196, 163, 90, 0.75);
}
.sh-live-panel__metrics {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.sh-live-panel__metrics > div {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: baseline;
  border-top: 1px solid rgba(244, 237, 224, 0.06);
  padding-top: 8px;
}
.sh-live-panel__metrics > div:first-of-type {
  border-top: none;
  padding-top: 0;
}
.sh-live-panel__metrics dt {
  margin: 0;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(110, 101, 88, 0.95);
}
.sh-live-panel__metrics dd {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(244, 237, 224, 0.92);
  text-align: right;
}
.sh-live-panel__summary {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(58, 107, 255, 0.15);
}
.sh-live-panel__summary-pre {
  margin: 0;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  white-space: pre-wrap;
  word-break: break-word;
  color: rgba(203, 195, 180, 0.88);
  max-height: 140px;
  overflow: auto;
}
.sh-live-panel__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sh-live-panel__btn {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 8px;
  border-radius: 2px;
  border: 1px solid rgba(244, 237, 224, 0.1);
  background: rgba(43, 79, 212, 0.12);
  color: rgba(244, 237, 224, 0.85);
  font-family: inherit;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}
.sh-live-panel__btn:hover {
  border-color: rgba(58, 107, 255, 0.4);
  background: rgba(43, 79, 212, 0.22);
}
.sh-live-panel__dock {
  display: none;
  position: fixed;
  left: auto;
  right: var(--sh-panel-inline, 24px);
  bottom: var(--sh-panel-bottom, 24px);
  z-index: 158;
  box-sizing: border-box;
  max-width: min(340px, calc(100vw - 48px));
  padding: 8px 12px;
  border-radius: 2px;
  border: 1px solid rgba(196, 163, 90, 0.25);
  background: rgba(8, 8, 7, 0.9);
  color: rgba(196, 163, 90, 0.95);
  font-family: 'DM Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.sh-live-panel--collapsed .sh-live-panel__chrome {
  display: none;
}
.sh-live-panel--collapsed .sh-live-panel__dock {
  display: block;
  pointer-events: auto;
}
/* Collapsed: panel shell must not capture wheel/touch — only the dock is interactive */
.sh-live-panel--collapsed.sh-live-panel--visible {
  opacity: 1;
  pointer-events: none;
}

/* Tablet / narrow: compact dock pill, capped expanded height, safe area */
@media (max-width: 979px) {
  body.sh-has-live-panel {
    padding-bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  }
  body.sh-has-live-panel.sh-live-panel-expanded-mobile {
    padding-bottom: calc(min(46vh, 300px) + 20px + env(safe-area-inset-bottom, 0px));
  }
  body.sh-has-live-panel.has-flow-end {
    padding-bottom: calc(52px + min(100px, 22vh) + env(safe-area-inset-bottom, 0px));
  }
  body.sh-has-live-panel.has-flow-end.sh-live-panel-expanded-mobile {
    padding-bottom: calc(min(46vh, 300px) + min(100px, 22vh) + 24px + env(safe-area-inset-bottom, 0px));
  }
  .sh-live-panel {
    --sh-panel-inline: 12px;
    --sh-panel-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    left: auto;
    right: auto;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0;
    max-height: min(48vh, 320px);
    z-index: 158;
  }
  .sh-live-panel:not(.sh-live-panel--collapsed) {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
    padding: 0 max(12px, env(safe-area-inset-left, 0px)) 0 max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
  }
  .sh-live-panel:not(.sh-live-panel--collapsed) .sh-live-panel__chrome {
    max-height: min(42vh, 280px);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex: 0 1 auto;
    pointer-events: auto;
    margin-bottom: 0;
  }
  .sh-live-panel--collapsed .sh-live-panel__dock {
    position: fixed;
    left: auto !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: min(220px, calc(100vw - 24px)) !important;
    min-width: 0;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 8px;
    letter-spacing: 0.12em;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    z-index: 158;
  }
  .sh-live-panel__dock {
    left: auto !important;
    right: max(12px, env(safe-area-inset-right, 0px)) !important;
    bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: min(220px, calc(100vw - 24px)) !important;
    border-radius: 999px;
    padding: 8px 16px;
  }
  /* Phase pages with fixed bottom flow bar: keep pill + panel above it */
  body.has-flow-end .sh-live-panel--collapsed .sh-live-panel__dock {
    bottom: calc(12px + min(108px, 26vh) + env(safe-area-inset-bottom, 0px)) !important;
  }
  body.has-flow-end .sh-live-panel:not(.sh-live-panel--collapsed) {
    bottom: calc(12px + min(108px, 26vh) + env(safe-area-inset-bottom, 0px)) !important;
    top: auto;
  }
}

/* Flow bar sits above page content; keep scroll clearance when CTAs wrap on small screens */
body.has-flow-end {
  padding-bottom: max(120px, min(28vh, 200px));
}
@media (max-width: 767px) {
  body.has-flow-end {
    padding-bottom: max(140px, min(36vh, 220px));
  }
}

/* Flow bar clearance: keep panel above fixed bar */
body.has-flow-end .sh-live-panel {
  --sh-panel-bottom: calc(24px + min(100px, 22vh));
  bottom: var(--sh-panel-bottom);
}
@media (max-width: 979px) {
  body.has-flow-end .sh-live-panel {
    --sh-panel-bottom: calc(16px + min(108px, 26vh) + env(safe-area-inset-bottom, 0px));
  }
}

body.has-flow-end .sys-phase-rail-wrap {
  bottom: calc(14px + min(100px, 22vh));
}
@media (max-width: 979px) {
  body.has-flow-end .sys-phase-rail-wrap {
    bottom: calc(16px + min(108px, 26vh) + env(safe-area-inset-bottom, 0px));
  }
}

.sh-flow-end[hidden] {
  display: none !important;
}

.sh-flow-end {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(244, 237, 224, 0.08);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: 'DM Mono', ui-monospace, monospace;
}
.sh-flow-end__saved {
  margin: 0 0 10px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(196, 163, 90, 0.75);
  text-align: center;
}
.sh-flow-end__row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  justify-content: center;
  align-items: center;
  max-width: 920px;
  margin: 0 auto;
}

.sh-flow-end__row--single {
  flex-direction: column;
  gap: 10px;
}

.sh-flow-end__pri,
.sh-flow-end__sec,
.sh-flow-end__ter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 2px;
  font-size: 8px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease;
}
.sh-flow-end__pri {
  background: linear-gradient(165deg, #4d7cff 0%, #3a6bff 100%);
  color: #fff;
  border: 1px solid transparent;
  min-width: min(280px, 88vw);
  padding: 12px 20px;
}
.sh-flow-end__sec {
  background: rgba(43, 79, 212, 0.18);
  color: rgba(244, 237, 224, 0.9);
  border: 1px solid rgba(244, 237, 224, 0.12);
}
.sh-flow-end__ter {
  background: transparent;
  color: rgba(180, 172, 160, 0.9);
  border: 1px solid rgba(244, 237, 224, 0.08);
}

.sh-flow-end__exit {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(180, 172, 160, 0.65);
  padding: 6px 8px;
  border: none;
  background: transparent;
}

.sh-flow-end__exit:hover {
  color: rgba(244, 237, 224, 0.95);
}

.sh-flow-end__pri:hover {
  filter: brightness(1.06);
}
.sh-flow-end__sec:hover,
.sh-flow-end__ter:hover {
  border-color: rgba(58, 107, 255, 0.35);
  color: #f4ede0;
}

.sh-live-panel__note {
  margin: 8px 0 0;
  font-size: 9px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: rgba(203, 195, 180, 0.88);
}
.sh-live-panel__save {
  margin: 8px 0 0;
  text-align: center;
}
.sh-live-panel__rec {
  margin: 6px 0 0;
  font-size: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(110, 101, 88, 0.95);
  line-height: 1.4;
  max-width: 100%;
}

body.sh-behavior--fast {
  --sys-reveal-duration: 0.38s;
}

/* System map · progress memory (personalization) */
.sh-system-map .sh-map-node.sh-map-node--visited {
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.32);
}
.sh-system-map .sh-map-node.sh-map-node--current {
  box-shadow: 0 0 0 1px rgba(43, 79, 212, 0.42), 0 0 26px rgba(43, 79, 212, 0.12);
}
.sh-system-map .sh-map-node {
  transition: box-shadow 0.35s ease;
}

/* Global orientation map (Diagnostic → Custom) */
.sh-global-map-wrap {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}
.sh-global-map {
  border: 1px solid rgba(244, 237, 224, 0.08);
  background: rgba(8, 8, 7, 0.45);
  border-radius: 2px;
  padding: 14px 16px 16px;
  margin: 0 auto;
}
.sh-global-map--minimal {
  padding: 10px 12px;
}
.sh-global-map--full {
  padding: 18px 20px 20px;
}
.sh-global-map__you {
  font-family: 'DM Mono', monospace;
  font-size: 7px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(110, 101, 88, 0.95);
  margin: 0 0 10px;
}
.sh-global-map__path {
  height: 2px;
  margin: 0 0 12px;
  border-radius: 1px;
  background: rgba(244, 237, 224, 0.06);
  overflow: hidden;
}
.sh-global-map__path-fill {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(
    90deg,
    rgba(196, 163, 90, 0.88) 0%,
    rgba(196, 163, 90, 0.88) var(--sh-gold-end, 32%),
    rgba(43, 79, 212, 0.78) var(--sh-gold-end, 32%),
    rgba(43, 79, 212, 0.72) var(--sh-blue-mid, 52%),
    rgba(43, 79, 212, 0.18) 100%
  );
  animation: shMapPathIn 0.55s ease forwards;
}
@keyframes shMapPathIn {
  to {
    transform: scaleX(1);
  }
}
.sh-global-map__track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 4px 2px;
  row-gap: 8px;
  position: relative;
  overflow: visible;
}
.sh-global-map__node {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 6px;
  border-radius: 2px;
  text-decoration: none;
  color: rgba(160, 152, 137, 0.55);
  font-family: 'DM Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease, opacity 0.25s ease;
  border: 1px solid transparent;
  opacity: 0.72;
  cursor: pointer;
}
.sh-global-map__tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(240px, 70vw);
  padding: 8px 10px;
  border-radius: 2px;
  border: 1px solid rgba(244, 237, 224, 0.1);
  background: rgba(8, 8, 7, 0.94);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 8;
  text-transform: none;
  letter-spacing: 0.02em;
  font-family: 'Lato', sans-serif;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.35;
  color: rgba(203, 195, 180, 0.92);
}
.sh-global-map__tip-line {
  display: block;
}
.sh-global-map__tip-line--future {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid rgba(59, 13, 13, 0.35);
  font-size: 10px;
  color: rgba(160, 152, 137, 0.78);
}
@media (hover: hover) and (pointer: fine) {
  .sh-global-map__node:hover .sh-global-map__tip,
  .sh-global-map__node:focus-visible .sh-global-map__tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}
@media (hover: none) {
  .sh-global-map__node.is-tip-open .sh-global-map__tip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }
}
.sh-global-map__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(244, 237, 224, 0.12);
  flex-shrink: 0;
  transition: background 0.25s ease, box-shadow 0.3s ease;
}
.sh-global-map__node:hover {
  color: rgba(203, 195, 180, 0.92);
  opacity: 1;
  transform: translateY(-1px) scale(1.03);
}
.sh-global-map__node.is-done {
  opacity: 0.95;
  color: rgba(196, 163, 90, 0.75);
  border-color: rgba(196, 163, 90, 0.28);
}
.sh-global-map__node.is-done .sh-global-map__dot {
  background: rgba(196, 163, 90, 0.35);
  box-shadow: 0 0 0 1px rgba(196, 163, 90, 0.2);
}
.sh-global-map__node.is-current,
.sh-global-map__node.is-scroll-current {
  opacity: 1;
  color: rgba(244, 237, 224, 0.95);
  border-color: rgba(43, 79, 212, 0.45);
  box-shadow: 0 0 0 1px rgba(43, 79, 212, 0.2), 0 0 22px rgba(43, 79, 212, 0.12);
  transform: scale(1.02);
}
.sh-global-map__node.is-current .sh-global-map__dot,
.sh-global-map__node.is-scroll-current .sh-global-map__dot {
  background: rgba(58, 107, 255, 0.65);
  box-shadow: 0 0 12px rgba(43, 79, 212, 0.35);
}
.sh-global-map__node.is-future {
  opacity: 0.52;
}
.sh-global-map__node.is-future:hover {
  opacity: 0.82;
}
.sh-global-map__node.is-rec:not(.is-current):not(.is-scroll-current) {
  border-color: rgba(43, 79, 212, 0.22);
  opacity: 0.9;
  animation: shMapRecPulse 2.8s ease-in-out infinite;
}
@keyframes shMapRecPulse {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(43, 79, 212, 0.18), 0 0 10px rgba(43, 79, 212, 0.06);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(43, 79, 212, 0.32), 0 0 18px rgba(43, 79, 212, 0.12);
  }
}
.sh-global-map__soft {
  margin: 10px 0 0;
  font-size: 11px;
  line-height: 1.4;
  color: rgba(160, 152, 137, 0.75);
  max-width: 48ch;
}
.sh-global-map__arrow {
  color: rgba(110, 101, 88, 0.35);
  font-size: 11px;
  padding: 0 2px;
  user-select: none;
}
.sh-global-map__rec-inline {
  display: inline;
  margin-left: 5px;
  font-family: 'DM Mono', monospace;
  font-size: 6px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(58, 107, 255, 0.5);
  font-weight: 400;
  white-space: nowrap;
  vertical-align: middle;
}
.sh-global-map__node.is-current .sh-global-map__rec-inline {
  color: rgba(58, 107, 255, 0.72);
}
.sh-global-map--minimal .sh-global-map__rec-inline {
  font-size: 5px;
  margin-left: 4px;
}
.sh-global-map__reason {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(160, 152, 137, 0.85);
  max-width: 52ch;
}
.sh-global-map--minimal .sh-global-map__track {
  font-size: 7px;
}
.sh-global-map--minimal .sh-global-map__you {
  margin-bottom: 6px;
}
@media (max-width: 720px) {
  .sh-global-map__track {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .sh-global-map__node {
    flex-shrink: 0;
    min-height: 44px;
    padding: 10px 12px 10px 10px;
    align-items: center;
  }
  .sh-global-map__tip {
    max-width: min(260px, 85vw);
  }
}

/* Magnetic flow: one primary next action (subtle gravity, no modals) */
body.sh-magnetic-flow-on {
  --sh-magnetic-glow: rgba(43, 79, 212, 0.28);
}

.sh-magnetic--ready {
  transition:
    box-shadow 0.45s ease,
    transform 0.4s ease,
    filter 0.4s ease,
    opacity 0.35s ease;
}

a.sh-magnetic--active,
button.sh-magnetic--active,
.sh-magnetic--active.tier-cta--pri,
.sh-magnetic--active.btn--pri,
.sh-magnetic--active.btn-primary,
.sh-magnetic--active.btn-terminal,
.sh-magnetic--active.btn-solid {
  transform: translate(var(--sh-mx, 0), var(--sh-my, 0)) scale(1.045);
  box-shadow:
    0 0 0 1px rgba(43, 79, 212, 0.32),
    0 0 28px rgba(43, 79, 212, 0.22);
  filter: brightness(1.06);
}

.sh-flow-dim:not(.sh-magnetic--active) {
  opacity: 0.68;
  filter: contrast(0.94);
}

.sh-flow-output-anchor .action-steps {
  margin-top: 2px;
}

body.sh-magnetic-idle-hint a.sh-magnetic--active,
body.sh-magnetic-idle-hint .sh-magnetic--active.tier-cta--pri,
body.sh-magnetic-idle-hint .sh-magnetic--active.btn-primary,
body.sh-magnetic-idle-hint .sh-magnetic--active.btn-solid {
  filter: brightness(1.1);
  box-shadow:
    0 0 0 1px rgba(43, 79, 212, 0.38),
    0 0 32px rgba(43, 79, 212, 0.26);
}

body.sh-magnetic-idle-hint .sh-flow-dim {
  opacity: 0.58;
}

[data-sh-flow-section].sh-flow-section--soft {
  opacity: 0.78;
  transition: opacity 0.35s ease;
}

[data-sh-flow-section].sh-flow-section--focus {
  opacity: 1;
  transition: opacity 0.35s ease;
}

@media (max-width: 720px) {
  a.sh-magnetic--active,
  .sh-magnetic--active.tier-cta--pri,
  .sh-magnetic--active.btn-primary,
  .sh-magnetic--active.btn-solid {
    min-height: 46px;
    padding-left: 18px;
    padding-right: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sh-magnetic--ready,
  a.sh-magnetic--active,
  .sh-magnetic--active.tier-cta--pri {
    transition: none !important;
  }
  a.sh-magnetic--active,
  .sh-magnetic--active.tier-cta--pri,
  .sh-magnetic--active.btn-primary,
  .sh-magnetic--active.btn-solid {
    transform: none !important;
  }
  .sys-btn,
  .sh-map-node,
  .sh-global-map__node,
  .magnetic,
  #page-transition {
    transition: none !important;
  }
  .sys-layer {
    transition: none !important;
  }
  .sys-adaptive-cta-pulse.sys-btn--pri,
  .sys-adaptive-cta-pulse.tier-cta-primary,
  .sys-adaptive-cta-pulse.btn--pri {
    animation: none !important;
  }
  .sh-live-panel {
    transition: none !important;
  }
  .sh-global-map__path-fill {
    animation: none !important;
    transform: scaleX(1) !important;
  }
  .sh-global-map__node.is-rec:not(.is-current):not(.is-scroll-current) {
    animation: none !important;
  }
  #sh-env-depth,
  #sh-env-depth .sh-depth-field,
  #sh-env-depth .sh-horizon,
  #sh-env-depth .sh-depth-canvas,
  #sh-env-depth .sh-depth-fg-wrap {
    animation: none !important;
    transition: none !important;
  }
}

/* ——— Global environment depth: layered particles, horizon, parallax ——— */
html {
  --sh-parallax-x: 0;
  --sh-parallax-y: 0;
  --sh-scroll-d: 0;
  --sh-scroll-bg: 0px;
  --sh-scroll-fg: 0px;
  --sh-scroll-scale: 1;
  --sh-exit-scale: 1.028;
}

#sh-env-depth {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: layout paint;
  transform: translate3d(0, var(--sh-scroll-bg, 0px), 0);
}

@media (max-width: 767px) {
  html {
    --sh-exit-scale: 1.016;
  }
}

#sh-env-depth .sh-depth-field {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(120vw, 820px);
  height: min(120vw, 820px);
  transform: translate(-50%, -50%) scale(1);
  background: radial-gradient(circle at 38% 42%, rgba(43, 79, 212, 0.085), transparent 52%),
    radial-gradient(circle at 72% 58%, rgba(59, 13, 13, 0.06), transparent 48%);
  z-index: 0;
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
}

body.sh-zone--cei #sh-env-depth .sh-depth-field {
  opacity: 1;
}
body.sh-zone--pricing #sh-env-depth .sh-depth-field {
  opacity: 0.88;
  background: radial-gradient(circle at 45% 40%, rgba(43, 79, 212, 0.07), transparent 55%),
    radial-gradient(circle at 60% 65%, rgba(196, 163, 90, 0.04), transparent 50%);
}
body.sh-zone--immersive #sh-env-depth .sh-depth-field {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1.06);
  background: radial-gradient(circle at 40% 38%, rgba(43, 79, 212, 0.11), transparent 50%),
    radial-gradient(circle at 68% 62%, rgba(196, 163, 90, 0.07), transparent 46%);
}

#sh-env-depth .sh-horizon {
  position: absolute;
  inset: 0;
  z-index: 1;
  transform: translate3d(calc(var(--sh-parallax-x, 0) * 14px), calc(var(--sh-parallax-y, 0) * 10px), 0);
  transition: opacity 0.45s ease;
}

#sh-env-depth .sh-horizon__radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 90% 65% at 50% 108%, rgba(43, 79, 212, 0.07), transparent 58%);
  pointer-events: none;
  transform: translate(calc(var(--sh-parallax-x, 0) * -10px), calc(var(--sh-scroll-d, 0) * -18px));
}

#sh-env-depth .sh-horizon__grid {
  position: absolute;
  left: 50%;
  bottom: -8%;
  width: 220%;
  height: 75%;
  margin-left: -110%;
  transform: translate3d(calc(var(--sh-parallax-x, 0) * 20px), calc(var(--sh-scroll-d, 0) * -28px), 0)
    perspective(520px) rotateX(74deg);
  transform-origin: center bottom;
  opacity: 0.42;
  background-image: linear-gradient(rgba(43, 79, 212, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 237, 224, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 78%);
  -webkit-mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent 78%);
}

body.sh-zone--cei #sh-env-depth .sh-horizon__grid {
  opacity: 0.52;
  background-size: 38px 38px;
}
body.sh-zone--pricing #sh-env-depth .sh-horizon__grid {
  opacity: 0.4;
  background-size: 34px 34px;
}
body.sh-page--results #sh-env-depth .sh-depth-field {
  filter: saturate(1.06);
}
body.sh-page--results .cei-node-strip {
  box-shadow: 0 0 28px rgba(43, 79, 212, 0.2);
}
body.sh-zone--immersive #sh-env-depth .sh-horizon__grid {
  opacity: 0.55;
}

body.sh-env-pulse #sh-env-depth .sh-horizon__grid {
  opacity: 0.62;
}
body.sh-env-pulse #sh-env-depth .sh-depth-field {
  transform: translate(-50%, -50%) scale(1.03);
}

body.sh-env-pulse .cei-node-strip {
  border-color: rgba(43, 79, 212, 0.38);
  box-shadow: 0 0 22px rgba(43, 79, 212, 0.12);
  transition: border-color 0.45s ease, box-shadow 0.45s ease;
}

#sh-env-depth .sh-depth-canvas {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  display: block;
}
#sh-env-depth .sh-depth-canvas--bg {
  z-index: 2;
}
#sh-env-depth .sh-depth-canvas--mid {
  z-index: 3;
}
#sh-env-depth .sh-depth-fg-wrap {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  filter: blur(1.05px);
  opacity: 0.88;
  transform: translate3d(calc(var(--sh-parallax-x, 0) * 6px), calc(var(--sh-parallax-y, 0) * 4px), 0);
}
body.sh-mobile-depth #sh-env-depth .sh-depth-fg-wrap {
  display: none;
}

body.sh-has-env-depth {
  isolation: isolate;
}
body.sh-has-env-depth > :not(#sh-env-depth):not(#page-transition):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
  position: relative;
  z-index: 1;
}

#page-transition {
  z-index: 100000 !important;
}

/* Planes: content slightly forward, dominant glows concentrated */
body.sh-has-env-depth .sys-compact__inner,
body.sh-has-env-depth .sh-global-map-wrap,
body.sh-has-env-depth .pricing-layout__main {
  transform: translateZ(0);
}

body.sh-has-env-depth .inner-tier--recommended {
  box-shadow:
    0 0 0 1px rgba(43, 79, 212, 0.42),
    0 0 36px rgba(43, 79, 212, 0.22),
    0 16px 48px rgba(0, 0, 0, 0.28) !important;
}

body.sh-has-env-depth .sys-btn--pri {
  box-shadow: 0 3px 20px rgba(43, 79, 212, 0.28);
}
body.sh-has-env-depth .sys-btn--pri:hover {
  box-shadow: 0 7px 30px rgba(43, 79, 212, 0.34);
}

body.sh-zone--cei .sh-system-map .sh-map-node,
body.sh-zone--cei .sh-global-map__node {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}
body.sh-zone--cei .sh-system-map .sh-map-node:hover,
body.sh-zone--cei .sh-global-map__node:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 22px rgba(43, 79, 212, 0.18);
}

@media (max-width: 767px) {
  #sh-env-depth .sh-horizon__grid {
    opacity: 0.28;
  }
  #sh-env-depth .sh-depth-field {
    opacity: 0.75;
  }
  body.sh-spatial-from-nav.sh-page-entry > *:not(#page-transition):not(#sh-env-depth):not(#sh-live-panel):not(#sh-flow-end):not(.sys-phase-rail-wrap) {
    transform: translateY(12px) scale(0.999);
  }
}

/* Injected phase rail (prev / map / next + jump): keep scroll end clear on phase flows */
html.phase-page-min body {
  padding-bottom: max(140px, min(28vh, 240px));
}

/* Post-phase summaries: one primary CTA + low-emphasis text links */
.phase-result-links {
  margin: 14px auto 0;
  max-width: 520px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(232, 224, 212, 0.42);
  line-height: 1.65;
}
.phase-result-links a {
  color: rgba(232, 224, 212, 0.52);
  text-decoration: none;
  border-bottom: 1px solid rgba(232, 224, 212, 0.12);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.phase-result-links a:hover {
  color: rgba(232, 224, 212, 0.88);
  border-bottom-color: rgba(232, 224, 212, 0.22);
}
.phase-result-links--minor {
  margin-top: 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
}

/* Room entry: optional diagnostic continuation (4 lines) */
/* Deep-link targets from Playbooks (scroll offset under fixed nav) */
.room-deep-target {
  scroll-margin-top: 88px;
}

.pb-dyn-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(154, 130, 96, 0.18);
}
.pb-dyn-wrap[hidden] {
  display: none !important;
}
.pb-dyn-open,
.pb-dyn-pressure,
.pb-dyn-frame {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(221, 213, 200, 0.78);
  margin: 0 0 10px;
  max-width: 52ch;
}
.pb-dyn-open {
  color: #e8e0d4;
}
.pb-dyn-next {
  font-family: 'DM Mono', ui-monospace, monospace;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(138, 129, 117, 0.95);
  margin: 2px 0 0;
  max-width: 52ch;
  line-height: 1.5;
}

/* Guided rooms: one primary continue + tertiary exit (shared with diagnostic-chrome) */
.room-forward-actions--single {
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.room-forward-exit {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.55;
}

.room-forward-exit a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(154, 130, 96, 0.35);
}

.room-forward-exit a:hover {
  opacity: 0.95;
}
