/* 4CZNZ: quiet institutional intelligence */

:root {
  --teal: #00e5c0;
  --teal-muted: rgba(0, 229, 192, 0.14);
  --teal-soft: rgba(0, 229, 192, 0.08);
  --teal-glow: rgba(0, 229, 192, 0.22);

  --purple: #8b7cf6;
  --purple-muted: rgba(139, 124, 246, 0.12);

  --blue: #5b8def;
  --blue-muted: rgba(91, 141, 239, 0.12);

  --amber: #d4a574;
  --amber-muted: rgba(212, 165, 116, 0.12);

  --ink-0: #060608;
  --ink-1: #0c0c10;
  --ink-2: #121218;
  --ink-3: #18181f;
  --ink-4: #22222c;

  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.1);

  --text-0: rgba(255, 255, 255, 0.92);
  --text-1: rgba(255, 255, 255, 0.72);
  --text-2: rgba(255, 255, 255, 0.48);
  --text-3: rgba(255, 255, 255, 0.32);

  --font-headline: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-luxury: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-panel: 0.8s;
  --dur-reveal: 0.78s;
  --dur-micro: 0.42s;
  --space-unit: 8px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.62;
  letter-spacing: -0.006em;
  color: var(--text-1);
  background: var(--ink-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Atmospheric depth: global */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  animation: ambient-field 22s var(--ease-soft) infinite alternate;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 5px,
      rgba(255, 255, 255, 0.012) 5px,
      rgba(255, 255, 255, 0.012) 6px
    ),
    radial-gradient(ellipse 130% 85% at 50% -25%, rgba(0, 229, 192, 0.055), transparent 52%),
    radial-gradient(ellipse 70% 55% at 0% 50%, rgba(0, 229, 192, 0.02), transparent 45%),
    radial-gradient(ellipse 80% 60% at 100% 35%, rgba(139, 124, 246, 0.028), transparent 48%),
    radial-gradient(ellipse 100% 90% at 50% 100%, rgba(0, 0, 0, 0.45), transparent 55%),
    linear-gradient(185deg, #070709 0%, var(--ink-0) 38%, #050506 100%);
}

/* Ultra-subtle film: below perceptual threshold at normal viewing */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.012;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

.app-shell {
  position: relative;
  z-index: 1;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(288px, 328px) 1fr;
  min-height: 100vh;
  max-width: 1440px;
  margin: 0 auto;
  border-left: 1px solid rgba(255, 255, 255, 0.045);
  border-right: 1px solid rgba(255, 255, 255, 0.045);
}

/* Infrastructure grid: masked, very low contrast */
.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 63px,
      rgba(255, 255, 255, 0.014) 63px,
      rgba(255, 255, 255, 0.014) 64px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0,
      transparent 63px,
      rgba(255, 255, 255, 0.014) 63px,
      rgba(255, 255, 255, 0.014) 64px
    );
  opacity: 0.55;
  animation: infra-grid-breathe 26s var(--ease-soft) infinite alternate;
  mask-image: radial-gradient(ellipse 88% 78% at 50% 42%, #000 0%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 88% 78% at 50% 42%, #000 0%, transparent 72%);
}

/* --- Left rail --- */
.narrative-rail {
  position: sticky;
  top: 0;
  z-index: 1;
  align-self: start;
  min-height: 100vh;
  padding: calc(var(--space-unit) * 3.25) calc(var(--space-unit) * 2.5) calc(var(--space-unit) * 3.5);
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-unit) * 3.5);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0%, transparent min(10%, 40px)),
    linear-gradient(180deg, rgba(15, 15, 19, 0.97) 0%, rgba(9, 9, 12, 0.99) 55%, rgba(7, 7, 10, 1) 100%);
  backdrop-filter: blur(14px) saturate(1.05);
  box-shadow: inset -1px 0 0 rgba(0, 0, 0, 0.32);
}

.timeline {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space-unit) * 0.75);
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 2.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
  overflow: visible;
  background: none;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 12px;
}

.brand-mark:focus-visible {
  outline: 1px solid rgba(0, 229, 192, 0.45);
  outline-offset: 4px;
}

.brand-mark:hover .brand-logo {
  filter: drop-shadow(0 0 40px rgba(0, 229, 192, 0.1)) drop-shadow(0 0 72px rgba(0, 229, 192, 0.06));
}

.brand-logo {
  display: block;
  width: clamp(200px, 26vw, 240px);
  height: clamp(200px, 26vw, 240px);
  max-width: min(240px, 100%);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  background: none;
  filter: drop-shadow(0 0 36px rgba(0, 229, 192, 0.065));
  transition: filter var(--dur-micro) var(--ease-soft);
}

.rail-foot {
  margin-top: auto;
  padding-top: calc(var(--space-unit) * 2);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.rail-slogan {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.22);
  text-align: left;
  max-width: 14rem;
}

.rail-contact {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.26);
  text-decoration: none;
  width: fit-content;
  transition:
    color var(--dur-micro) var(--ease-soft),
    text-decoration-color var(--dur-micro) var(--ease-soft);
}

.rail-contact:hover {
  color: rgba(0, 229, 192, 0.55);
  text-decoration: underline;
  text-decoration-color: rgba(0, 229, 192, 0.35);
  text-underline-offset: 0.22em;
}

.rail-contact:focus-visible {
  outline: 1px solid rgba(0, 229, 192, 0.45);
  outline-offset: 3px;
  border-radius: 2px;
}

.rail-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: calc(var(--space-unit) * 1.5);
  width: 100%;
  padding: calc(var(--space-unit) * 1.5) calc(var(--space-unit) * 1.5);
  margin: 0;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.01);
  transition:
    background var(--dur-micro) var(--ease-luxury),
    border-color var(--dur-micro) var(--ease-luxury),
    box-shadow var(--dur-micro) var(--ease-luxury),
    opacity var(--dur-micro) var(--ease-luxury),
    transform 0.5s var(--ease-luxury);
}

