:root {
  color-scheme: dark;
  --void: #050706;
  --ink: #f0f4f1;
  --muted: #94a09a;
  --faint: #53605a;
  --line: rgba(225, 238, 231, 0.2);
  --line-strong: rgba(225, 238, 231, 0.46);
  --green: #47e6a5;
  --blue: #668cff;
  --orange: #ff7448;
  --yellow: #ffc83d;
  --sans: "Manrope", Arial, sans-serif;
  --serif: "Newsreader", Georgia, serif;
  --mono: "DM Mono", ui-monospace, Consolas, monospace;
  --header-height: 72px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--void);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

body.dialog-open {
  overflow: hidden;
}

button,
a {
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

a {
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

::selection {
  background: var(--yellow);
  color: var(--void);
}

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 14px;
  left: 14px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--void);
  font-family: var(--mono);
  font-size: 0.72rem;
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: none;
}

#observatory-canvas,
.canvas-fallback,
.screen-noise {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene-transition-line {
  position: fixed;
  z-index: 48;
  top: var(--header-height);
  bottom: 52px;
  left: -18vw;
  width: 18vw;
  border-right: 1px solid rgba(71, 230, 165, 0.9);
  background: linear-gradient(90deg, transparent, rgba(71, 230, 165, 0.08));
  opacity: 0;
  pointer-events: none;
  transform: skewX(-8deg);
}

body.is-scene-transitioning .scene-transition-line {
  animation: scene-scan 620ms cubic-bezier(0.22, 0.8, 0.24, 1) both;
}

@keyframes scene-scan {
  0% { left: -18vw; opacity: 0; }
  12% { opacity: 1; }
  86% { opacity: 0.62; }
  100% { left: 108vw; opacity: 0; }
}

#observatory-canvas {
  z-index: 0;
  display: block;
  touch-action: none;
}

.canvas-fallback {
  z-index: -2;
  background: #08100d;
}

.screen-noise {
  z-index: 1;
  pointer-events: none;
}

.screen-noise::before,
.screen-noise::after {
  position: absolute;
  content: "";
  pointer-events: none;
}

.screen-noise::before {
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.screen-noise::after {
  top: var(--header-height);
  bottom: 52px;
  left: 50%;
  border-left: 1px solid rgba(255, 255, 255, 0.035);
}

.observatory-header {
  position: fixed;
  z-index: 50;
  top: 0;
  right: 0;
  left: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 7, 6, 0.78);
  backdrop-filter: blur(12px);
}

.brand-lockup,
.archive-trigger {
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.brand-lockup {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-self: start;
}

.brand-lockup strong {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 500;
}

.brand-lockup span {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.system-status {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-self: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.live-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(71, 230, 165, 0.72);
}

.header-actions {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-self: end;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
}

.header-actions a,
.archive-trigger {
  position: relative;
  color: var(--muted);
}

.header-actions a:hover,
.archive-trigger:hover {
  color: var(--ink);
}

.archive-trigger span {
  margin-left: 5px;
  color: var(--green);
}

.scene-stage {
  position: fixed;
  z-index: 5;
  inset: var(--header-height) 0 52px;
  pointer-events: none;
}

.scene-panel {
  position: absolute;
  isolation: isolate;
  z-index: 6;
  width: min(520px, calc(100vw - 160px));
  max-height: calc(100vh - var(--header-height) - 64px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  padding-right: 8px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 24px, 0);
  backface-visibility: hidden;
  transition: opacity 180ms ease-out, transform 360ms cubic-bezier(0.16, 1, 0.3, 1), visibility 0s linear 360ms;
  will-change: opacity, transform;
}

.scene-panel::-webkit-scrollbar {
  width: 4px;
}

.scene-panel::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 4px;
}

.scene-panel::before {
  position: absolute;
  z-index: -1;
  inset: -20px -36px -20px -20px;
  background: radial-gradient(ellipse at left top, rgba(5, 7, 6, 0.94) 0%, rgba(5, 7, 6, 0.82) 65%, transparent 100%);
  content: "";
  pointer-events: none;
  backdrop-filter: blur(8px);
  border-radius: 8px;
}

.scene-panel.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition-delay: 0s;
}

