:root {
  color-scheme: dark;
  --bg: #020806;
  --bg-deep: #000403;
  --panel: #061513;
  --panel-strong: #08211d;
  --panel-soft: #0b2622;
  --line: rgba(108, 241, 219, 0.18);
  --line-strong: rgba(108, 241, 219, 0.45);
  --text: #f5fff9;
  --muted: #a8c3ba;
  --dim: #76908a;
  --teal: #28e0c2;
  --cyan: #5edcff;
  --mint: #79f2a7;
  --amber: #f7c76b;
  --coral: #ff8f7a;
  --white: #ffffff;
  --radius: 8px;
  --content-max: 1240px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(94, 220, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40, 224, 194, 0.03) 1px, transparent 1px),
    linear-gradient(150deg, rgba(40, 224, 194, 0.12), transparent 32rem),
    var(--bg);
  background-size: 58px 58px, 58px 58px, auto, auto;
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
.pipeline-window:focus-visible {
  outline: 2px solid rgba(94, 220, 255, 0.78);
  outline-offset: 3px;
}

.dq-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(108, 241, 219, 0.14);
  background: rgba(2, 8, 6, 0.84);
  backdrop-filter: blur(18px);
}

.dq-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.dq-brand span:last-child {
  overflow-wrap: anywhere;
}

.dq-brand-symbol {
  flex: 0 0 auto;
  width: 0.9rem;
  height: 0.9rem;
  border: 1px solid var(--teal);
  box-shadow: 0 0 20px rgba(40, 224, 194, 0.4);
  transform: rotate(45deg);
}

.dq-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
}

.dq-nav a {
  padding: 0.45rem 0.65rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.86rem;
}

.dq-nav a:hover,
.dq-nav a:focus-visible {
  border-color: var(--line);
  color: var(--white);
}

.dq-nav a[aria-current="page"] {
  border-color: rgba(40, 224, 194, 0.44);
  background: rgba(40, 224, 194, 0.1);
  color: var(--white);
}

.section-shell {
  width: min(var(--content-max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 6.5rem) 0;
}

.hero-section {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(18rem, 0.68fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  min-height: calc(86vh - 4rem);
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.hero-copy {
  max-width: 48rem;
}

.eyebrow,
.panel-kicker {
  margin-bottom: 0.75rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-kicker {
  margin-bottom: 0.35rem;
  color: var(--cyan);
}

h1 {
  max-width: 13ch;
  margin-bottom: 1rem;
  color: var(--white);
  font-size: clamp(3rem, 8vw, 6.3rem);
  line-height: 0.95;
  overflow-wrap: break-word;
}

h2 {
  margin-bottom: 1rem;
  color: var(--white);
  font-size: clamp(2rem, 4.2vw, 3.8rem);
  line-height: 1.04;
  overflow-wrap: break-word;
}

h3 {
  margin-bottom: 0.65rem;
  color: var(--white);
  font-size: 1.12rem;
  line-height: 1.25;
}

h4 {
  margin-bottom: 0.55rem;
  color: var(--white);
  font-size: 0.98rem;
  line-height: 1.25;
}

.hero-subtitle {
  max-width: 44rem;
  margin-bottom: 1.1rem;
  color: var(--cyan);
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  font-weight: 700;
}

.hero-disclaimer,
.section-heading p,
.purpose-panel p,
.cta-copy p,
.disclaimer-section p {
  color: var(--muted);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
}

.hero-disclaimer {
  max-width: 43rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(247, 199, 107, 0.7);
}

.purpose-panel,
.pipeline-panel,
.controls-panel,
.scenario-panel,
.explanation-panel,
.disclaimer-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(14, 46, 40, 0.84), rgba(5, 18, 16, 0.92)),
    var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.purpose-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
}

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  margin-top: 0.8rem;
  padding: 0.72rem 1rem;
  border-radius: var(--radius);
  font-weight: 800;
}

.primary-link {
  border: 1px solid rgba(40, 224, 194, 0.74);
  background: rgba(40, 224, 194, 0.14);
  color: var(--white);
  box-shadow: 0 0 22px rgba(40, 224, 194, 0.18);
}

.secondary-link {
  border: 1px solid rgba(94, 220, 255, 0.44);
  color: var(--cyan);
}

.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.section-heading {
  max-width: 54rem;
  margin-bottom: 1.5rem;
}

.section-heading.narrow {
  max-width: 46rem;
}

.lab-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  align-items: start;
}