.rail-item:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}

.rail-item:focus-visible {
  outline: 1px solid rgba(0, 229, 192, 0.45);
  outline-offset: 2px;
}

.rail-item.active {
  background: linear-gradient(
    145deg,
    rgba(0, 229, 192, 0.055) 0%,
    rgba(255, 255, 255, 0.025) 42%,
    rgba(0, 0, 0, 0.12) 100%
  );
  border-color: rgba(0, 229, 192, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -1px 0 rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 229, 192, 0.04),
    0 12px 36px -30px rgba(0, 229, 192, 0.05);
}

.rail-number {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  color: var(--text-3);
  padding-top: 0.12em;
  transition: color var(--dur-micro) var(--ease-luxury), opacity var(--dur-micro) var(--ease-luxury);
}

.rail-item:hover .rail-number,
.rail-item.active .rail-number {
  color: var(--teal);
  opacity: 0.85;
}

.rail-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: calc(var(--space-unit) * 0.75);
  transition: color var(--dur-micro) var(--ease-luxury);
}

.rail-item.active .rail-label {
  color: var(--text-2);
}

.rail-item h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.48;
  letter-spacing: -0.014em;
  color: var(--text-2);
  transition: color var(--dur-micro) var(--ease-luxury);
}

.rail-item:hover h3 {
  color: var(--text-1);
}

.rail-item.active h3 {
  color: var(--text-0);
}

/* --- Experience stage --- */
.experience-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: calc(var(--space-unit) * 4.5) calc(var(--space-unit) * 4) calc(var(--space-unit) * 3.5);
  gap: calc(var(--space-unit) * 2);
}

.panel {
  --panel-accent: var(--teal-muted);
  --panel-line: rgba(255, 255, 255, 0.055);
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid var(--panel-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, transparent 14%),
    linear-gradient(165deg, rgba(24, 24, 30, 0.72) 0%, rgba(11, 11, 14, 0.88) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.35) inset,
    0 28px 56px -38px rgba(0, 0, 0, 0.58);
  transition:
    border-color var(--dur-panel) var(--ease-luxury),
    background var(--dur-panel) var(--ease-luxury),
    box-shadow var(--dur-panel) var(--ease-luxury),
    opacity var(--dur-panel) var(--ease-luxury),
    max-height var(--dur-panel) var(--ease-luxury),
    transform var(--dur-panel) var(--ease-luxury);
  max-height: 2000px;
  opacity: 1;
}

.panel:not(.active) {
  max-height: 132px;
  opacity: 0.36;
  border-color: rgba(255, 255, 255, 0.028);
  background: linear-gradient(175deg, rgba(14, 14, 18, 0.55) 0%, rgba(8, 8, 10, 0.78) 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.35);
}

.panel:not(.active) .panel-top {
  padding-bottom: calc(var(--space-unit) * 2);
}

.panel:not(.active) .panel-top > div > p,
.panel:not(.active) .reveal-btn,
.panel:not(.active) .diagram {
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
}

.panel:not(.active) .panel-top > div > h2 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 0;
}

.panel:not(.active)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 35%, rgba(4, 4, 6, 0.42) 100%);
}

.panel.active {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.075);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 -1px 0 rgba(0, 0, 0, 0.28) inset,
    0 0 0 1px var(--panel-accent),
    0 36px 72px -44px rgba(0, 0, 0, 0.72),
    0 0 80px -52px rgba(0, 0, 0, 0.35);
}

.panel.active::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 0.42;
  background: radial-gradient(ellipse 95% 52% at 50% 0%, var(--panel-accent), transparent 72%);
}

.panel.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
  opacity: 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, transparent 11%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.18) 0%, transparent 28%);
}

#hidden-value {
  --panel-accent: var(--purple-muted);
}

#fragmented {
  --panel-accent: var(--blue-muted);
}

#refined {
  --panel-accent: var(--teal-muted);
}

#future {
  --panel-accent: var(--amber-muted);
}

/* Refined: visual centerpiece when active */
#refined.panel.active {
  border-color: rgba(0, 229, 192, 0.16);
  background:
    linear-gradient(180deg, rgba(0, 229, 192, 0.06) 0%, transparent 18%),
    linear-gradient(165deg, rgba(16, 30, 28, 0.78) 0%, rgba(9, 12, 14, 0.94) 52%, rgba(6, 7, 9, 0.98) 100%);
  box-shadow:
    0 1px 0 rgba(0, 229, 192, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.32) inset,
    0 0 0 1px rgba(0, 229, 192, 0.08),
    0 44px 88px -48px rgba(0, 0, 0, 0.78),
    0 0 100px -50px rgba(0, 229, 192, 0.12);
}

#refined.panel.active::before {
  opacity: 0.5;
  background:
    radial-gradient(ellipse 100% 50% at 50% -8%, rgba(0, 229, 192, 0.1), transparent 58%),
    radial-gradient(ellipse 55% 40% at 88% 58%, rgba(0, 229, 192, 0.04), transparent 60%);
}

#refined.panel.active::after {
  background:
    linear-gradient(180deg, rgba(0, 229, 192, 0.09) 0%, transparent 12%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.22) 0%, transparent 30%);
}

#refined.panel.active .panel-top > div > h2 {
  font-size: clamp(1.3125rem, 2.1vw, 1.6875rem);
  letter-spacing: -0.044em;
  line-height: 1.12;
  font-weight: 700;
}

#refined.panel.active .panel-tag {
  box-shadow:
    0 1px 0 rgba(0, 229, 192, 0.12) inset,
    0 0 28px -12px rgba(0, 229, 192, 0.22);
}

