:root {
  /* Design typography tokens: Interface Text:** "Space Grotesk" (Google Fonts IntersectionObserver (threshold: [0 Interval` with `Math.random( Space Grotesk (Frutiger lineage */
  --hex-size: clamp(100px, 12vw, 180px);
  --hex-gap: 4px;
  --bg: #0C0E1A;
  --surface: #1A1E35;
  --pink: #FF6EC7;
  --blue: #00E5FF;
  --lime: #BFFF00;
  --coral: #FF7043;
  --white: #E8EAF6;
  --muted: #6B7394;
  --zone-hue: 0deg;
  --zone-index: 0;
  --scanline-opacity: 0.04;
  --angle: 0deg;
}

@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: #0C0E1A;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Space Grotesk', Inter, sans-serif;
  font-size: clamp(0.875rem, 1.2vw, 1.1rem);
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.6;
  color: #E8EAF6;
  background:
    radial-gradient(ellipse at calc(30% + (var(--zone-index) * 9%)) calc(70% - (var(--zone-index) * 6%)), rgba(255, 110, 199, 0.15), rgba(0, 229, 255, 0.08), transparent 70%),
    radial-gradient(circle at 75% 20%, rgba(191, 255, 0, 0.07), transparent 34%),
    #0C0E1A;
  transition: background-position 900ms ease, filter 900ms ease;
  filter: hue-rotate(var(--zone-hue));
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
}

body::before {
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
  mix-blend-mode: screen;
}

body::after {
  opacity: var(--scanline-opacity);
  background: repeating-linear-gradient(transparent, transparent 2px, rgba(0, 0, 0, 0.8) 2px, rgba(0, 0, 0, 0.8) 4px);
  transition: opacity 120ms steps(2);
}

.wireframe {
  position: fixed;
  inset: -20vmax;
  z-index: -3;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='156' height='136' viewBox='0 0 156 136'%3E%3Cg fill='none' stroke='%2300E5FF' stroke-width='.7' filter='blur(.3px)'%3E%3Cpath d='M39 1 77 23v44L39 89 1 67V23Z'/%3E%3Cpath d='M117 1 155 23v44l-38 22-38-22V23Z'/%3E%3Cpath d='M78 67 116 89v44l-38 22-38-22V89Z'/%3E%3C/g%3E%3C/svg%3E");
  transform: rotate(calc(var(--zone-index) * 30deg));
  transition: transform 1000ms ease;
}

.station-shell { width: 100%; }

.monitoring-zone {
  position: relative;
  min-height: 100vh;
  padding: clamp(5rem, 9vw, 8rem) 8vw;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.zone-grid {
  display: grid;
  gap: calc(var(--hex-gap) * 1.5);
  width: min(1120px, 88vw);
  margin: 0 auto;
  transform: translateX(calc((var(--zone-index) - 2) * 0.5vw));
}

.hex-row {
  display: flex;
  gap: var(--hex-gap);
  align-items: center;
}

.row-two { margin-left: calc(var(--hex-size) / 2); }
.row-three { margin-left: calc(var(--hex-size) * 0.12); }
.offset-heavy { margin-left: calc(var(--hex-size) * 0.9); }

.hex-cell,
.hex-cluster {
  position: relative;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: linear-gradient(145deg, rgba(26, 30, 53, 0.92), rgba(12, 14, 26, 0.96));
  color: #E8EAF6;
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, 0.18), inset 0 0 44px rgba(0, 229, 255, 0.035);
  contain: layout paint;
}

.hex-cell {
  width: var(--hex-size);
  aspect-ratio: 1.1547 / 1;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.2rem;
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  letter-spacing: 0.1em;
  color: #6B7394;
}

.hex-cell::before,
.hex-cluster::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px;
  clip-path: inherit;
  background: conic-gradient(from var(--angle), #FF6EC7, #00E5FF, #BFFF00, #FF6EC7);
  opacity: 0;
  animation: spin-edge 8s linear infinite;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.hex-cell:hover::before,
.hex-cell.live::before,
.hex-cluster::before { opacity: 0.75; }

.hex-cluster {
  width: min(calc(var(--hex-size) * 4.2), 58vw);
  min-height: calc(var(--hex-size) * 2.12);
  padding: clamp(2rem, 4vw, 4rem) clamp(2rem, 5vw, 5.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 110, 199, 0.12), transparent 42%),
    radial-gradient(circle, rgba(107, 115, 148, 0.35) 0.5px, transparent 0.5px) 0 0 / 8px 8px,
    linear-gradient(145deg, rgba(26, 30, 53, 0.95), rgba(12, 14, 26, 0.9));
}

.hero-cluster { width: min(calc(var(--hex-size) * 5.2), 68vw); min-height: calc(var(--hex-size) * 2.8); }
.archive-cluster, .deck-cluster, .core-cluster { width: min(calc(var(--hex-size) * 4.8), 64vw); }

.system-label,
.terminal-line,
.data span,
.warning span {
  font-family: 'Share Tech Mono', monospace;
  font-size: clamp(0.75rem, 1vw, 0.9rem);
  letter-spacing: 0.1em;
}