.pipeline-panel {
  min-width: 0;
  padding: clamp(0.75rem, 1.5vw, 1rem);
}

.pipeline-heading,
.panel-heading,
.cta-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.motion-note {
  max-width: 16rem;
  margin-bottom: 0;
  color: var(--dim);
  font-size: 0.82rem;
}

.pipeline-window {
  overflow: hidden;
  border: 1px solid rgba(108, 241, 219, 0.16);
  border-radius: var(--radius);
  background: rgba(0, 7, 7, 0.42);
}

.pipeline-visual {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: clamp(20rem, 32vw, 25rem);
  overflow: hidden;
  --bottleneck-opacity: 0.12;
  --instability: 0.08;
  --marker-opacity: 0.8;
  --noise-opacity: 0.05;
  --packet-opacity: 0.95;
  --recovery-opacity: 0;
  --trace-opacity: 0.82;
  --trail-length: 4rem;
}

.pipeline-line {
  position: absolute;
  z-index: 1;
  top: 49%;
  right: 3rem;
  left: 3rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(94, 220, 255, 0.32), transparent);
  transform: translateY(-50%);
}

.stage-grid {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  min-height: clamp(20rem, 32vw, 25rem);
  padding: 0.75rem;
}

.pipeline-stage {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 18rem;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: flex-start;
  padding: 0.85rem;
  border: 1px solid rgba(108, 241, 219, 0.16);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(9, 32, 30, 0.8), rgba(3, 11, 12, 0.84)),
    var(--panel);
}

.pipeline-stage:not(:last-child)::after {
  position: absolute;
  top: 49%;
  right: -0.54rem;
  z-index: 5;
  color: rgba(94, 220, 255, 0.72);
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
  content: ">";
  transform: translateY(-50%);
}

.stage-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}

.stage-number {
  display: inline-flex;
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(94, 220, 255, 0.42);
  border-radius: 50%;
  color: var(--cyan);
  font-size: 0.78rem;
  font-weight: 850;
}

.pipeline-stage h4 {
  margin-bottom: 0;
  font-size: clamp(0.88rem, 1vw, 1.04rem);
  line-height: 1.15;
}

.pipeline-stage p,
.pipeline-stage li,
.visual-status,
.control-item p,
.scenario-button,
.explanation-panel p,
.insight-card p,
.reflection-card p {
  color: var(--muted);
  font-size: 0.9rem;
}

.pipeline-stage p {
  margin-bottom: 0;
  font-size: 0.82rem;
  line-height: 1.38;
}

.pipeline-stage ul {
  display: grid;
  gap: 0.32rem;
  margin: auto 0 0;
  padding: 0;
  list-style: none;
}

.pipeline-stage li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  line-height: 1.3;
}

.pipeline-stage li::before {
  flex: 0 0 auto;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--teal);
  content: "";
}

.packet-layer,
.signal-noise,
.bottleneck,
.governance-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.packet-layer {
  z-index: 2;
}

.packet {
  position: absolute;
  top: var(--lane-y, 50%);
  left: -9%;
  width: 4.75rem;
  height: 1rem;
  opacity: var(--packet-opacity);
  transform: translateY(-50%);
  animation-name: packetMove;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-duration: var(--packet-duration, 9s);
  animation-delay: var(--packet-delay, 0s);
}

.packet.is-hidden {
  opacity: 0;
  animation-play-state: paused;
}

.packet-trail {
  position: absolute;
  top: 50%;
  right: 0.55rem;
  width: var(--trail-length);
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(94, 220, 255, 0.9));
  opacity: var(--trace-opacity);
  transform: translateY(-50%);
}

