/* Holodepth — Buffer lifecycle lab (diagram + plane demo) */

.doc-ial-lab {
  margin-block: 1rem 0;
}

.doc-ial-lab__intro {
  margin-block: 0 0.85rem;
}

.doc-ial-lab__diagram {
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(94, 200, 255, 0.14);
  background: linear-gradient(
    165deg,
    rgba(12, 14, 24, 0.96) 0%,
    rgba(5, 7, 14, 0.98) 100%
  );
  padding: 0.85rem 1rem 1rem;
  margin-block: 0 1rem;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4) inset;
}

.doc-ial-lab__diagram-title {
  margin: 0 0 0.55rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(140, 200, 255, 0.9);
}

.doc-ial-lab__diagram-plain {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  line-height: 1.55;
  color: rgba(195, 210, 238, 0.88);
}

.doc-ial-lab__diagram-plain p {
  margin: 0 0 0.5rem;
}

.doc-ial-lab__diagram-plain p:last-child {
  margin-bottom: 0;
}

.doc-ial-lab__diagram svg {
  display: block;
  width: 100%;
  max-width: 640px;
  height: auto;
}

.doc-ial-lab__diagram-legend {
  margin: 0.55rem 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  font-size: 0.72rem;
  color: rgba(195, 210, 240, 0.82);
}

.doc-ial-lab__diagram-legend li {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.doc-ial-lab__swatch {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 2px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.doc-ial-lab__swatch--full {
  background: linear-gradient(90deg, #3ddc84, #2ee7a8);
}

.doc-ial-lab__swatch--partial {
  background: linear-gradient(90deg, #2a3a55 0%, #ffd24a 35%, #ffd24a 65%, #2a3a55 100%);
}

.doc-ial-lab__swatch--orphan {
  background: linear-gradient(90deg, #5ec8ff, #b56cff);
}

figure.doc-ial-demo {
  margin-block: 0;
  margin-inline: 0;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
}

figure.doc-ial-demo + .doc-h3 {
  margin-top: 1.35rem;
}

.doc-ial-demo {
  border-radius: var(--radius, 14px);
  border: 1px solid rgba(94, 200, 255, 0.16);
  background: linear-gradient(
    165deg,
    rgba(10, 12, 22, 0.98) 0%,
    rgba(4, 6, 14, 0.99) 100%
  );
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.45) inset,
    0 16px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.doc-ial-demo__hud {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.7rem 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 6, 12, 0.72);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.78rem;
}

.doc-ial-demo__hud-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.doc-ial-demo__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(140, 200, 255, 0.88);
}

.doc-ial-demo__seg {
  display: inline-flex;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  gap: 2px;
}

.doc-ial-demo__seg-btn {
  appearance: none;
  border: 0;
  margin: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.doc-ial-demo__seg-btn:hover {
  color: rgba(255, 255, 255, 0.88);
}

.doc-ial-demo__seg-btn[aria-pressed="true"] {
  color: #0b1020;
  background: linear-gradient(135deg, #5ec8ff 0%, #b56cff 100%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
}

.doc-ial-demo__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.55rem;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.64rem;
  line-height: 1.35;
  color: rgba(175, 210, 245, 0.92);
}

.doc-ial-demo__metric {
  padding: 0.32rem 0.5rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
}

.doc-ial-demo__metric strong {
  font-weight: 600;
  color: rgba(120, 220, 255, 0.98);
}

.doc-ial-demo__upload {
  padding: 0.45rem 0.5rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 210, 74, 0.14);
  background: rgba(0, 0, 0, 0.22);
}

.doc-ial-demo__upload-title {
  margin: 0 0 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 210, 120, 0.88);
}

.doc-ial-demo__upload-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 0.62rem;
  line-height: 1.35;
  color: rgba(175, 210, 245, 0.88);
}

.doc-ial-demo__upload-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.22rem 0.38rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition:
    border-color 0.15s ease,
    background 0.15s ease,
    color 0.15s ease;
}

.doc-ial-demo__upload-row--active {
  border-color: rgba(94, 200, 255, 0.35);
  background: rgba(94, 200, 255, 0.1);
  color: rgba(230, 245, 255, 0.96);
}

.doc-ial-demo__upload-label {
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(140, 200, 255, 0.75);
}

.doc-ial-demo__upload-row--active .doc-ial-demo__upload-label {
  color: rgba(255, 255, 255, 0.92);
}

.doc-ial-demo__upload-val {
  text-align: right;
  white-space: nowrap;
}

.doc-ial-demo__loadbar-wrap {
  margin-top: 0.45rem;
}

.doc-ial-demo__loadbar-wrap--heavy .doc-ial-demo__loadbar-fill {
  animation: doc-ial-loadbar-pulse 1.25s ease-in-out infinite;
}

@keyframes doc-ial-loadbar-pulse {
  0%,
  100% {
    filter: brightness(1);
    opacity: 1;
  }
  50% {
    filter: brightness(1.12);
    opacity: 0.88;
  }
}

.doc-ial-demo__loadbar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.doc-ial-demo__loadbar-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd24a 0%, #5ec8ff 55%, #b56cff 100%);
  transition: width 0.22s ease-out;
}

.doc-ial-demo__loadbar-caption {
  margin: 0.28rem 0 0;
  font-size: 0.6rem;
  line-height: 1.4;
  color: rgba(185, 200, 230, 0.78);
}

.doc-ial-demo__fcpu {
  margin: 0.35rem 0 0;
  font-size: 0.6rem;
  line-height: 1.45;
  color: rgba(160, 210, 255, 0.82);
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
}

.doc-ial-demo__hint {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.45;
  color: rgba(190, 205, 235, 0.76);
  max-width: 52rem;
}

.doc-ial-demo__viewport-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(62vh, 420px);
  background: radial-gradient(ellipse at 50% 42%, rgba(28, 48, 78, 0.35), rgba(4, 6, 12, 0.96));
}

.doc-ial-demo__viewport {
  position: absolute;
  inset: 0;
}

.doc-ial-demo__viewport canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.doc-ial-demo__viewport canvas:active {
  cursor: grabbing;
}

.doc-ial-demo__caption {
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.18);
}

.doc-ial-demo__caption .doc-demo-cap {
  padding: 0.75rem 0.9rem 0.95rem;
  font-size: 0.88rem;
  line-height: 1.55;
  color: rgba(210, 220, 245, 0.84);
}

@media (max-width: 560px) {
  .doc-ial-demo__metrics {
    flex-direction: column;
  }
}