.scene-panel-intro {
  top: 10%;
  left: 8%;
  width: min(580px, calc(100vw - 180px));
}

.scene-panel-compressor,
.scene-panel-aegis,
.scene-panel-gridium,
.scene-panel-topoflow {
  top: 8%;
  left: 8%;
  width: min(520px, 42vw);
}

.scene-panel-profile {
  top: 7%;
  left: 8%;
  width: min(560px, calc(100vw - 180px));
}

.scene-coordinate,
.scene-status,
.scene-footnote {
  font-family: var(--mono);
}

.scene-coordinate {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.scene-panel-topoflow .scene-coordinate {
  color: var(--blue);
}

.scene-panel-aegis .scene-coordinate {
  color: var(--orange);
}

.scene-panel-gridium .scene-coordinate {
  color: var(--yellow);
}

.scene-panel h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 5.2vw, 4.2rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.scene-panel h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 3.8vw, 3.2rem);
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.intro-role {
  margin: 14px 0 0;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.scene-lead {
  max-width: 500px;
  margin: 14px 0 0;
  color: #c3ccc7;
  font-size: clamp(0.86rem, 1.1vw, 0.96rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.scene-status {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}

.scene-status span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.55rem;
  text-transform: uppercase;
}

.intro-actions,
.scene-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
}

.live-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 15px;
  border: 1px solid var(--live-color, #47e6a5);
  background: var(--live-bg, rgba(71, 230, 165, 0.16));
  color: var(--live-color, #47e6a5);
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  border-radius: 2px;
  transition: all 180ms ease;
  box-shadow: 0 0 16px var(--live-glow, rgba(71, 230, 165, 0.22));
}

.scene-panel-aegis .live-action {
  --live-color: #ff7448;
  --live-bg: rgba(255, 116, 72, 0.18);
  --live-glow: rgba(255, 116, 72, 0.26);
}

.scene-panel-gridium .live-action {
  --live-color: #ffc83d;
  --live-bg: rgba(255, 200, 61, 0.18);
  --live-glow: rgba(255, 200, 61, 0.26);
}

.live-action:hover {
  background: var(--live-color, #47e6a5);
  color: #050706;
  box-shadow: 0 0 24px var(--live-color, #47e6a5);
  transform: translateY(-2px);
}

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
  animation: live-dot-pulse 1.8s ease-in-out infinite;
}

@keyframes live-dot-pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(0.7);
  }
}

.primary-action,
.quiet-action {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 38px;
  border: 0;
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  cursor: pointer;
}

.primary-action {
  min-width: 160px;
  padding: 8px 14px;
  background: var(--green);
  color: var(--void);
  font-weight: 500;
}

.scene-panel-topoflow .primary-action {
  background: var(--blue);
  color: #fff;
}

.scene-panel-aegis .primary-action {
  background: var(--orange);
}

.scene-panel-gridium .primary-action {
  background: var(--yellow);
}

.primary-action:hover {
  background: var(--ink);
  color: var(--void);
}

.quiet-action {
  position: relative;
  min-width: 0;
  padding: 0 4px;
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.quiet-action:hover {
  border-bottom-color: var(--green);
  color: var(--green);
}

.intro-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 48px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
  text-transform: uppercase;
}

.intro-legend span {
  display: flex;
  gap: 7px;
  align-items: center;
}

.intro-legend i {
  width: 12px;
  height: 2px;
}

.legend-green { background: var(--green); }
.legend-blue { background: var(--blue); }
.legend-orange { background: var(--orange); }

.metric-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 16px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.metric-strip > div {
  min-width: 0;
  padding: 8px 10px 8px 0;
  border-right: 1px solid var(--line);
}

.metric-strip > div + div {
  padding-left: 10px;
}

.metric-strip > div:last-child {
  border-right: 0;
}

.metric-strip strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
}