.packet-core {
  position: absolute;
  top: 50%;
  right: 0;
  width: 0.7rem;
  height: 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  background: var(--teal);
  box-shadow: 0 0 18px rgba(40, 224, 194, 0.64);
  transform: translateY(-50%) rotate(45deg);
  animation: packetFlicker 1.35s steps(3, end) infinite;
}

.packet:nth-child(1) { --static-x: 7%; }
.packet:nth-child(2) { --static-x: 16%; }
.packet:nth-child(3) { --static-x: 24%; }
.packet:nth-child(4) { --static-x: 31%; }
.packet:nth-child(5) { --static-x: 39%; }
.packet:nth-child(6) { --static-x: 47%; }
.packet:nth-child(7) { --static-x: 55%; }
.packet:nth-child(8) { --static-x: 63%; }
.packet:nth-child(9) { --static-x: 71%; }
.packet:nth-child(10) { --static-x: 79%; }
.packet:nth-child(11) { --static-x: 87%; }
.packet:nth-child(12) { --static-x: 94%; }

.bottleneck {
  z-index: 1;
  left: 44%;
  right: 44%;
  border-right: 1px solid rgba(247, 199, 107, 0.78);
  border-left: 1px solid rgba(247, 199, 107, 0.78);
  background: linear-gradient(90deg, transparent, rgba(247, 199, 107, 0.14), transparent);
  opacity: var(--bottleneck-opacity);
}

.signal-noise {
  z-index: 2;
  background:
    repeating-linear-gradient(
      110deg,
      transparent 0 14px,
      rgba(255, 143, 122, 0.12) 14px 15px,
      transparent 15px 31px
    );
  mix-blend-mode: screen;
  opacity: var(--noise-opacity);
}

.governance-markers {
  z-index: 6;
}

.governance-marker {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 1.55rem;
  max-width: 10.5rem;
  padding: 0.24rem 0.46rem;
  border: 1px solid rgba(121, 242, 167, 0.42);
  border-radius: 999px;
  background: rgba(4, 18, 14, 0.82);
  color: #d9ffe6;
  font-size: 0.68rem;
  font-weight: 800;
  opacity: calc(var(--marker-opacity) + var(--recovery-opacity) * 0.2);
}

.marker-validation {
  top: 11%;
  left: 27%;
}

.marker-lineage {
  right: 31%;
  bottom: 10%;
}

.marker-review {
  top: 11%;
  right: 15%;
}

.marker-escalation {
  right: 5%;
  bottom: 10%;
  border-color: rgba(247, 199, 107, 0.56);
  color: #fff0c7;
}

.pipeline-visual[data-scenario="fragmented"] .packet-core {
  background: var(--coral);
  box-shadow: 0 0 18px rgba(255, 143, 122, 0.52);
}

.pipeline-visual[data-scenario="recovery"] .packet-core {
  background: var(--cyan);
  box-shadow: 0 0 18px rgba(94, 220, 255, 0.58);
}

.visual-status {
  margin: 0.9rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(108, 241, 219, 0.14);
  border-radius: var(--radius);
  background: rgba(3, 14, 13, 0.72);
}

.interaction-column {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(14rem, 0.72fr) minmax(0, 0.9fr);
  gap: 1rem;
  align-items: stretch;
}

.controls-panel,
.scenario-panel,
.explanation-panel {
  min-width: 0;
  height: 100%;
  padding: 1rem;
}

.panel-heading {
  margin-bottom: 0.85rem;
}

.control-list {
  display: grid;
  gap: 0.9rem;
}

.control-item {
  padding: 0.85rem;
  border: 1px solid rgba(108, 241, 219, 0.12);
  border-radius: var(--radius);
  background: rgba(3, 16, 14, 0.58);
}

.control-item label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.55rem;
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 800;
}

.condition-pill {
  flex: 0 0 auto;
  padding: 0.18rem 0.5rem;
  border: 1px solid rgba(94, 220, 255, 0.36);
  border-radius: 999px;
  color: var(--cyan);
  font-size: 0.72rem;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--teal);
  cursor: pointer;
}