.panel-top {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--space-unit) * 3);
  padding: calc(var(--space-unit) * 4.75) calc(var(--space-unit) * 4.25);
  transition: padding var(--dur-panel) var(--ease-luxury);
}

.panel-top > div {
  flex: 1 1 280px;
  max-width: 52rem;
}

.panel-tag {
  display: inline-block;
  margin-bottom: calc(var(--space-unit) * 2.5);
  padding: 0.28rem 0.58rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.2;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
  transition:
    border-color var(--dur-micro) var(--ease-luxury),
    box-shadow var(--dur-micro) var(--ease-luxury),
    background var(--dur-micro) var(--ease-luxury);
}

.panel-tag.purple {
  color: rgba(196, 186, 255, 0.95);
  border-color: rgba(139, 124, 246, 0.25);
}

.panel-tag.blue {
  color: rgba(160, 190, 255, 0.95);
  border-color: rgba(91, 141, 239, 0.25);
}

.panel-tag.teal {
  color: rgba(180, 255, 240, 0.95);
  border-color: rgba(0, 229, 192, 0.35);
  background: rgba(0, 229, 192, 0.06);
}

.panel-tag.amber {
  color: rgba(230, 200, 160, 0.95);
  border-color: rgba(212, 165, 116, 0.28);
}

.panel h2 {
  margin: 0 0 calc(var(--space-unit) * 3);
  font-family: var(--font-headline);
  font-weight: 500;
  font-size: clamp(1.2rem, 1.85vw, 1.5rem);
  letter-spacing: -0.042em;
  line-height: 1.24;
  color: var(--text-0);
  text-rendering: geometricPrecision;
  transition:
    font-size var(--dur-panel) var(--ease-luxury),
    letter-spacing var(--dur-panel) var(--ease-luxury),
    line-height var(--dur-panel) var(--ease-luxury);
}

.panel p {
  margin: 0;
  max-width: 40em;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 400;
  line-height: 1.7;
  letter-spacing: -0.003em;
  color: rgba(255, 255, 255, 0.5);
}

.reveal-btn {
  flex-shrink: 0;
  margin-top: calc(var(--space-unit) * 0.5);
  padding: 0.55rem 0.95rem;
  font-family: var(--font-mono);
  font-size: 0.65625rem;
  font-weight: 500;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.68);
  cursor: pointer;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 -1px 0 rgba(0, 0, 0, 0.35) inset;
  transition:
    color var(--dur-micro) var(--ease-luxury),
    border-color var(--dur-micro) var(--ease-luxury),
    background var(--dur-micro) var(--ease-luxury),
    box-shadow 0.55s var(--ease-luxury),
    transform 0.55s var(--ease-luxury),
    filter var(--dur-micro) var(--ease-luxury);
}

.reveal-btn:hover {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(0, 229, 192, 0.22);
  background: linear-gradient(180deg, rgba(0, 229, 192, 0.1) 0%, rgba(255, 255, 255, 0.04) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.1) inset,
    0 -1px 0 rgba(0, 0, 0, 0.28) inset,
    0 0 32px -14px rgba(0, 229, 192, 0.18);
}

.reveal-btn:focus-visible {
  outline: 1px solid rgba(0, 229, 192, 0.5);
  outline-offset: 2px;
}

.reveal-btn:active {
  transform: translateY(0.5px);
}

.reveal-btn.is-open {
  color: rgba(200, 255, 240, 0.95);
  border-color: rgba(0, 229, 192, 0.28);
  background: linear-gradient(180deg, rgba(0, 229, 192, 0.12) 0%, rgba(0, 229, 192, 0.04) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 0 28px -16px rgba(0, 229, 192, 0.2);
}

/* Diagram reveal */
.diagram {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: calc(var(--space-unit) * 1.75);
  padding: 0 calc(var(--space-unit) * 4) calc(var(--space-unit) * 3.75);
  max-height: 920px;
  opacity: 1;
  transition:
    opacity var(--dur-reveal) var(--ease-luxury),
    max-height var(--dur-reveal) var(--ease-luxury),
    padding var(--dur-reveal) var(--ease-luxury),
    transform var(--dur-reveal) var(--ease-luxury);
}

.diagram-surface {
  flex: 1;
  min-height: 0;
  transition:
    opacity 0.38s var(--ease-soft),
    filter 0.38s var(--ease-soft);
}

.diagram-surface.is-substrate-shift {
  opacity: 0.48;
  filter: blur(0.55px);
}

.diagram-ctx {
  align-self: flex-end;
  width: 100%;
  max-width: min(38rem, 100%);
  margin-bottom: calc(var(--space-unit) * 1.25);
}

.diagram-ctx__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: calc(var(--space-unit) * 1.5);
  padding-bottom: calc(var(--space-unit) * 1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.diagram-ctx__label {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.34);
  white-space: nowrap;
}

.diagram-ctx__shell {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1 1 14rem;
  min-width: 0;
  justify-content: flex-end;
}

.diagram-ctx__viewport {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 24rem;
  overflow: hidden;
  container-type: inline-size;
  container-name: diag-ctx-vp;
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.diagram-ctx__track {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  min-width: 0;
  transform: translateX(0);
  transition: transform 0.55s var(--ease-luxury);
  will-change: transform;
}

.diagram-ctx__opt {
  flex: 0 0 auto;
  min-width: 7.35rem;
  max-width: 8.25rem;
  margin: 0;
  padding: 0.48rem 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  font-weight: 500;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-align: center;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.46);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.028);
  transition:
    color var(--dur-micro) var(--ease-soft),
    border-color var(--dur-micro) var(--ease-soft),
    background var(--dur-micro) var(--ease-soft),
    box-shadow var(--dur-micro) var(--ease-soft);
}

@supports (width: 1cqi) {
  .diagram-ctx__track {
    width: calc(10 * (100cqi - 1rem) / 3 + 4.5rem);
  }

  .diagram-ctx__opt {
    flex: 0 0 calc((100cqi - 1rem) / 3);
    min-width: 0;
    max-width: none;
  }
}