.metric-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.52rem;
  line-height: 1.3;
  text-transform: uppercase;
}

.scene-footnote {
  max-width: 480px;
  margin: 14px 0 0;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
  color: var(--muted);
  font-size: 0.56rem;
  line-height: 1.5;
}

.signal-readout {
  margin-top: 16px;
  border-top: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
}

.signal-readout > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 32px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.signal-readout > div:last-child {
  border-bottom: 0;
}

.signal-readout span {
  color: var(--muted);
}

.signal-readout strong {
  color: var(--orange);
  font-weight: 500;
}

.terminal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.54rem;
  text-transform: uppercase;
}

.terminal-bar span:last-child {
  color: var(--green);
}

.trajectory {
  margin-top: 14px;
  border-top: 1px solid var(--line-strong);
}

.trajectory article {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 14px;
  min-height: 52px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.trajectory time {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.6rem;
  text-transform: uppercase;
}

.trajectory strong,
.trajectory span {
  display: block;
}

.trajectory strong {
  margin-bottom: 2px;
  font-family: var(--serif);
  font-size: 0.98rem;
  font-weight: 400;
}

.trajectory span {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.4;
}

.profile-contact {
  margin: 16px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.profile-contact a {
  border-bottom: 1px solid var(--line);
}

.profile-contact a:hover {
  border-bottom-color: var(--green);
  color: var(--green);
}

.scene-rail {
  position: fixed;
  z-index: 30;
  top: 50%;
  left: 28px;
  display: grid;
  gap: 2px;
  transform: translateY(-50%);
}

.scene-rail button {
  display: grid;
  grid-template-columns: 28px 78px;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.55rem;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 150ms ease, transform 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.scene-rail button::before {
  position: absolute;
  left: -28px;
  width: 14px;
  height: 1px;
  background: currentColor;
  content: "";
}

.scene-rail button strong {
  font-weight: 400;
  opacity: 0;
  transform: translateX(-4px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.scene-rail button:hover,
.scene-rail button.is-current {
  color: var(--ink);
  transform: translateX(4px);
}

.scene-rail button:hover strong,
.scene-rail button.is-current strong {
  opacity: 1;
  transform: none;
}

.scene-rail button.is-current::before {
  width: 21px;
  background: var(--scene-accent, var(--green));
}

.scene-rail button[data-scene-jump="1"] { --scene-accent: var(--orange); }
.scene-rail button[data-scene-jump="2"] { --scene-accent: var(--yellow); }
.scene-rail button[data-scene-jump="3"] { --scene-accent: var(--green); }
.scene-rail button[data-scene-jump="4"] { --scene-accent: var(--blue); }

.evidence-layout-studio {
  align-items: start;
}

.studio-inspector {
  border: 1px solid var(--line-strong);
  background: #070a08;
}

.architecture-flow {
  display: grid;
  gap: 0;
  padding: 24px;
}

.architecture-flow > div {
  display: grid;
  grid-template-columns: 42px 110px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
}

.architecture-flow > div:last-of-type {
  border-bottom: 0;
}

.architecture-flow span,
.architecture-flow small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.architecture-flow strong {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 400;
}

.architecture-flow i {
  width: 1px;
  height: 20px;
  margin-left: 20px;
  background: var(--green);
}

.design-token-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.design-token-grid span {
  min-height: 82px;
  padding: 12px;
  border-right: 1px solid var(--line);
  box-shadow: inset 0 3px var(--token);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.56rem;
  text-transform: uppercase;
}

.design-token-grid span:last-child {
  border-right: 0;
}

.scene-instructions {
  position: fixed;
  z-index: 20;
  right: 28px;
  bottom: 67px;
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.52rem;
  text-transform: uppercase;
}

.scene-instructions i {
  width: 14px;
  height: 1px;
  background: var(--faint);
}

.floating-archive-pill {
  position: fixed;
  z-index: 30;
  bottom: 67px;
  left: 50%;
  transform: translateX(-50%);
  padding: 7px 20px;
  border: 1px solid var(--line-strong);
  background: rgba(5, 7, 6, 0.88);
  backdrop-filter: blur(8px);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  white-space: nowrap;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease;
}

.floating-archive-pill:hover {
  color: var(--ink);
  border-color: var(--green);
  background: rgba(5, 7, 6, 0.96);
}

.floating-archive-pill span {
  margin-left: 8px;
  color: var(--green);
}

.scene-announcer {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.evidence-dialog,
.archive-dialog {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0a0e0c;
  color: var(--ink);
}

.evidence-dialog::backdrop,
.archive-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
}

.dialog-shell {
  min-height: 100%;
  background: #0a0e0c;
}

.dialog-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 16px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 12, 0.95);
  backdrop-filter: blur(12px);
}

.dialog-header span {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.dialog-header h2 {
  margin: 2px 0 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
}

.icon-button {
  display: grid;
  width: 46px;
  height: 46px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--ink);
  color: var(--void);
}

.dialog-body {
  min-height: calc(100vh - 92px);
}

.evidence-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.7fr) minmax(0, 1.3fr);
  gap: 72px;
  width: min(1320px, calc(100% - 64px));
  margin: 0 auto;
  padding: 72px 0 90px;
}

.evidence-narrative {
  position: sticky;
  top: 150px;
  align-self: start;
}

.evidence-kicker {
  margin: 0 0 18px;
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.evidence-layout-topoflow .evidence-kicker {
  color: var(--blue);
}

.evidence-layout-aegis .evidence-kicker {
  color: var(--orange);
}

.evidence-narrative h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 3.2rem;
  font-weight: 400;
  line-height: 1;
}

.evidence-narrative > p:not(.evidence-kicker) {
  margin: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.evidence-narrative dl {
  margin: 30px 0;
  border-top: 1px solid var(--line-strong);
}

.evidence-narrative dl > div {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.evidence-narrative dt,
.evidence-narrative dd {
  font-size: 0.68rem;
}

.evidence-narrative dt {
  color: var(--green);
  font-family: var(--mono);
  text-transform: uppercase;
}

.evidence-narrative dd {
  margin: 0;
  color: #c3ccc7;
}

.evidence-narrative > a {
  display: inline-flex;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--green);
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.evidence-media-stack {
  display: grid;
  gap: 34px;
}

.evidence-media-stack figure {
  margin: 0;
}

.evidence-media-stack img {
  width: 100%;
  min-height: 260px;
  object-fit: contain;
  border: 1px solid var(--line);
  background: #0d1727;
}

.evidence-media-stack .figure-large img {
  max-height: 610px;
  object-fit: cover;
}

.evidence-media-stack figcaption {
  padding-top: 10px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
}

.evidence-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.contract-terminal {
  align-self: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  background: #050706;
}

.terminal-bar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.terminal-bar span:last-child {
  color: var(--green);
}

.contract-terminal pre {
  margin: 0;
  padding: 38px;
  overflow: auto;
  color: #b7f4d9;
  font-family: var(--mono);
  font-size: 0.9rem;
  line-height: 1.8;
}

.archive-shell {
  display: flex;
  flex-direction: column;
}

.archive-grid {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.archive-grid > a {
  position: relative;
  min-height: 270px;
  padding: 30px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  transition: background 180ms ease, color 180ms ease;
}

.archive-grid > a:nth-child(3n) {
  border-right: 0;
}

.archive-grid > a:hover {
  background: var(--green);
  color: var(--void);
}

.archive-grid span {
  display: block;
  margin-bottom: 48px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
  text-transform: uppercase;
}

.archive-grid > a:hover span,
.archive-grid > a:hover p {
  color: rgba(5, 7, 6, 0.7);
}

.archive-grid strong {
  display: block;
  max-width: 360px;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 400;
  line-height: 1.05;
}

.archive-grid p {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.76rem;
}

.archive-grid b {
  position: absolute;
  right: 28px;
  bottom: 24px;
  font-size: 1.3rem;
  font-weight: 400;
}

.archive-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  padding: 24px 32px;
}

.archive-footer > div {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: baseline;
}

.archive-footer span {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.archive-footer strong,
.archive-footer a {
  font-size: 0.72rem;
  font-weight: 400;
}

.noscript-message {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  padding: 40px;
  place-items: center;
  background: var(--void);
  color: var(--ink);
  text-align: center;
}

@media (max-width: 1100px) {
  .scene-panel-intro,
  .scene-panel-gridium,
  .scene-panel-topoflow,
  .scene-panel-profile {
    left: 10%;
  }

  .scene-panel-compressor,
  .scene-panel-aegis {
    right: 5%;
    left: auto;
  }

  .scene-panel h1 {
    font-size: 5rem;
  }

  .scene-panel h2 {
    font-size: 3.8rem;
  }

  .evidence-layout {
    grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
    gap: 42px;
  }

  .archive-grid strong {
    font-size: 1.65rem;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 62px;
  }

  .observatory-header {
    grid-template-columns: 1fr auto;
    padding: 0 16px;
  }

  .brand-lockup span,
  .system-status,
  .header-actions > a {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .archive-trigger {
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--line);
  }

  .scene-stage {
    inset: var(--header-height) 0 68px;
  }

  .scene-panel,
  .scene-panel-intro,
  .scene-panel-compressor,
  .scene-panel-topoflow,
  .scene-panel-aegis,
  .scene-panel-gridium,
  .scene-panel-profile {
    top: 8%;
    right: auto;
    left: 8%;
    width: min(540px, 84%);
  }

  .scene-panel h1 {
    font-size: 4.8rem;
  }

  .scene-panel h2 {
    font-size: 3.6rem;
  }

  .scene-lead {
    max-width: 500px;
  }

  .scene-rail {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0;
    min-height: 68px;
    border-top: 1px solid var(--line);
    background: rgba(5, 7, 6, 0.92);
    transform: none;
    backdrop-filter: blur(12px);
  }

  .scene-rail button {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
    min-height: 68px;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--line);
    text-align: center;
  }

  .scene-rail button::before,
  .scene-rail button strong {
    display: none;
  }

  .scene-rail button::after {
    color: currentColor;
    font-family: var(--mono);
    font-size: 0.42rem;
    line-height: 1;
    text-transform: uppercase;
    content: attr(data-short);
    opacity: 0.78;
  }

  .scene-rail button.is-current {
    background: var(--scene-accent, var(--green));
    color: var(--void);
  }

  .scene-instructions {
    display: none;
  }

  .floating-archive-pill {
    display: none;
  }

  .evidence-layout {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .evidence-narrative {
    position: static;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-grid > a,
  .archive-grid > a:nth-child(3n) {
    border-right: 1px solid var(--line);
  }

  .archive-grid > a:nth-child(even) {
    border-right: 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .scene-panel,
  .scene-panel-intro,
  .scene-panel-compressor,
  .scene-panel-topoflow,
  .scene-panel-aegis,
  .scene-panel-gridium,
  .scene-panel-profile {
    top: 5%;
    left: 18px;
    width: calc(100% - 36px);
    max-height: calc(100% - 18px);
    padding-right: 4px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .scene-panel::before,
  .scene-panel-compressor::before,
  .scene-panel-aegis::before {
    inset: -18px -12px -34px;
    background: linear-gradient(180deg, rgba(5, 7, 6, 0.98) 0 72%, rgba(5, 7, 6, 0.88) 88%, rgba(5, 7, 6, 0.35) 100%);
  }

  .scene-panel h1 {
    font-size: 3.8rem;
  }

  .scene-panel h2 {
    font-size: 3rem;
  }

  .scene-coordinate {
    margin-bottom: 13px;
  }

  .scene-status {
    margin-bottom: 14px;
  }

  .scene-lead {
    margin-top: 18px;
    font-size: 0.88rem;
    line-height: 1.55;
  }

  .intro-actions,
  .scene-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    margin-top: 22px;
  }

  .primary-action,
  .quiet-action {
    width: 100%;
    min-height: 42px;
  }

  .quiet-action {
    justify-content: space-between;
  }

  .intro-legend {
    gap: 9px 14px;
    margin-top: 26px;
  }

  .metric-strip {
    margin-top: 20px;
  }

  .metric-strip strong {
    font-size: 1.35rem;
  }

  .scene-footnote {
    margin-top: 17px;
  }

  .signal-readout,
  .trajectory {
    margin-top: 20px;
  }

  .architecture-flow > div {
    grid-template-columns: 34px 1fr;
  }

  .architecture-flow small {
    grid-column: 2;
  }

  .design-token-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trajectory article {
    min-height: 58px;
  }

  .dialog-header {
    min-height: 74px;
    padding: 12px 16px;
  }

  .dialog-header h2 {
    font-size: 1.55rem;
  }

  .icon-button {
    width: 42px;
    height: 42px;
  }

  .evidence-layout {
    width: calc(100% - 32px);
    padding: 45px 0 70px;
  }

  .evidence-narrative h3 {
    font-size: 2.35rem;
  }

  .evidence-media-stack img {
    min-height: 180px;
  }

  .evidence-pair {
    grid-template-columns: 1fr;
  }

  .contract-terminal pre {
    padding: 22px 16px;
    font-size: 0.69rem;
  }

  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid > a,
  .archive-grid > a:nth-child(3n),
  .archive-grid > a:nth-child(even) {
    min-height: 210px;
    padding: 24px 18px;
    border-right: 0;
  }

  .archive-grid span {
    margin-bottom: 30px;
  }

  .archive-footer {
    grid-template-columns: 1fr;
    padding: 24px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Spatial research console: selected direction */
.header-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--mono);
  font-size: inherit;
  text-transform: uppercase;
  cursor: pointer;
}

.header-link:hover {
  color: var(--ink);
}

.header-plus {
  width: 24px;
  min-height: 24px;
  color: var(--green);
}

.scene-stage { bottom: 52px; }
body[data-current-scene="0"] .scene-stage { bottom: 216px; }

.scene-panel-intro {
  top: 10%;
  left: 8.5%;
  width: min(510px, 39vw);
}

.scene-panel-intro h1 {
  font-size: clamp(4.7rem, 7.2vw, 7.2rem);
  line-height: 0.78;
}

.scene-panel-intro .scene-lead {
  max-width: 470px;
  font-size: 0.95rem;
}

.scene-panel:not(.scene-panel-intro) {
  top: 6%;
}

.origin-layer-map {
  position: fixed;
  z-index: 8;
  inset: var(--header-height) 0 216px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 0s linear 260ms;
}

body[data-current-scene="0"] .origin-layer-map {
  opacity: 1;
  visibility: visible;
  transition-delay: 180ms;
}

.origin-layer {
  position: absolute;
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.54rem;
  text-transform: uppercase;
}

.origin-layer::before {
  position: absolute;
  top: 8px;
  width: 46px;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0.45;
}

.origin-layer strong {
  color: currentColor;
  font-size: 0.61rem;
  font-weight: 500;
}

.origin-layer span {
  color: var(--faint);
}

.origin-layer-validation {
  top: 10%;
  left: 49%;
  color: var(--green);
}

.origin-layer-validation::before,
.origin-layer-model::before {
  right: calc(100% + 12px);
}

.origin-layer-service {
  top: 42%;
  right: 4.5%;
  color: var(--blue);
}

.origin-layer-service::before,
.origin-layer-data::before {
  right: calc(100% + 12px);
}

.origin-layer-model {
  top: 69%;
  left: 37%;
  color: var(--blue);
}

.origin-layer-data {
  right: 5%;
  bottom: 8%;
  color: var(--orange);
}

.systems-console {
  position: fixed;
  z-index: 28;
  right: 0;
  bottom: 52px;
  left: 0;
  display: grid;
  grid-template-columns: 188px minmax(0, 1fr) 96px;
  gap: 20px;
  align-items: center;
  min-height: 164px;
  padding: 14px 7.5vw;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 6, 0.88);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: opacity 220ms ease, transform 260ms ease, visibility 0s linear 260ms;
}

body[data-current-scene="0"] .systems-console {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition-delay: 120ms;
}

.systems-console-intro {
  align-self: center;
}

.systems-console-intro span {
  color: var(--green);
  font-family: var(--mono);
  font-size: 0.61rem;
  text-transform: uppercase;
}

.systems-console-intro p {
  max-width: 150px;
  margin: 12px 0 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.55rem;
}

.systems-console-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  min-width: 0;
  border: 1px solid var(--line);
}

.systems-console-grid button {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 112px;
  padding: 18px 16px;
  border: 0;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background 170ms ease, transform 170ms ease;
}

.systems-console-grid button:last-child {
  border-right: 0;
}

.systems-console-grid button::before {
  position: absolute;
  top: -1px;
  right: -1px;
  left: -1px;
  height: 2px;
  background: var(--console-accent);
  content: "";
  transform: scaleX(0.35);
  transform-origin: left;
  transition: transform 180ms ease;
}

.systems-console-grid button:hover,
.systems-console-grid button.is-current {
  background: rgba(255, 255, 255, 0.045);
  transform: translateY(-2px);
}

.systems-console-grid button:hover::before,
.systems-console-grid button.is-current::before {
  transform: scaleX(1);
}

.systems-console-grid span,
.systems-console-grid small {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.51rem;
  font-weight: 400;
  text-transform: uppercase;
}

.systems-console-grid strong {
  align-self: end;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 500;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.console-controls {
  display: grid;
  grid-template-columns: repeat(2, 42px);
  gap: 10px;
}

.console-controls button {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.console-controls button:hover {
  border-color: var(--green);
  color: var(--green);
}

.observatory-footer {
  position: fixed;
  z-index: 31;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 4.5vw;
  border-top: 1px solid var(--line);
  background: rgba(5, 7, 6, 0.96);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.54rem;
  text-transform: uppercase;
}

.observatory-footer > span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.observatory-footer i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(71, 230, 165, 0.65);
}

.observatory-footer nav {
  display: flex;
  gap: 32px;
  align-items: center;
}

.observatory-footer button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.observatory-footer a:hover,
.observatory-footer button:hover {
  color: var(--ink);
}

.observatory-footer b {
  margin-left: 8px;
  color: var(--green);
  font-weight: 400;
}

.scene-rail {
  top: calc(50% - 80px);
}

.scene-instructions,
.floating-archive-pill {
  display: none;
}

.archive-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.archive-grid > a {
  display: grid;
  grid-template-rows: 150px auto auto 1fr auto;
  min-height: 410px;
  padding: 0 22px 22px;
}

.archive-grid img {
  width: calc(100% + 44px);
  height: 150px;
  margin: 0 -22px 20px;
  border-bottom: 1px solid var(--line);
  object-fit: cover;
  filter: saturate(0.75) contrast(1.06) brightness(0.72);
  transition: filter 180ms ease;
}

.archive-grid > a:hover img {
  filter: saturate(1) contrast(1.02) brightness(0.9);
}

.archive-grid span {
  margin-bottom: 14px;
}

.archive-grid strong {
  font-size: 1.45rem;
}

@media (max-width: 1180px), (max-height: 760px) {
  .systems-console {
    display: none;
  }

  .observatory-footer {
    min-height: 52px;
  }

  .scene-stage,
  .origin-layer-map {
    bottom: 52px;
  }

  .scene-panel-intro {
    top: 12%;
    width: min(560px, 48vw);
  }

  .scene-panel:not(.scene-panel-intro) {
    top: 9%;
  }

  .origin-layer-map {
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .scene-rail {
    top: 50%;
  }
}

@media (max-width: 820px) {
  .observatory-footer {
    display: none;
  }

  .scene-stage {
    bottom: 68px;
  }

  body[data-current-scene="0"] .scene-stage {
    bottom: 68px;
  }

  .scene-rail {
    top: auto;
    bottom: 0;
  }

  .header-link {
    display: none;
  }

  .header-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .scene-panel-intro {
    width: min(540px, 84%);
  }

  .scene-panel-intro h1 {
    font-size: clamp(3.8rem, 18vw, 5.8rem);
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .archive-grid {
    grid-template-columns: 1fr;
  }

  .archive-grid > a {
    min-height: 390px;
  }
}

/* Procedural WebGL stage */
#observatory-canvas {
  z-index: 0;
  opacity: 1;
  background: #020403;
  mix-blend-mode: normal;
  transition: filter 320ms ease, opacity 320ms ease;
}

.screen-noise { z-index: 1; opacity: 0.16; }
.scene-stage { z-index: 3; }
.origin-layer-map { z-index: 5; }

.scene-panel-aegis,
.scene-panel-gridium,
.scene-panel-compressor,
.scene-panel-topoflow,
.scene-panel-profile {
  top: 7.5%;
  right: auto;
  left: 7.5%;
  width: min(520px, 42vw);
}

.scene-panel h1,
.scene-panel h2 {
  text-shadow: 0 12px 36px rgba(0, 0, 0, 0.82);
}

.scene-panel .scene-lead {
  color: #d0d8d3;
  text-shadow: 0 4px 24px #020302;
}

@media (max-width: 1180px), (max-height: 760px) {
  .scene-panel-aegis,
  .scene-panel-gridium,
  .scene-panel-compressor,
  .scene-panel-topoflow,
  .scene-panel-profile {
    top: 7%;
    width: min(500px, 48vw);
  }
}

@media (max-width: 820px) {
  #observatory-canvas { opacity: 0.92; }

  .scene-stage .scene-panel {
    position: absolute;
    top: auto !important;
    bottom: 8px !important;
    left: 4%;
    right: 4%;
    width: auto;
    max-height: 52vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(3, 7, 5, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(71, 230, 165, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.7);
  }

  .scene-stage .scene-panel::before {
    display: none;
  }

  .scene-stage .scene-panel h1,
  .scene-stage .scene-panel h2 {
    font-size: clamp(1.4rem, 6vw, 1.95rem);
    line-height: 1.02;
    margin: 6px 0;
  }

  .scene-stage .scene-lead {
    font-size: 0.78rem;
    line-height: 1.4;
    margin: 6px 0 0;
  }

  .scene-stage .metric-strip {
    margin-top: 8px;
  }

  .scene-stage .metric-strip strong {
    font-size: 1.25rem;
  }

  .scene-stage .metric-strip span {
    font-size: 0.5rem;
  }

  .scene-stage .signal-readout {
    margin-top: 8px;
  }

  .scene-stage .signal-readout > div {
    min-height: 26px;
    font-size: 0.58rem;
  }

  .scene-stage .scene-actions {
    margin-top: 10px;
    gap: 6px;
  }

  .scene-stage .live-action,
  .scene-stage .primary-action {
    min-height: 34px;
    padding: 6px 12px;
    font-size: 0.62rem;
  }

  .scene-stage .scene-footnote {
    margin: 6px 0 0;
    font-size: 0.54rem;
    line-height: 1.35;
  }
}