.system-label { color: #00E5FF; margin: 0 0 0.7rem; }
.terminal-line { color: #FF7043; margin-top: 1.2rem; }
.lead { max-width: 42rem; color: #E8EAF6; }
p { color: #C8CCE4; margin: 0; }

.glitch-title {
  position: relative;
  margin: 0 0 1rem;
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: 0.2em;
  line-height: 1.05;
  text-transform: uppercase;
  color: #E8EAF6;
  text-shadow: 2px 0 #FF6EC7, -2px 0 #00E5FF;
}

.glitch-title span { display: inline-block; animation: hex-jitter 0.15s infinite steps(2); }
.glitch-title span:nth-child(2n) { animation-delay: 42ms; }
.glitch-title span:nth-child(3n) { animation-delay: 91ms; }
.glitch-title::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: rgba(255, 112, 67, 0.35);
  clip-path: inset(62% 0 18% 0);
  transform: translateX(-4px);
  opacity: 0;
}

.glitching .glitch-title,
.glitch-title.aggressive { animation: rgb-split 180ms steps(1) 2; }
.glitching .glitch-title::after { opacity: 1; animation: glitch-shift 150ms steps(1) 2; }

.stable { color: #FF6EC7; }
.anomalous { color: #00E5FF; }
.critical { color: #FF7043; }
.warning { color: #BFFF00; }
.coral { color: #FF7043; }
.dormant { background: rgba(26, 30, 53, 0.35); }

.icon-cell svg {
  width: calc(var(--hex-size) * 0.4);
  height: calc(var(--hex-size) * 0.4);
  fill: none;
  stroke: #00E5FF;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 170;
  animation: draw-icon 4s ease-in-out infinite alternate;
}

.live { background: radial-gradient(circle, rgba(0, 229, 255, 0.28), rgba(26, 30, 53, 0.95)); animation: cell-pulse 2.4s ease-in-out infinite; }
.live.hot { background: radial-gradient(circle, rgba(255, 110, 199, 0.32), rgba(26, 30, 53, 0.95)); animation-duration: 1.7s; }
.live.lime { background: radial-gradient(circle, rgba(191, 255, 0, 0.28), rgba(26, 30, 53, 0.95)); animation-duration: 2.05s; }

.frequency-cluster {
  position: absolute;
  left: 50%;
  bottom: clamp(1.2rem, 3vw, 3rem);
  transform: translateX(-50%);
  width: min(520px, 68vw);
  height: 74px;
  clip-path: polygon(8% 0%, 92% 0%, 100% 50%, 92% 100%, 8% 100%, 0% 50%);
  background: rgba(26, 30, 53, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  box-shadow: inset 0 0 0 1px rgba(255, 110, 199, 0.18);
}

.frequency-cluster i {
  width: 5px;
  height: 42px;
  background: #FF6EC7;
  transform-origin: 50% 100%;
  animation: bar-wave 0.52s ease-in-out infinite alternate;
}
.frequency-cluster i:nth-child(2n) { background: #00E5FF; animation-duration: 0.38s; }
.frequency-cluster i:nth-child(3n) { background: #BFFF00; animation-duration: 0.72s; }
.frequency-cluster i:nth-child(5n) { background: #FF7043; animation-duration: 0.63s; }

.zone-nav {
  position: fixed;
  right: 2vw;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: grid;
  gap: 14px;
}

.zone-dot {
  width: 24px;
  aspect-ratio: 1.1547 / 1;
  border: 0;
  cursor: pointer;
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: #1A1E35;
  box-shadow: inset 0 0 0 1px #6B7394, 0 0 14px rgba(0, 229, 255, 0.12);
  animation: nav-pulse 2.8s ease-in-out infinite;
}
.zone-dot:nth-child(2) { animation-duration: 3.3s; }
.zone-dot:nth-child(3) { animation-duration: 2.2s; }
.zone-dot:nth-child(4) { animation-duration: 3.8s; }
.zone-dot:nth-child(5) { animation-duration: 1.9s; }
.zone-dot.active { background: #FF6EC7; box-shadow: 0 0 22px #FF6EC7, 0 0 35px rgba(0, 229, 255, 0.3); }

.blob {
  position: absolute;
  z-index: -2;
  width: clamp(220px, 30vw, 420px);
  aspect-ratio: 1;
  opacity: 0.16;
  filter: blur(4px);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  animation: blob-morph 18s ease-in-out infinite, drift-1 34s ease-in-out infinite alternate;
}
.blob-a { left: 8vw; top: 12vh; background: #FF6EC7; }
.blob-b { right: 14vw; bottom: 10vh; background: #00E5FF; animation-name: blob-morph, drift-2; animation-duration: 22s, 38s; }
.blob-c { left: 20vw; bottom: 8vh; background: #BFFF00; animation-name: blob-morph, drift-3; animation-duration: 20s, 32s; }
.blob-d { right: 8vw; top: 14vh; background: #FF7043; animation-name: blob-morph, drift-4; animation-duration: 24s, 36s; }
.archive-shift { opacity: 0.2; }
.deck-shift { opacity: 0.22; }
.core-shift { opacity: 0.28; mix-blend-mode: screen; }

.corruption-strip {
  position: fixed;
  left: 10vw;
  top: 50vh;
  height: 4px;
  width: 60vw;
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  background: #FF7043;
  box-shadow: 0 0 20px currentColor;
}
.corruption-strip.flash { animation: strip-flash 140ms steps(1); }

.compact { width: min(1040px, 86vw); }
.fractured .hex-cell:nth-child(odd), .core-grid .hex-cell:nth-child(even) { transform: translateY(-14px) rotate(-2deg); }
.fractured .hex-cell:nth-child(even), .core-grid .hex-cell:nth-child(odd) { transform: translateY(18px) rotate(2deg); }
.core-grid { filter: saturate(1.2) contrast(1.05); }

@keyframes spin-edge { to { --angle: 360deg; } }
@keyframes hex-jitter { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(2px); } }
@keyframes rgb-split { 0% { text-shadow: 2px 0 #FF6EC7, -2px 0 #00E5FF; } 50% { text-shadow: 8px 0 #FF6EC7, -8px 0 #00E5FF; transform: skewX(-5deg); } 100% { text-shadow: 2px 0 #FF6EC7, -2px 0 #00E5FF; } }
@keyframes glitch-shift { 0% { transform: translate(0); } 33% { transform: translate(7px, -3px) skewX(8deg); } 66% { transform: translate(-5px, 2px) skewX(-6deg); } 100% { transform: translate(0); } }
@keyframes cell-pulse { 0%, 100% { opacity: 0.65; transform: scale(0.98); } 50% { opacity: 1; transform: scale(1.02); } }
@keyframes nav-pulse { 0%, 100% { opacity: 0.45; } 50% { opacity: 1; } }
@keyframes bar-wave { from { transform: scaleY(0.12); } to { transform: scaleY(1); } }
@keyframes draw-icon { from { stroke-dashoffset: 170; } to { stroke-dashoffset: 0; } }
@keyframes blob-morph { 0%, 100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; } 35% { border-radius: 70% 30% 40% 60% / 60% 70% 30% 40%; } 70% { border-radius: 45% 55% 75% 25% / 35% 60% 40% 65%; } }
@keyframes drift-1 { 0% { transform: translate3d(0, 0, 0); } 35% { transform: translate3d(calc(var(--hex-size) * 1), calc(var(--hex-size) * .55), 0); } 70% { transform: translate3d(calc(var(--hex-size) * 2), calc(var(--hex-size) * -.35), 0); } 100% { transform: translate3d(calc(var(--hex-size) * .5), calc(var(--hex-size) * 1.1), 0); } }
@keyframes drift-2 { 0% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(calc(var(--hex-size) * -1.5), calc(var(--hex-size) * -.5), 0); } 100% { transform: translate3d(calc(var(--hex-size) * -.5), calc(var(--hex-size) * .9), 0); } }
@keyframes drift-3 { 0% { transform: translate3d(0, 0, 0); } 45% { transform: translate3d(calc(var(--hex-size) * 1.5), calc(var(--hex-size) * -1), 0); } 100% { transform: translate3d(calc(var(--hex-size) * 2.5), calc(var(--hex-size) * .55), 0); } }
@keyframes drift-4 { 0% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(calc(var(--hex-size) * -2), calc(var(--hex-size) * .65), 0); } 100% { transform: translate3d(calc(var(--hex-size) * -1), calc(var(--hex-size) * -1), 0); } }
@keyframes strip-flash { 0% { opacity: 0; transform: translateX(-5vw); } 30%, 80% { opacity: 1; transform: translateX(0); } 100% { opacity: 0; transform: translateX(3vw); } }

@media (max-width: 768px) {
  :root { --hex-size: clamp(86px, 28vw, 130px); }
  .monitoring-zone { padding: 5rem 5vw; }
  .zone-grid { width: 94vw; }
  .hex-cluster, .hero-cluster, .archive-cluster, .deck-cluster, .core-cluster { width: min(92vw, calc(var(--hex-size) * 3.4)); padding: 2.5rem 2.25rem; }
  .hex-row { flex-wrap: wrap; }
  .row-two, .row-three, .offset-heavy { margin-left: calc(var(--hex-size) * 0.25); }
  .zone-nav { right: 1vw; }
}

@media (max-width: 480px) {
  :root { --hex-size: 84vw; }
  .monitoring-zone { min-height: auto; padding: 4.5rem 4vw 7rem; }
  .hex-row { display: grid; justify-items: center; margin-left: 0; }
  .hex-row:nth-child(even) { transform: translateX(5vw); }
  .hex-cell { width: 68vw; }
  .hex-cluster, .hero-cluster, .archive-cluster, .deck-cluster, .core-cluster { width: 90vw; min-height: 62vw; }
  .zone-dot { width: 18px; }
  .frequency-cluster { width: 86vw; }
}