.diagram-ctx__opt:hover {
  color: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.diagram-ctx__opt:focus-visible {
  outline: 1px solid rgba(0, 229, 192, 0.45);
  outline-offset: 2px;
}

.diagram-ctx__opt[aria-checked="true"] {
  color: rgba(210, 255, 245, 0.92);
  border-color: rgba(0, 229, 192, 0.32);
  background: linear-gradient(180deg, rgba(0, 229, 192, 0.1) 0%, rgba(0, 229, 192, 0.045) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 229, 192, 0.06) inset,
    0 0 32px -10px rgba(0, 229, 192, 0.22),
    0 0 56px -22px rgba(0, 229, 192, 0.1);
}

.diagram-ctx__nudge {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.28);
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.25);
  transition:
    color var(--dur-micro) var(--ease-soft),
    border-color var(--dur-micro) var(--ease-soft),
    background var(--dur-micro) var(--ease-soft);
}

.diagram-ctx__nudge:hover {
  color: rgba(0, 229, 192, 0.55);
  border-color: rgba(0, 229, 192, 0.12);
  background: rgba(0, 229, 192, 0.04);
}

.diagram-ctx__nudge:focus-visible {
  outline: 1px solid rgba(0, 229, 192, 0.4);
  outline-offset: 2px;
}

.diagram-ctx__nudge[data-ctx-nudge="prev"]::after {
  content: "\2039";
}

.diagram-ctx__nudge[data-ctx-nudge="next"]::after {
  content: "\203A";
}

@media (prefers-reduced-motion: reduce) {
  .diagram-surface {
    transition: none;
  }

  .diagram-surface.is-substrate-shift {
    filter: none;
    opacity: 0.72;
  }

  .diagram-ctx__track {
    transition: none;
  }
}

.diagram.hidden {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.diagram:not(.hidden) {
  transform: translateY(0);
}

/* --- Archival visualizations (operational / semantic) --- */

.viz {
  max-width: 52rem;
  margin: 0 auto;
  padding: calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 1);
}

.viz-hdr {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: calc(var(--space-unit) * 2);
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(139, 124, 246, 0.22);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(200, 190, 255, 0.75);
}

.viz-hdr--blue {
  border-bottom-color: rgba(91, 141, 239, 0.22);
  color: rgba(170, 195, 255, 0.72);
}

.viz-hdr--teal {
  border-bottom-color: rgba(0, 229, 192, 0.2);
  color: rgba(180, 240, 225, 0.78);
}

.viz-hdr--amber {
  border-bottom-color: rgba(212, 165, 116, 0.22);
  color: rgba(230, 200, 170, 0.72);
}

.viz-hdr__state {
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.12em;
}

.viz--latent {
  max-width: min(56rem, 100%);
}

/* Section 1: latent extraction schematic */
.latent-schematic {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, 128px) minmax(0, 1fr);
  gap: calc(var(--space-unit) * 1.5);
  align-items: center;
  min-height: 220px;
  padding: calc(var(--space-unit) * 1) 0;
}

.latent-wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

.latent-path {
  animation: latent-wire-dim 9s var(--ease-luxury) infinite;
  transition:
    filter 0.4s var(--ease-soft),
    opacity 0.4s var(--ease-soft);
}

.latent-path--b {
  animation-delay: 1.2s;
}

.latent-path--c {
  animation-delay: 2s;
}

.latent-path--d {
  animation-delay: 2.8s;
}

.latent-col {
  position: relative;
  z-index: 1;
}

.latent-col--threads,
.latent-col--targets {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lat-card {
  display: flex;
  gap: 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(139, 124, 246, 0.12);
  background: linear-gradient(180deg, rgba(26, 22, 38, 0.5) 0%, rgba(8, 8, 12, 0.82) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    inset 0 0 0 1px rgba(139, 124, 246, 0.04);
  overflow: hidden;
  animation: lat-card-surface 8s var(--ease-luxury) infinite;
  transition: opacity var(--dur-micro) var(--ease-soft);
}

.lat-card:nth-child(2) {
  animation-delay: 1.5s;
}

.lat-card__rail {
  width: 3px;
  flex-shrink: 0;
  background: linear-gradient(180deg, rgba(139, 124, 246, 0.08), rgba(139, 124, 246, 0.35), rgba(139, 124, 246, 0.08));
}

.lat-card__inner {
  padding: 0.65rem 0.75rem 0.7rem 0.25rem;
  flex: 1;
  min-width: 0;
}

.lat-card--target .lat-card__inner {
  padding: 0.65rem 0.75rem 0.7rem;
  border-left: 2px solid rgba(139, 124, 246, 0.12);
}

.lat-card__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  color: rgba(200, 190, 255, 0.55);
}

.lat-card__ts {
  color: rgba(255, 255, 255, 0.28);
}

.lat-card__excerpt {
  margin: 0 0 0.45rem;
  font-family: var(--font-body);
  font-size: 0.75rem;
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: rgba(255, 255, 255, 0.62);
}

.lat-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.lat-chip {
  padding: 0.15rem 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border-radius: 3px;
  border: 1px solid rgba(139, 124, 246, 0.2);
  color: rgba(210, 200, 255, 0.65);
}

.lat-chip--warn {
  border-color: rgba(139, 124, 246, 0.35);
  color: rgba(230, 215, 255, 0.8);
}

.lat-chip--dim {
  color: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.06);
}

.latent-schematic:has(.lat-card:hover) .lat-card {
  opacity: 0.48;
  transition: opacity var(--dur-micro) var(--ease-soft);
}

.latent-schematic:has(.lat-card:hover) .lat-card:hover {
  opacity: 1;
}

