/* vertex-shader.html — Vertex Space Pipeline Explorer */

.doc-vse {
  margin: 1.05rem 0 0;
  border-radius: 16px;
  border: 1px solid rgba(94, 180, 255, 0.26);
  background: linear-gradient(168deg,
      rgba(16, 22, 42, 0.82) 0%,
      rgba(10, 14, 28, 0.72) 48%,
      rgba(18, 14, 36, 0.78) 100%);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.42) inset,
    0 12px 38px rgba(0, 0, 0, 0.38);
  overflow: hidden;
}

.doc-vse__top {
  padding: 0.75rem 0.9rem 0.65rem;
  background: radial-gradient(110% 85% at 50% 12%,
      rgba(46, 231, 242, 0.06) 0%,
      transparent 52%),
    rgba(5, 8, 18, 0.52);
  border-bottom: 1px solid rgba(110, 150, 210, 0.14);
}

.doc-vse__viewport {
  position: relative;
  margin: 0 auto;
  max-width: min(100%, 1060px);
  height: clamp(280px, 46vmin, 520px);
  min-height: 280px;
  border-radius: 14px;
  border: 1px solid rgba(110, 150, 210, 0.18);
  background: rgba(5, 10, 22, 0.55);
  overflow: hidden;
}

.doc-vse__viewport canvas[data-vse-canvas] {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.doc-vse__badge {
  position: absolute;
  left: 0.65rem;
  top: 0.65rem;
  z-index: 2;
  padding: 0.35rem 0.5rem;
  border-radius: 12px;
  border: 1px solid rgba(120, 190, 255, 0.22);
  background: linear-gradient(165deg,
      rgba(18, 28, 48, 0.55) 0%,
      rgba(10, 14, 28, 0.72) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35) inset,
    0 8px 24px rgba(0, 0, 0, 0.35);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(210, 235, 255, 0.92);
  pointer-events: none;
}

.doc-vse__bottom {
  display: grid;
  grid-template-columns: 1fr 1.5fr 1fr;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem 0.85rem;
  border-bottom: 1px solid rgba(110, 150, 210, 0.12);
}

.doc-vse__panel {
  border-radius: 12px;
  border: 1px solid rgba(94, 200, 255, 0.14);
  background: rgba(8, 14, 28, 0.55);
  padding: 0.65rem 0.7rem 0.7rem;
  min-height: 0;
}

.doc-vse__h {
  margin: 0 0 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(190, 208, 240, 0.9);
}

.doc-vse__space {
  display: grid;
  gap: 0.35rem;
}

.doc-vse__radio,
.doc-vse__chk {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: rgba(190, 208, 240, 0.94);
  cursor: pointer;
}

.doc-vse__radio input,
.doc-vse__chk input {
  accent-color: #5ec8ff;
}

.doc-vse__controls {
  margin-top: 0.6rem;
  padding-top: 0.6rem;
  border-top: 1px solid rgba(110, 150, 210, 0.12);
  display: grid;
  gap: 0.35rem;
}

.doc-vse__mat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.doc-vse__mat-title {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: rgba(150, 185, 230, 0.7);
}

.doc-vse__mat {
  margin: 0.25rem 0 0;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(110, 150, 210, 0.18);
  background: rgba(5, 10, 22, 0.72);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(175, 205, 248, 0.9);
  overflow-x: auto;
  white-space: pre;
}

.doc-vse__equation {
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(110, 150, 210, 0.12);
}

.doc-vse__eq-title {
  font-size: 0.76rem;
  font-weight: 700;
  color: rgba(210, 235, 255, 0.92);
}

.doc-vse__eq {
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.55rem;
  border-radius: 10px;
  border: 1px solid rgba(110, 150, 210, 0.18);
  background: rgba(5, 10, 22, 0.62);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(175, 205, 248, 0.9);
  overflow-x: auto;
  white-space: pre;
}

.doc-vse__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  align-items: center;
}

.doc-vse__lbl {
  font-size: 0.82rem;
  color: rgba(190, 208, 240, 0.84);
}

.doc-vse__range {
  width: 100%;
}

.doc-vse__out {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(130, 235, 255, 0.95);
}

.doc-vse__kv {
  margin-top: 0.6rem;
  display: grid;
  gap: 0.45rem;
}

.doc-vse__kv-row {
  display: grid;
  grid-template-columns: 5.8rem 1fr;
  gap: 0.6rem;
  align-items: baseline;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(110, 150, 210, 0.1);
}

.doc-vse__kv-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.doc-vse__kv-k {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(150, 185, 230, 0.7);
  text-transform: uppercase;
}

.doc-vse__kv-v {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: rgba(210, 228, 255, 0.92);
  white-space: pre-wrap;
}

.doc-vse__code {
  margin: 0;
  border-top: 1px solid rgba(110, 150, 210, 0.1);
  background: rgba(5, 8, 18, 0.32);
}

.doc-vse__code-sum {
  list-style: none;
  cursor: pointer;
  padding: 0.6rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(210, 195, 255, 0.9);
}

.doc-vse__code-sum::-webkit-details-marker {
  display: none;
}

.doc-vse__code-sum::before {
  content: "▶ ";
  opacity: 0.75;
}

.doc-vse__code[open] .doc-vse__code-sum::before {
  content: "▼ ";
}

.doc-vse__code-body {
  padding: 0 0.9rem 0.85rem;
}

.doc-vse__caption {
  margin: 0;
  padding: 0.75rem 0.9rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.52;
  color: rgba(165, 188, 228, 0.82);
  border-top: 1px solid rgba(110, 150, 210, 0.1);
}

@media (max-width: 980px) {
  .doc-vse__bottom {
    grid-template-columns: 1fr;
  }

  .doc-vse__kv-row {
    grid-template-columns: 5.2rem 1fr;
  }
}