.slider-scale {
  display: flex;
  justify-content: space-between;
  margin-top: 0.18rem;
  color: var(--dim);
  font-size: 0.72rem;
}

.control-item p {
  margin: 0.35rem 0 0;
}

.scenario-options {
  display: grid;
  gap: 0.65rem;
}

.scenario-button {
  width: 100%;
  min-height: 3.15rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(108, 241, 219, 0.16);
  border-radius: var(--radius);
  background: rgba(2, 12, 11, 0.82);
  color: var(--text);
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.scenario-button:hover,
.scenario-button.is-active {
  border-color: rgba(40, 224, 194, 0.62);
  background: rgba(40, 224, 194, 0.13);
  color: var(--white);
}

.explanation-panel {
  border-color: rgba(94, 220, 255, 0.28);
}

.governance-message {
  margin-bottom: 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(94, 220, 255, 0.14);
  color: #d9ffe6;
}

.insight-grid,
.reflection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

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

.insight-card,
.reflection-card {
  min-width: 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(5, 21, 19, 0.78);
}

.insight-card h3,
.reflection-card h3 {
  font-size: 1rem;
}

.prompt-number {
  display: inline-flex;
  margin-bottom: 0.8rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
}

.cta-section {
  align-items: center;
  border-top: 1px solid rgba(108, 241, 219, 0.14);
  border-bottom: 1px solid rgba(108, 241, 219, 0.14);
}

.cta-copy {
  max-width: 40rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.disclaimer-section {
  margin-bottom: clamp(2rem, 4vw, 4rem);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.disclaimer-section h2 {
  font-size: clamp(1.65rem, 3vw, 2.5rem);
}

body.is-tab-hidden .packet,
body.is-tab-hidden .packet-core {
  animation-play-state: paused;
}

@keyframes packetMove {
  from {
    left: -9%;
  }

  to {
    left: 104%;
  }
}

@keyframes packetFlicker {
  0%,
  100% {
    opacity: 1;
    filter: none;
  }

  35% {
    opacity: calc(1 - var(--instability) * 0.46);
    filter: blur(calc(var(--instability) * 1px));
  }

  68% {
    opacity: calc(1 - var(--instability) * 0.24);
    filter: brightness(calc(1 + var(--instability) * 0.7));
  }
}

@media (max-width: 980px) {
  .hero-section,
  .cta-section {
    grid-template-columns: 1fr;
  }

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

  .explanation-panel {
    grid-column: 1 / -1;
  }

  .hero-section {
    min-height: auto;
  }

  .pipeline-heading,
  .panel-heading,
  .cta-section {
    display: block;
  }

  .motion-note {
    max-width: none;
  }

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

  .cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 860px) {
  .stage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 0;
  }

  .pipeline-stage {
    min-height: 14rem;
  }

  .pipeline-stage:not(:last-child)::after {
    display: none;
  }

  .pipeline-line {
    right: 2rem;
    left: 2rem;
  }

  .governance-marker {
    display: none;
  }
}

@media (max-width: 680px) {
  .dq-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .dq-nav {
    justify-content: flex-start;
  }

  .section-shell {
    width: min(100% - 1rem, var(--content-max));
  }

  h1 {
    font-size: clamp(2.55rem, 17vw, 4rem);
  }

  .pipeline-panel,
  .controls-panel,
  .scenario-panel,
  .explanation-panel {
    padding: 0.75rem;
  }

  .pipeline-visual,
  .stage-grid {
    min-width: 0;
    min-height: 0;
  }

  .stage-grid,
  .interaction-column {
    grid-template-columns: 1fr;
  }

  .insight-grid,
  .reflection-grid,
  .cta-actions {
    grid-template-columns: 1fr;
  }

  .primary-link,
  .secondary-link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .primary-link:hover,
  .secondary-link:hover {
    transform: none;
  }

  .packet {
    left: var(--static-x);
    animation: none !important;
  }

  .packet-core {
    animation: none !important;
  }
}