.latent-schematic:has(.lat-card:hover) .lat-card:hover .lat-card__excerpt {
  color: rgba(255, 255, 255, 0.72);
}

.latent-schematic:has(.lat-card:hover) .lat-card:hover .lat-chip {
  border-color: rgba(139, 124, 246, 0.32);
}

.latent-schematic:has(.latent-col--threads .lat-card:nth-child(1):hover) .latent-path--a,
.latent-schematic:has(.latent-col--threads .lat-card:nth-child(2):hover) .latent-path--b,
.latent-schematic:has(.latent-col--targets .lat-card:nth-child(1):hover) .latent-path--c,
.latent-schematic:has(.latent-col--targets .lat-card:nth-child(2):hover) .latent-path--d {
  animation-play-state: paused;
  opacity: 0.88;
  filter: drop-shadow(0 0 6px rgba(139, 124, 246, 0.35));
}

.latent-schematic:has(.lat-card:hover) .latent-aperture__ring {
  border-color: rgba(139, 124, 246, 0.48);
  box-shadow:
    0 0 0 1px rgba(139, 124, 246, 0.12),
    inset 0 0 28px rgba(139, 124, 246, 0.1),
    0 0 48px -10px rgba(139, 124, 246, 0.28);
}

.latent-col--core {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
}

.latent-aperture {
  position: relative;
  width: clamp(72px, 10vw, 96px);
  height: clamp(72px, 10vw, 96px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.latent-aperture__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px solid rgba(139, 124, 246, 0.35);
  box-shadow:
    0 0 0 1px rgba(139, 124, 246, 0.08),
    inset 0 0 24px rgba(139, 124, 246, 0.06),
    0 0 40px -8px rgba(139, 124, 246, 0.2);
  background: radial-gradient(circle at 50% 45%, rgba(40, 32, 56, 0.6) 0%, rgba(10, 8, 16, 0.92) 70%);
  transition:
    border-color 0.45s var(--ease-soft),
    box-shadow 0.45s var(--ease-soft);
}

.latent-aperture__cross {
  position: absolute;
  z-index: 2;
  background: rgba(139, 124, 246, 0.45);
  border-radius: 1px;
}

.latent-aperture__cross--n {
  top: 2px;
  left: 50%;
  width: 1px;
  height: 8px;
  transform: translateX(-50%);
}

.latent-aperture__cross--s {
  bottom: 2px;
  left: 50%;
  width: 1px;
  height: 8px;
  transform: translateX(-50%);
}

.latent-aperture__cross--w {
  left: 2px;
  top: 50%;
  width: 8px;
  height: 1px;
  transform: translateY(-50%);
}

.latent-aperture__cross--e {
  right: 2px;
  top: 50%;
  width: 8px;
  height: 1px;
  transform: translateY(-50%);
}

.latent-aperture__inner {
  position: relative;
  z-index: 1;
  opacity: 0.9;
}

.latent-core-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  color: rgba(200, 190, 255, 0.35);
  text-align: center;
}

/* Section 2: rupture schematic */
.rupture-schematic {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.15rem;
  padding: calc(var(--space-unit) * 1) 0;
  min-height: 180px;
}

.rupture-pane {
  flex: 1 1 0;
  min-width: 0;
  padding: calc(var(--space-unit) * 1.5);
  border-radius: 10px;
  border: 1px solid rgba(91, 141, 239, 0.1);
  background: linear-gradient(165deg, rgba(14, 18, 30, 0.65) 0%, rgba(6, 8, 14, 0.92) 100%);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.4);
  transition:
    border-color var(--dur-micro) var(--ease-soft),
    opacity var(--dur-micro) var(--ease-soft),
    box-shadow var(--dur-micro) var(--ease-soft),
    transform var(--dur-micro) var(--ease-soft);
}

.rupture-pane--mid {
  margin-top: calc(var(--space-unit) * 1.75);
  align-self: flex-start;
  transition: transform var(--dur-micro) var(--ease-soft);
}

.rupture-pane__meta {
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.08em;
  color: rgba(140, 170, 230, 0.52);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.rupture-pane__body {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.rupt-bar {
  display: block;
  height: 3px;
  border-radius: 2px;
  width: 100%;
  background: linear-gradient(90deg, rgba(91, 141, 239, 0.3), rgba(91, 141, 239, 0.05));
  opacity: 0.5;
}

.rupt-bar--w35 {
  width: 35%;
}

.rupt-bar--w40 {
  width: 40%;
}

.rupt-bar--w55 {
  width: 55%;
}

.rupt-bar--w70 {
  width: 70%;
}

.rupture-pane__foot {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: rgba(255, 120, 100, 0.45);
}

.rupture-connector {
  flex: 0 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding-top: calc(var(--space-unit) * 2);
}

.rupt-dash {
  width: 100%;
  max-width: 28px;
  height: 2px;
  border-radius: 1px;
  background: repeating-linear-gradient(
    90deg,
    rgba(91, 141, 239, 0.4) 0 4px,
    transparent 4px 8px
  );
  opacity: 0.55;
  transition: opacity var(--dur-micro) var(--ease-soft);
}

.rupt-dash--broken {
  max-width: 18px;
  opacity: 0.35;
}

.rupt-dash--red {
  background: repeating-linear-gradient(
    90deg,
    rgba(220, 90, 90, 0.55) 0 4px,
    transparent 4px 8px
  );
}

.rupt-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  line-height: 1;
  color: rgba(255, 240, 240, 0.95);
  background: radial-gradient(circle at 30% 25%, rgba(255, 120, 120, 0.5), rgba(140, 40, 45, 0.95) 55%);
  border: 1px solid rgba(255, 160, 160, 0.25);
  box-shadow: 0 0 16px -6px rgba(200, 60, 60, 0.35);
}

.rupt-badge--dup {
  background: radial-gradient(circle at 30% 25%, rgba(255, 180, 140, 0.35), rgba(120, 45, 40, 0.92) 60%);
}

.rupture-schematic:hover .rupt-dash {
  animation: rupt-connector-breathe 2.4s var(--ease-soft) infinite;
}

.rupture-schematic:hover .rupt-dash--broken {
  animation: rupt-connector-fracture 1.8s var(--ease-soft) infinite;
}

.rupture-schematic:hover .rupture-pane {
  border-color: rgba(91, 141, 239, 0.14);
}

.rupture-schematic:hover .rupture-pane--mid {
  transform: translateY(-1px);
}

.rupture-schematic:hover .rupture-pane:not(:hover) {
  opacity: 0.82;
}

.rupture-schematic .rupture-pane:hover {
  opacity: 1;
  border-color: rgba(91, 141, 239, 0.22);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(91, 141, 239, 0.06);
}

/* Refined layout + hero reasoning map */
.refined-layout {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: calc(var(--space-unit) * 3.5);
  align-items: stretch;
  padding: calc(var(--space-unit) * 0.5) 0 calc(var(--space-unit) * 2);
}

.diagram-card {
  position: relative;
  padding: calc(var(--space-unit) * 3.25);
  border-radius: 13px;
  border: 1px solid rgba(0, 229, 192, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 12%),
    linear-gradient(165deg, rgba(0, 229, 192, 0.07) 0%, rgba(10, 14, 14, 0.55) 100%);
  box-shadow:
    0 1px 0 rgba(0, 229, 192, 0.12) inset,
    0 -1px 0 rgba(0, 0, 0, 0.35) inset,
    0 28px 56px -40px rgba(0, 0, 0, 0.5);
  transition:
    border-color var(--dur-micro) var(--ease-luxury),
    box-shadow var(--dur-micro) var(--ease-luxury);
}

.diagram-card:hover {
  border-color: rgba(0, 229, 192, 0.24);
  box-shadow:
    0 1px 0 rgba(0, 229, 192, 0.16) inset,
    0 -1px 0 rgba(0, 0, 0, 0.28) inset,
    0 0 48px -24px rgba(0, 229, 192, 0.12);
}

.diagram-card span {
  display: block;
  margin-bottom: calc(var(--space-unit) * 2.35);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: rgba(200, 255, 240, 0.88);
  opacity: 0.92;
  line-height: 1.35;
}

.diagram-card ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.diagram-card li {
  position: relative;
  padding: 0.58rem 0 0.58rem 1rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.006em;
  color: rgba(255, 255, 255, 0.76);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.diagram-card li:last-child {
  border-bottom: none;
}

.diagram-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 3px;
  height: 0.65rem;
  border-radius: 1px;
  background: rgba(0, 229, 192, 0.45);
}

.viz--hero-map {
  max-width: none;
  margin: 0;
  padding: 0;
}

.hero-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1.1fr);
  gap: calc(var(--space-unit) * 1.25);
  align-items: stretch;
  min-height: 280px;
  padding-right: 1.25rem;
}

.hero-map__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0.88;
}

.hero-flow {
  animation: hero-flow-pulse 7s var(--ease-luxury) infinite;
  transition:
    opacity 0.45s var(--ease-soft),
    filter 0.45s var(--ease-soft);
}

.hero-map__ingest,
.hero-map__spine,
.hero-map__out {
  position: relative;
  z-index: 1;
}

.hero-map__ingest {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero-src {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 192, 0.12);
  background: rgba(0, 0, 0, 0.28);
  border-left: 2px solid rgba(0, 229, 192, 0.28);
  outline: none;
  cursor: default;
  transition:
    border-color var(--dur-micro) var(--ease-soft),
    background var(--dur-micro) var(--ease-soft),
    box-shadow var(--dur-micro) var(--ease-soft),
    opacity var(--dur-micro) var(--ease-soft);
}

.hero-src:focus-visible {
  box-shadow: 0 0 0 1px rgba(0, 229, 192, 0.35);
}

.hero-src__id {
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.1em;
  color: rgba(0, 229, 192, 0.55);
}

.hero-src p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.52);
}

.hero-map__spine {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0;
}

.hero-spine-rail {
  position: absolute;
  left: 50%;
  top: 12%;
  bottom: 12%;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(0, 229, 192, 0.15) 15%,
    rgba(0, 229, 192, 0.35) 50%,
    rgba(0, 229, 192, 0.15) 85%,
    transparent
  );
  border-radius: 2px;
  opacity: 0.85;
  animation: spine-glow 8s var(--ease-luxury) infinite;
  transition: opacity 0.45s var(--ease-soft);
}

.hero-node {
  position: relative;
  z-index: 1;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(0, 229, 192, 0.35);
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.12), rgba(8, 42, 38, 0.95) 55%, rgba(4, 18, 16, 0.98) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 229, 192, 0.08),
    0 0 28px -10px rgba(0, 229, 192, 0.25);
  transform: scale(1);
  transition:
    opacity 0.45s var(--ease-soft),
    transform 0.45s var(--ease-soft),
    box-shadow 0.45s var(--ease-soft);
}

.hero-node span {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.15;
  color: rgba(200, 255, 240, 0.88);
  max-width: 3.2rem;
}

.hero-map__out {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.hero-out-card {
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 229, 192, 0.14);
  background: rgba(0, 229, 192, 0.04);
  transition:
    opacity 0.45s var(--ease-soft),
    border-color 0.45s var(--ease-soft),
    background 0.45s var(--ease-soft);
}

.hero-out-k {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: rgba(0, 229, 192, 0.5);
  margin-bottom: 0.25rem;
}

.hero-out-v {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.68);
  letter-spacing: -0.01em;
}

.hero-map__vlabel {
  position: absolute;
  right: 0;
  top: 50%;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.16em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: translateY(-50%) rotate(180deg);
  color: rgba(255, 255, 255, 0.22);
  line-height: 1.5;
  z-index: 2;
}

.hero-map[data-focus] .hero-flow {
  opacity: 0.22;
  animation: none;
}

.hero-map[data-focus="a"] .hero-flow--src-a,
.hero-map[data-focus="a"] .hero-flow--out-path,
.hero-map[data-focus="b"] .hero-flow--src-b,
.hero-map[data-focus="b"] .hero-flow--out-prov,
.hero-map[data-focus="c"] .hero-flow--src-c,
.hero-map[data-focus="c"] .hero-flow--out-ret {
  opacity: 0.95;
  filter: drop-shadow(0 0 5px rgba(0, 229, 192, 0.22));
}

.hero-map[data-focus] .hero-src {
  opacity: 0.42;
}

.hero-map[data-focus="a"] .hero-src[data-path="a"],
.hero-map[data-focus="b"] .hero-src[data-path="b"],
.hero-map[data-focus="c"] .hero-src[data-path="c"] {
  opacity: 1;
  border-color: rgba(0, 229, 192, 0.28);
  background: rgba(0, 229, 192, 0.06);
}

.hero-map[data-focus] .hero-node {
  opacity: 0.35;
  transform: scale(0.96);
}

.hero-map[data-focus="a"] .hero-node--a,
.hero-map[data-focus="b"] .hero-node--b,
.hero-map[data-focus="c"] .hero-node--c {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 0 20px -6px rgba(0, 229, 192, 0.35);
}

.hero-map[data-focus] .hero-out-card {
  opacity: 0.38;
}

.hero-map[data-focus="a"] .hero-out-card--path,
.hero-map[data-focus="b"] .hero-out-card--prov,
.hero-map[data-focus="c"] .hero-out-card--ret {
  opacity: 1;
  border-color: rgba(0, 229, 192, 0.32);
  background: rgba(0, 229, 192, 0.07);
}

.hero-map[data-focus] .hero-spine-rail {
  opacity: 0.35;
}

/* Section 4: leverage ledger */
.future-grid--ledger {
  max-width: none;
  margin-top: calc(var(--space-unit) * 1);
}

.viz--continuity {
  max-width: min(60rem, 100%);
}

.fc-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: calc(var(--space-unit) * 1.25);
  color: rgba(212, 165, 116, 0.5);
  border: 1px solid rgba(212, 165, 116, 0.12);
  border-radius: 10px;
  background: rgba(212, 165, 116, 0.04);
}

.fc-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: calc(var(--space-unit) * 1);
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.09em;
  color: rgba(212, 165, 116, 0.48);
}

.viz--continuity .future-card h3 {
  margin-bottom: calc(var(--space-unit) * 0.75);
}

.viz--continuity .future-card p {
  color: rgba(255, 255, 255, 0.44);
}

.future-grid--ledger:has(.future-card:hover) .future-card {
  opacity: 0.36;
  transform: translateY(0);
  filter: grayscale(0.06);
}

.future-grid--ledger:has(.future-card:hover) .future-card:hover {
  opacity: 1;
  filter: none;
  transform: translateY(-1px);
  border-color: rgba(212, 165, 116, 0.22);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 18px 44px -30px rgba(212, 165, 116, 0.15);
}

.future-grid--ledger:has(.future-card:nth-child(1):hover) .future-card:nth-child(2),
.future-grid--ledger:has(.future-card:nth-child(1):hover) .future-card:nth-child(3),
.future-grid--ledger:has(.future-card:nth-child(1):hover) .future-card:nth-child(4),
.future-grid--ledger:has(.future-card:nth-child(2):hover) .future-card:nth-child(1),
.future-grid--ledger:has(.future-card:nth-child(2):hover) .future-card:nth-child(3),
.future-grid--ledger:has(.future-card:nth-child(2):hover) .future-card:nth-child(4),
.future-grid--ledger:has(.future-card:nth-child(3):hover) .future-card:nth-child(1),
.future-grid--ledger:has(.future-card:nth-child(3):hover) .future-card:nth-child(2),
.future-grid--ledger:has(.future-card:nth-child(3):hover) .future-card:nth-child(4),
.future-grid--ledger:has(.future-card:nth-child(4):hover) .future-card:nth-child(1),
.future-grid--ledger:has(.future-card:nth-child(4):hover) .future-card:nth-child(2),
.future-grid--ledger:has(.future-card:nth-child(4):hover) .future-card:nth-child(3) {
  opacity: 0.82;
  filter: none;
  border-color: rgba(212, 165, 116, 0.14);
}

.future-grid--ledger:has(.future-card:nth-child(4):hover) .future-card:nth-child(1),
.future-grid--ledger:has(.future-card:nth-child(4):hover) .future-card:nth-child(2),
.future-grid--ledger:has(.future-card:nth-child(4):hover) .future-card:nth-child(3) {
  box-shadow: 0 0 32px -18px rgba(212, 165, 116, 0.12);
}

@keyframes latent-wire-dim {
  0%,
  100% {
    opacity: 0.38;
  }
  50% {
    opacity: 0.62;
  }
}

@keyframes lat-card-surface {
  0%,
  100% {
    border-color: rgba(139, 124, 246, 0.12);
  }
  50% {
    border-color: rgba(139, 124, 246, 0.2);
  }
}

@keyframes hero-flow-pulse {
  0%,
  100% {
    opacity: 0.55;
  }
  50% {
    opacity: 0.85;
  }
}

@keyframes record-flicker {
  0%,
  100% {
    opacity: 0.45;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes spine-glow {
  0%,
  100% {
    opacity: 0.78;
  }
  50% {
    opacity: 1;
  }
}

@keyframes pathway-breathe {
  0%,
  100% {
    opacity: 0.42;
  }
  50% {
    opacity: 0.72;
  }
}

@keyframes ambient-field {
  0% {
    opacity: 0.97;
  }
  100% {
    opacity: 1;
  }
}

@keyframes infra-grid-breathe {
  0% {
    opacity: 0.5;
  }
  100% {
    opacity: 0.58;
  }
}

@keyframes rupt-connector-breathe {
  0%,
  100% {
    opacity: 0.48;
    transform: translateX(0);
  }
  50% {
    opacity: 0.72;
    transform: translateX(0.4px);
  }
}

@keyframes rupt-connector-fracture {
  0%,
  100% {
    opacity: 0.28;
    transform: translateX(0) skewX(0deg);
  }
  40% {
    opacity: 0.42;
    transform: translateX(-0.6px) skewX(-1.2deg);
  }
  70% {
    transform: translateX(0.5px) skewX(0.8deg);
  }
}
/* --- Future grid --- */
.future-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: calc(var(--space-unit) * 2);
  padding: calc(var(--space-unit) * 1) 0;
}

.future-card {
  padding: calc(var(--space-unit) * 2.5);
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035) 0%, rgba(255, 255, 255, 0.015) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset;
  transition:
    border-color var(--dur-micro) var(--ease-luxury),
    background var(--dur-micro) var(--ease-luxury),
    transform var(--dur-micro) var(--ease-luxury),
    box-shadow var(--dur-micro) var(--ease-luxury),
    opacity var(--dur-micro) var(--ease-soft),
    filter var(--dur-micro) var(--ease-soft);
}

.future-card:hover {
  border-color: rgba(212, 165, 116, 0.18);
  background: linear-gradient(180deg, rgba(212, 165, 116, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 16px 40px -28px rgba(0, 0, 0, 0.4);
}

.future-card h3 {
  margin: 0 0 calc(var(--space-unit) * 1.25);
  font-family: var(--font-headline);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.032em;
  line-height: 1.2;
  color: var(--text-0);
  text-rendering: geometricPrecision;
}

.future-card p {
  margin: 0;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.62;
  letter-spacing: -0.004em;
  color: var(--text-3);
}

/* --- Footer --- */
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--space-unit) * 2);
  margin-top: auto;
  padding-top: calc(var(--space-unit) * 4.5);
  border-top: 1px solid var(--line);
}

.footer-note {
  margin: 0;
  flex: 1 1 14rem;
  max-width: 28rem;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.22);
}

.footer-btn {
  flex-shrink: 0;
  padding: 0.8rem 1.3rem;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-0);
  cursor: pointer;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #00f0d0 0%, var(--teal) 100%);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.28) inset,
    0 8px 24px -12px rgba(0, 229, 192, 0.25);
  transition:
    transform 0.55s var(--ease-luxury),
    box-shadow 0.55s var(--ease-luxury),
    filter 0.55s var(--ease-luxury);
}

.footer-btn:hover {
  filter: brightness(1.04);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.32) inset,
    0 14px 36px -14px rgba(0, 229, 192, 0.32);
}

.footer-btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.footer-btn:active {
  transform: translateY(1px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .diagram.hidden {
    transform: none;
  }

  body::before,
  .app-shell::before {
    animation: none !important;
  }

  .rupture-schematic:hover .rupt-dash {
    animation: none !important;
    transform: none !important;
  }

  .rupture-schematic:hover .rupture-pane--mid {
    transform: none !important;
  }
}

/* Responsive desktop / large tablet */
@media (max-width: 1024px) {
  .app-shell {
    grid-template-columns: 1fr;
    border: none;
  }

  .narrative-rail {
    position: relative;
    min-height: 0;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: calc(var(--space-unit) * 3);
  }

  .brand-logo {
    width: clamp(180px, 46vmin, 228px);
    height: clamp(180px, 46vmin, 228px);
    max-width: min(228px, 100%);
  }

  .timeline {
    flex: none;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: calc(var(--space-unit) * 1);
  }

  .experience-stage {
    padding: calc(var(--space-unit) * 3);
  }

  .refined-layout {
    grid-template-columns: 1fr;
  }

  .rupture-schematic {
    flex-wrap: wrap;
    justify-content: center;
    gap: calc(var(--space-unit) * 1);
  }

  .rupture-connector {
    flex: 1 1 100%;
    flex-direction: row;
    justify-content: center;
    padding: calc(var(--space-unit) * 1) 0;
    min-height: auto;
  }

  .rupture-connector .rupt-dash {
    max-width: 36px;
  }

  .rupture-pane--mid {
    margin-top: 0;
  }

  .hero-map {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-right: 0;
    gap: calc(var(--space-unit) * 2);
  }

  .hero-map__svg {
    display: none;
  }

  .hero-map__spine {
    flex-direction: row;
    justify-content: center;
    gap: calc(var(--space-unit) * 1.5);
    order: -1;
    padding: 0.75rem 0;
  }

  .hero-spine-rail {
    display: none;
  }

  .hero-map__vlabel {
    position: static;
    transform: none;
    writing-mode: horizontal-tb;
    text-align: center;
    width: 100%;
    padding: 0.5rem 0 0;
    letter-spacing: 0.12em;
  }

  .latent-schematic {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .latent-wires {
    opacity: 0.35;
  }

  .latent-col--core {
    order: -1;
    padding-bottom: 0.5rem;
  }
}

@media (max-width: 640px) {
  .timeline {
    grid-template-columns: 1fr;
  }

  .panel:not(.active) {
    max-height: 128px;
  }

  .future-grid {
    grid-template-columns: 1fr;
  }

  .hero-map__spine {
    flex-wrap: wrap;
  }

  .hero-node {
    width: 46px;
    height: 46px;
  }

  .latent-schematic {
    gap: 0.75rem;
  }

  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .footer-btn {
    width: 100%;
    max-width: none;
  }
}
