:root {
  color-scheme: light;
  --ink: #15171a;
  --muted: #5c6670;
  --line: #d8dde3;
  --paper: #f7f5ef;
  --surface: #ffffff;
  --accent: #0d9488;
  --accent-dark: #0f766e;
  --warm: #f6c85f;
  --blue: #9ac8eb;
  --green: #c6e5b1;
  --grid: rgba(35, 45, 55, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.lesson-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
}

.lesson-sidebar {
  padding: 36px 32px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.lesson-kicker {
  margin: 0 0 10px;
  color: var(--accent-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lesson-sidebar h1 {
  margin: 0;
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1;
  letter-spacing: 0;
  word-break: keep-all;
}

.lesson-goal {
  margin: 22px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.lesson-list {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.lesson-list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  line-height: 1.55;
}

.lesson-stage {
  min-height: 100svh;
  padding: 32px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
}

.embed-stage {
  min-height: 680px;
}

.embed-stage .lesson-sidebar {
  display: none;
}

.embed-stage.lesson-shell {
  display: block;
}

.embed-stage .lesson-stage {
  min-height: 680px;
  padding: 18px;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.mode-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
}

.stage-canvas {
  position: relative;
  min-height: 500px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.demo-surface {
  position: absolute;
  inset: 42px;
  display: grid;
  place-items: center;
}

.model-card,
.pixel-demo,
.backing-demo,
.flow-demo,
.compare-demo,
.hit-demo,
.pipeline-demo,
.camera-demo,
.coordinate-demo,
.zoom-demo,
.grid-demo,
.layers-demo,
.webgl-context-demo,
.clip-demo,
.shader-demo,
.triangle-rect-demo,
.matrix-demo,
.blend-demo,
.buffer-demo,
.batch-demo,
.instance-demo,
.outline-demo,
.tool-flow-demo,
.tool-stack-demo,
.tool-selection-demo,
.tool-hover-demo,
.tool-move-demo,
.tool-resize-demo,
.tool-rotate-demo,
.tool-marquee-demo,
.tool-snap-demo,
.tool-group-demo,
.scene-tree-demo,
.scene-transform-demo,
.scene-layer-demo,
.scene-frame-demo,
.scene-style-demo,
.scene-command-demo,
.scene-json-demo,
.scene-core-demo,
.media-image-demo,
.media-atlas-demo,
.media-text-demo,
.media-mixed-demo,
.media-vector-demo,
.webgpu-flow-demo,
.webgpu-pipeline-demo,
.webgpu-swap-demo,
.webgpu-bind-demo,
.webgpu-instance-demo,
.webgpu-fallback-demo,
.capstone-shell-demo,
.capstone-panels-demo,
.capstone-mini-demo,
.capstone-perf-demo,
.capstone-deploy-demo,
.threejs-why-demo,
.threejs-loop-demo,
.threejs-ortho-demo,
.threejs-material-demo,
.threejs-raycaster-demo,
.threejs-backend-demo,
.threejs-lifecycle-demo,
.threejs-object3d-demo,
.threejs-instanced-demo,
.threejs-textures-demo,
.threejs-overlay-demo,
.threejs-dispose-demo,
.threejs-webgpu-demo,
.threejs-picking-demo,
.threejs-boundary-demo,
.appendix-demo {
  width: min(620px, 100%);
  min-height: 300px;
  border: 2px solid #14191f;
  background: var(--surface);
  box-shadow: 18px 18px 0 rgba(21, 23, 26, 0.08);
}

.model-card {
  display: grid;
  place-items: center;
  padding: 24px;
}

.webgl-live-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: #fbfaf6;
}

.webgl-live-readout {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: min(360px, calc(100% - 32px));
  padding: 8px 10px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
  text-align: left;
  z-index: 2;
}

.model-card pre {
  margin: 0;
  width: 100%;
  overflow: auto;
  color: #24303a;
  font-size: 15px;
  line-height: 1.55;
}

.pixel-demo {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  padding: 18px;
  background: #15171a;
}

.pixel-demo span {
  min-height: 24px;
  background: var(--accent);
}

.backing-demo {
  position: relative;
  padding: 28px;
  background: var(--blue);
}

.size-box {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: rgba(255, 255, 255, 0.86);
  font-weight: 800;
}

.css-size {
  inset: 62px 92px 62px 92px;
  z-index: 2;
}

.backing-size {
  inset: 24px 42px 24px 42px;
  background: rgba(246, 200, 95, 0.72);
}

.flow-demo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  padding: 24px;
  background: var(--green);
}

.flow-node {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 800;
  text-align: center;
}

.compare-demo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 24px;
  background: #f6c85f;
}

.compare-column {
  display: grid;
  align-content: start;
  gap: 10px;
}

.compare-column h2 {
  margin: 0 0 6px;
  font-size: 20px;
  letter-spacing: 0;
}

.compare-item {
  min-height: 48px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: rgba(255, 255, 255, 0.9);
  font-weight: 800;
  text-align: center;
}

.hit-demo {
  position: relative;
  background: var(--blue);
}

.hit-node {
  position: absolute;
  display: grid;
  place-items: center;
  width: 180px;
  height: 110px;
  border: 2px solid #14191f;
  font-weight: 800;
}

.hit-node-0 {
  left: 90px;
  top: 96px;
  background: var(--green);
}

.hit-node-1 {
  left: 210px;
  top: 72px;
  background: var(--warm);
}

.hit-node-2 {
  left: 330px;
  top: 126px;
  background: var(--surface);
}

.cursor-dot {
  position: absolute;
  left: 392px;
  top: 168px;
  width: 22px;
  height: 22px;
  border: 3px solid #14191f;
  border-radius: 50%;
  background: var(--accent);
}

.pipeline-demo,
.camera-demo {
  position: relative;
  overflow: hidden;
  background: #fbfaf6;
}

.appendix-canvas-demo {
  position: relative;
  width: min(620px, 100%);
  min-height: 300px;
  overflow: hidden;
  background: #fbfaf6;
}

.lesson-2d-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.lesson-2d-readout {
  position: absolute;
  left: 16px;
  bottom: 14px;
  max-width: min(460px, calc(100% - 32px));
  padding: 8px 10px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
  z-index: 2;
}

.pipeline-step {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 800;
}

.world-plane {
  position: absolute;
  left: 80px;
  top: 42px;
  width: 720px;
  height: 380px;
  border: 2px dashed rgba(20, 25, 31, 0.45);
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  transform: translate(-120px, -44px) scale(0.92);
}

.world-node {
  position: absolute;
  left: 300px;
  top: 142px;
  width: 160px;
  height: 90px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--warm);
  font-weight: 800;
}

.viewport-frame {
  position: absolute;
  inset: 54px 96px;
  display: grid;
  place-items: end center;
  padding: 16px;
  border: 4px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
}

.coordinate-demo,
.zoom-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--surface);
  background-size: 34px 34px;
}

.coordinate-card {
  min-height: 220px;
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 18px;
  border: 2px solid #14191f;
  background: var(--surface);
  text-align: center;
}

.coordinate-card strong {
  font-size: 28px;
}

.coordinate-card span {
  color: var(--muted);
  line-height: 1.5;
}

.zoom-before,
.zoom-after {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 800;
}

.zoom-before {
  left: 108px;
  top: 108px;
  width: 154px;
  height: 96px;
  background: var(--blue);
}

.zoom-after {
  left: 292px;
  top: 76px;
  width: 236px;
  height: 146px;
  background: rgba(246, 200, 95, 0.82);
}

.zoom-anchor {
  position: absolute;
  left: 296px;
  top: 156px;
  width: 132px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  border-radius: 999px;
  background: var(--accent);
  color: white;
  font-weight: 800;
  z-index: 2;
}

.grid-demo {
  position: relative;
  background:
    linear-gradient(rgba(13, 148, 136, 0.22) 2px, transparent 2px),
    linear-gradient(90deg, rgba(13, 148, 136, 0.22) 2px, transparent 2px),
    #fbfaf6;
  background-size: 56px 56px;
}

.ruler {
  position: absolute;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 800;
}

.ruler-x {
  left: 0;
  right: 0;
  top: 0;
  height: 42px;
}

.ruler-y {
  left: 0;
  top: 42px;
  bottom: 0;
  width: 54px;
  writing-mode: vertical-rl;
}

.grid-origin {
  position: absolute;
  left: 54px;
  top: 42px;
  padding: 8px 10px;
  background: var(--warm);
  border: 2px solid #14191f;
  font-weight: 800;
}

.layers-demo {
  position: relative;
  background: #15171a;
}

.layer-card {
  position: absolute;
  left: 92px;
  right: 92px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.layer-content {
  bottom: 40px;
  background: var(--blue);
}

.layer-overlay {
  bottom: 112px;
  background: rgba(246, 200, 95, 0.9);
}

.layer-controls {
  bottom: 184px;
  background: var(--surface);
}

.webgl-context-demo {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  padding: 22px;
  background: #15171a;
}

.webgl-triangle-canvas {
  width: 100%;
  height: 100%;
  min-height: 220px;
  border: 2px solid #dbeafe;
  background: #15171a;
}

.webgl-triangle-readout {
  padding: 10px 12px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  color: #14191f;
  font-weight: 850;
  text-align: center;
}

.clip-demo {
  position: relative;
  background: #fbfaf6;
}

.clip-axis {
  position: absolute;
  background: rgba(20, 25, 31, 0.36);
}

.clip-x {
  left: 44px;
  right: 44px;
  top: 50%;
  height: 2px;
}

.clip-y {
  top: 34px;
  bottom: 34px;
  left: 50%;
  width: 2px;
}

.clip-label {
  position: absolute;
  padding: 4px 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 800;
}

.clip-left {
  left: 38px;
  top: calc(50% + 10px);
}

.clip-right {
  right: 38px;
  top: calc(50% + 10px);
}

.clip-top {
  left: calc(50% + 10px);
  top: 28px;
}

.clip-bottom {
  left: calc(50% + 10px);
  bottom: 28px;
}

.clip-triangle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 86px solid transparent;
  border-right: 86px solid transparent;
  border-bottom: 150px solid var(--accent);
  transform: translate(-50%, -62%);
  filter: drop-shadow(8px 8px 0 rgba(21, 23, 26, 0.12));
}

.shader-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 28px 28px;
}

.shader-css-box,
.shader-stage,
.shader-output,
.shader-output-triangle,
.shader-arrow,
.shader-note {
  position: absolute;
}

.shader-css-box {
  left: 36px;
  top: 98px;
  width: 132px;
  height: 88px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
  text-align: center;
  transform: rotate(-8deg) translateX(8px);
}

.shader-stage {
  display: grid;
  align-content: center;
  gap: 8px;
  width: 158px;
  min-height: 92px;
  padding: 12px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
}

.shader-stage strong {
  color: #dbeafe;
  font-size: 14px;
}

.shader-stage code {
  font-size: 12px;
  line-height: 1.35;
  white-space: normal;
}

.shader-stage-vertex {
  left: 222px;
  top: 52px;
}

.shader-stage-fragment {
  left: 222px;
  top: 178px;
}

.shader-output {
  right: 44px;
  top: 52px;
  width: 142px;
  height: 188px;
  display: grid;
  place-items: end center;
  padding: 10px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.shader-output-triangle {
  right: 78px;
  top: 86px;
  width: 0;
  height: 0;
  border-left: 48px solid transparent;
  border-right: 48px solid transparent;
  border-bottom: 92px solid var(--accent);
}

.shader-arrow {
  height: 0;
  border-top: 3px solid var(--accent);
  transform-origin: left center;
}

.shader-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: -6px;
  width: 10px;
  height: 10px;
  border-right: 3px solid var(--accent);
  border-top: 3px solid var(--accent);
  transform: rotate(45deg);
}

.shader-arrow-a {
  left: 172px;
  top: 138px;
  width: 58px;
  transform: rotate(-32deg);
}

.shader-arrow-b {
  left: 382px;
  top: 138px;
  width: 100px;
  transform: rotate(0deg);
}

.shader-note {
  left: 36px;
  right: 36px;
  bottom: 24px;
  padding: 9px 12px;
  border: 2px solid #14191f;
  background: #dbeafe;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.triangle-rect-demo {
  position: relative;
  background: #fbfaf6;
}

.rect-outline {
  position: absolute;
  left: 146px;
  top: 70px;
  width: 328px;
  height: 180px;
  display: grid;
  place-items: end center;
  padding: 12px;
  border: 3px solid #14191f;
  color: #14191f;
  font-weight: 900;
}

.rect-triangle {
  position: absolute;
  width: 0;
  height: 0;
}

.rect-triangle-a {
  left: 149px;
  top: 73px;
  border-top: 174px solid rgba(13, 148, 136, 0.72);
  border-right: 318px solid transparent;
}

.rect-triangle-b {
  left: 153px;
  top: 75px;
  border-bottom: 172px solid rgba(246, 200, 95, 0.78);
  border-left: 316px solid transparent;
}

.matrix-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 28px 28px;
}

.matrix-world-label,
.matrix-camera-frame,
.matrix-node,
.matrix-axis,
.matrix-formula,
.matrix-shader {
  position: absolute;
}

.matrix-world-label {
  left: 18px;
  top: 14px;
  padding: 6px 9px;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.matrix-camera-frame {
  left: 118px;
  top: 52px;
  width: 360px;
  height: 184px;
  display: grid;
  place-items: start end;
  padding: 10px;
  border: 3px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
}

.matrix-node {
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
}

.matrix-node-a {
  left: 166px;
  top: 122px;
  width: 142px;
  height: 78px;
  background: var(--blue);
  transform: rotate(-7deg);
}

.matrix-node-b {
  right: 96px;
  top: 96px;
  width: 126px;
  height: 66px;
  background: var(--warm);
  transform: rotate(8deg);
}

.matrix-axis-x {
  left: 64px;
  right: 64px;
  top: 50%;
  border-top: 2px dashed #14191f;
}

.matrix-axis-y {
  top: 34px;
  bottom: 34px;
  left: 50%;
  border-left: 2px dashed #14191f;
}

.matrix-formula {
  left: 32px;
  bottom: 28px;
  display: grid;
  gap: 4px;
  width: 242px;
  padding: 12px;
  border: 2px solid #14191f;
  background: #dbeafe;
  font-weight: 900;
}

.matrix-formula span {
  font-size: 12px;
  text-transform: uppercase;
}

.matrix-formula strong {
  font-size: 14px;
}

.matrix-shader {
  right: 28px;
  bottom: 28px;
  max-width: 266px;
  padding: 12px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.blend-demo {
  position: relative;
  background: #fbfaf6;
}

.blend-shape {
  position: absolute;
  width: 220px;
  height: 150px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.blend-a {
  left: 132px;
  top: 82px;
  background: rgba(13, 148, 136, 0.65);
}

.blend-b {
  left: 268px;
  top: 116px;
  background: rgba(246, 200, 95, 0.65);
}

.blend-note {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 850;
}

.buffer-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 24px 24px;
}

.buffer-grid-label,
.buffer-rect,
.buffer-panel {
  position: absolute;
}

.buffer-grid-label {
  left: 18px;
  top: 14px;
  padding: 6px 9px;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.buffer-rect {
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
}

.buffer-rect-a {
  left: 56px;
  top: 82px;
  width: 132px;
  height: 78px;
  background: var(--blue);
}

.buffer-rect-b {
  left: 154px;
  top: 174px;
  width: 170px;
  height: 82px;
  background: var(--warm);
}

.buffer-rect-c {
  left: 264px;
  top: 58px;
  width: 104px;
  height: 118px;
  background: var(--green);
}

.buffer-panel {
  right: 24px;
  top: 34px;
  bottom: 28px;
  width: min(252px, 42%);
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
}

.buffer-panel h2 {
  margin: 0 0 2px;
  color: #dbeafe;
  font-size: 15px;
}

.buffer-row,
.buffer-draw {
  padding: 8px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  color: #14191f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.buffer-draw {
  background: #dbeafe;
}

.batch-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 24px 24px;
}

.batch-label,
.batch-node,
.batch-queue {
  position: absolute;
}

.batch-label {
  left: 18px;
  top: 14px;
  padding: 6px 9px;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.batch-node {
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
}

.batch-rect {
  background: var(--blue);
}

.batch-image {
  background: var(--warm);
}

.batch-outline {
  background: transparent;
  border: 3px solid var(--accent);
  color: var(--accent-dark);
}

.batch-node-0 {
  left: 42px;
  top: 82px;
  width: 92px;
  height: 72px;
}

.batch-node-1 {
  left: 146px;
  top: 96px;
  width: 86px;
  height: 58px;
}

.batch-node-2 {
  left: 252px;
  top: 64px;
  width: 96px;
  height: 84px;
}

.batch-node-3 {
  left: 86px;
  top: 178px;
  width: 118px;
  height: 70px;
}

.batch-node-4 {
  left: 228px;
  top: 188px;
  width: 90px;
  height: 64px;
}

.batch-node-5 {
  left: 32px;
  top: 70px;
  width: 214px;
  height: 96px;
  pointer-events: none;
}

.batch-node-6 {
  left: 72px;
  top: 168px;
  width: 260px;
  height: 92px;
  pointer-events: none;
}

.batch-queue {
  right: 24px;
  top: 34px;
  bottom: 28px;
  width: min(248px, 42%);
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
}

.batch-queue h2 {
  margin: 0 0 2px;
  color: #dbeafe;
  font-size: 15px;
}

.batch-row,
.batch-total {
  padding: 8px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  color: #14191f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.batch-total {
  background: #dbeafe;
}

.instance-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 24px 24px;
}

.instance-label,
.unit-rect,
.instance-rect,
.instance-panel {
  position: absolute;
}

.instance-label {
  left: 18px;
  top: 14px;
  padding: 6px 9px;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.unit-rect {
  left: 28px;
  top: 58px;
  width: 92px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px solid #14191f;
  background: transparent;
  font-weight: 900;
  text-align: center;
}

.instance-rect {
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
}

.instance-rect-0 {
  left: 188px;
  top: 74px;
  width: 96px;
  height: 64px;
}

.instance-rect-1 {
  left: 88px;
  top: 152px;
  width: 142px;
  height: 72px;
  background: var(--warm);
}

.instance-rect-2 {
  left: 270px;
  top: 154px;
  width: 88px;
  height: 104px;
  background: var(--green);
}

.instance-rect-3 {
  left: 332px;
  top: 72px;
  width: 74px;
  height: 58px;
  background: #dbeafe;
}

.instance-panel {
  right: 24px;
  top: 34px;
  bottom: 28px;
  width: min(250px, 42%);
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 14px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
}

.instance-panel h2 {
  margin: 0 0 2px;
  color: #dbeafe;
  font-size: 15px;
}

.instance-row {
  padding: 8px;
  border: 2px solid #14191f;
  background: #f7f5ef;
  color: #14191f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.instance-draw {
  padding: 8px;
  border: 2px solid #dbeafe;
  background: #dbeafe;
  color: #14191f;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.outline-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.outlined-node {
  position: absolute;
  left: 190px;
  top: 92px;
  width: 240px;
  height: 136px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
}

.selection-outline {
  position: absolute;
  left: 184px;
  top: 86px;
  width: 252px;
  height: 148px;
  border: 2px solid var(--accent);
  pointer-events: none;
}

.handle {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 2px solid var(--accent);
  background: var(--surface);
}

.handle-nw {
  left: 177px;
  top: 79px;
}

.handle-ne {
  left: 429px;
  top: 79px;
}

.handle-sw {
  left: 177px;
  top: 227px;
}

.handle-se {
  left: 429px;
  top: 227px;
}

.tool-flow-demo {
  position: relative;
  overflow: hidden;
  background: #15171a;
}

.pointer-browser,
.pointer-canvas,
.pointer-camera,
.pointer-node,
.pointer-client,
.pointer-screen,
.pointer-world,
.pointer-line,
.pointer-panel {
  position: absolute;
}

.pointer-browser {
  inset: 22px;
  border: 2px solid #dbeafe;
}

.pointer-canvas {
  left: 52px;
  top: 54px;
  width: 368px;
  height: 218px;
  padding: 8px;
  border: 2px solid #14191f;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 26px 26px;
  font-weight: 900;
}

.pointer-camera {
  left: 112px;
  top: 92px;
  width: 234px;
  height: 132px;
  display: grid;
  place-items: start end;
  padding: 8px;
  border: 3px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
}

.pointer-node {
  left: 186px;
  top: 138px;
  width: 96px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
  transform: rotate(-5deg);
}

.pointer-client,
.pointer-screen,
.pointer-world {
  width: 18px;
  height: 18px;
  border: 2px solid #14191f;
  border-radius: 999px;
  background: var(--warm);
  color: #14191f;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.pointer-client {
  left: 392px;
  top: 44px;
  padding-left: 22px;
}

.pointer-screen {
  left: 254px;
  top: 154px;
  padding-left: 22px;
}

.pointer-world {
  left: 206px;
  top: 112px;
  padding-left: 22px;
  background: #dbeafe;
}

.pointer-line {
  height: 0;
  border-top: 2px dashed var(--accent);
  transform-origin: left center;
}

.pointer-line-client {
  left: 276px;
  top: 166px;
  width: 148px;
  transform: rotate(-38deg);
}

.pointer-line-world {
  left: 224px;
  top: 124px;
  width: 70px;
  transform: rotate(35deg);
}

.pointer-panel {
  right: 24px;
  top: 48px;
  width: min(230px, 38%);
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  color: #14191f;
}

.pointer-panel strong,
.pointer-panel span {
  display: block;
  padding: 7px;
  border: 2px solid #14191f;
  background: #dbeafe;
  font-size: 12px;
  line-height: 1.25;
}

.pointer-panel span {
  background: var(--surface);
}

.tool-stack-demo,
.tool-selection-demo,
.tool-hover-demo,
.tool-move-demo,
.tool-resize-demo,
.tool-rotate-demo,
.tool-marquee-demo,
.tool-snap-demo,
.tool-group-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.tool-stack-card {
  position: absolute;
  width: 230px;
  height: 120px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 850;
}

.tool-stack-0 {
  left: 250px;
  top: 116px;
  background: var(--surface);
  z-index: 3;
}

.tool-stack-1 {
  left: 190px;
  top: 86px;
  background: var(--warm);
  z-index: 2;
}

.tool-stack-2 {
  left: 130px;
  top: 56px;
  background: var(--blue);
  z-index: 1;
}

.tool-cursor {
  position: absolute;
  left: 348px;
  top: 160px;
  width: 20px;
  height: 20px;
  border: 3px solid #14191f;
  border-radius: 50%;
  background: var(--accent);
  z-index: 5;
}

.tool-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
}

.tool-node-0 {
  left: 120px;
  top: 90px;
  width: 130px;
  height: 88px;
}

.tool-node-1 {
  left: 276px;
  top: 70px;
  width: 150px;
  height: 108px;
  background: var(--warm);
}

.tool-node-2 {
  left: 250px;
  top: 196px;
  width: 180px;
  height: 72px;
  background: var(--green);
}

.tool-selection-bounds {
  position: absolute;
  left: 106px;
  top: 56px;
  width: 340px;
  height: 228px;
  display: grid;
  place-items: end center;
  padding: 10px;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
}

.hover-target {
  position: absolute;
  left: 210px;
  top: 100px;
  width: 210px;
  height: 120px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--warm);
  font-weight: 900;
}

.hover-ring {
  position: absolute;
  left: 204px;
  top: 94px;
  width: 222px;
  height: 132px;
  border: 2px dashed var(--accent);
}

.move-tool-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.move-tool-readout {
  position: absolute;
  left: 18px;
  bottom: 16px;
  max-width: min(300px, calc(100% - 36px));
  padding: 8px 10px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.3;
}

.tool-resize-demo .resize-box {
  position: absolute;
  left: 204px;
  top: 82px;
  width: 236px;
  height: 152px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
}

.resize-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--accent);
  background: var(--surface);
}

.resize-nw {
  left: 195px;
  top: 73px;
}

.resize-ne {
  left: 431px;
  top: 73px;
}

.resize-sw {
  left: 195px;
  top: 225px;
}

.resize-se {
  left: 431px;
  top: 225px;
}

.resize-fixed {
  position: absolute;
  left: 160px;
  top: 42px;
  padding: 6px 9px;
  border: 2px solid #14191f;
  background: var(--warm);
  font-weight: 900;
}

.rotate-box {
  position: absolute;
  left: 226px;
  top: 118px;
  width: 184px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
  transform: rotate(14deg);
}

.rotate-pivot {
  position: absolute;
  left: 292px;
  top: 154px;
  width: 58px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  border-radius: 999px;
  background: var(--surface);
  font-size: 12px;
  font-weight: 900;
  z-index: 2;
}

.rotate-arm {
  position: absolute;
  left: 320px;
  top: 102px;
  width: 2px;
  height: 66px;
  background: var(--accent);
  transform: rotate(24deg);
  transform-origin: bottom center;
}

.rotate-handle {
  position: absolute;
  left: 346px;
  top: 80px;
  padding: 7px 10px;
  border: 2px solid #14191f;
  border-radius: 999px;
  background: var(--warm);
  font-weight: 900;
}

.marquee-node {
  position: absolute;
  width: 92px;
  height: 64px;
  border: 2px solid #14191f;
  background: var(--blue);
}

.marquee-node-0 {
  left: 98px;
  top: 74px;
}

.marquee-node-1 {
  left: 246px;
  top: 104px;
  background: var(--warm);
}

.marquee-node-2 {
  left: 386px;
  top: 180px;
  background: var(--green);
}

.marquee-node-3 {
  left: 162px;
  top: 216px;
}

.marquee-box {
  position: absolute;
  left: 134px;
  top: 92px;
  width: 278px;
  height: 172px;
  display: grid;
  place-items: end center;
  padding: 10px;
  border: 2px solid var(--accent);
  background: rgba(13, 148, 136, 0.08);
  color: var(--accent-dark);
  font-weight: 900;
}

.snap-node {
  position: absolute;
  width: 150px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.snap-a {
  left: 142px;
  top: 126px;
  background: var(--blue);
}

.snap-b {
  left: 340px;
  top: 126px;
  background: var(--warm);
}

.snap-guide {
  position: absolute;
  background: #ef4444;
}

.snap-guide-x {
  left: 292px;
  top: 40px;
  bottom: 40px;
  width: 2px;
}

.snap-guide-y {
  left: 70px;
  right: 70px;
  top: 172px;
  height: 2px;
}

.group-parent {
  position: absolute;
  left: 156px;
  top: 74px;
  width: 326px;
  height: 190px;
  display: grid;
  place-items: start center;
  padding: 10px;
  border: 2px dashed #14191f;
  background: rgba(198, 229, 177, 0.45);
  font-weight: 900;
  transform: rotate(-5deg);
}

.group-child {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.group-child-a {
  left: 206px;
  top: 138px;
  width: 118px;
  height: 72px;
  background: var(--blue);
  transform: rotate(-5deg);
}

.group-child-b {
  left: 344px;
  top: 126px;
  width: 104px;
  height: 90px;
  background: var(--warm);
  transform: rotate(-5deg);
}

.scene-tree-demo,
.scene-transform-demo,
.scene-layer-demo,
.scene-frame-demo,
.scene-core-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.tree-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
}

.tree-node-0 {
  left: 250px;
  top: 34px;
  width: 120px;
  height: 48px;
  background: var(--warm);
}

.tree-node-1 {
  left: 126px;
  top: 118px;
  width: 136px;
  height: 58px;
  background: var(--blue);
}

.tree-node-2 {
  left: 360px;
  top: 118px;
  width: 136px;
  height: 58px;
  background: var(--green);
}

.tree-node-3 {
  left: 76px;
  top: 220px;
  width: 112px;
  height: 48px;
}

.tree-node-4 {
  left: 204px;
  top: 220px;
  width: 112px;
  height: 48px;
}

.tree-node-5 {
  left: 372px;
  top: 220px;
  width: 112px;
  height: 48px;
}

.transform-parent {
  position: absolute;
  left: 150px;
  top: 76px;
  width: 330px;
  height: 184px;
  display: grid;
  place-items: start center;
  padding: 10px;
  border: 2px dashed #14191f;
  background: rgba(198, 229, 177, 0.45);
  font-weight: 900;
  transform: rotate(8deg);
}

.transform-child {
  position: absolute;
  left: 266px;
  top: 142px;
  width: 136px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--warm);
  font-weight: 900;
  transform: rotate(8deg);
}

.transform-formula {
  position: absolute;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 8px 12px;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
}

.scene-layer-demo {
  display: grid;
  align-content: center;
  gap: 10px;
  padding: 28px 96px;
  background: #15171a;
}

.layer-row {
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 900;
}

.layer-row-0 {
  transform: translateX(54px);
}

.layer-row-1 {
  transform: translateX(24px);
}

.layer-row-2 {
  transform: translateX(-8px);
}

.layer-row-3 {
  transform: translateX(-38px);
}

.clip-frame {
  position: absolute;
  left: 170px;
  top: 62px;
  width: 280px;
  height: 190px;
  overflow: hidden;
  display: grid;
  place-items: start center;
  padding: 10px;
  border: 3px solid #14191f;
  background: rgba(154, 200, 235, 0.38);
  font-weight: 900;
}

.clip-child {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.clip-child-a {
  left: 214px;
  top: 130px;
  width: 112px;
  height: 72px;
  background: var(--warm);
}

.clip-child-b {
  left: 378px;
  top: 170px;
  width: 150px;
  height: 90px;
  background: rgba(239, 68, 68, 0.5);
}

.scene-style-demo {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
  background: var(--green);
}

.style-token {
  min-height: 230px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.style-fill {
  background: var(--warm);
}

.style-stroke {
  border-width: 8px;
  background: var(--surface);
}

.style-effect {
  background: var(--blue);
  box-shadow: 18px 18px 0 rgba(21, 23, 26, 0.18);
}

.scene-command-demo {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 24px;
  background: var(--blue);
}

.command-step {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
  text-align: center;
}

.scene-json-demo {
  display: grid;
  place-items: center;
  padding: 24px;
  background: #15171a;
}

.scene-json-demo pre {
  width: 100%;
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.5;
  overflow: auto;
}

.core-box {
  position: absolute;
  left: 210px;
  top: 42px;
  width: 200px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--warm);
  font-weight: 900;
}

.renderer-box {
  position: relative;
  top: 180px;
  width: 150px;
  height: 74px;
  display: inline-grid;
  place-items: center;
  margin-left: 38px;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
  text-align: center;
}

.media-image-demo,
.media-mixed-demo,
.media-vector-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.image-quad {
  position: absolute;
  left: 76px;
  top: 70px;
  width: 250px;
  height: 160px;
  display: grid;
  place-items: center;
  border: 3px solid #14191f;
  background:
    linear-gradient(135deg, rgba(13, 148, 136, 0.86), rgba(154, 200, 235, 0.9)),
    var(--blue);
  color: white;
  font-weight: 900;
}

.uv-point,
.texture-card {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
  text-align: center;
}

.uv-point {
  min-width: 62px;
  min-height: 28px;
  padding: 4px 6px;
  font-size: 11px;
}

.uv-point-0 {
  left: 52px;
  top: 48px;
}

.uv-point-1 {
  left: 282px;
  top: 48px;
}

.uv-point-2 {
  left: 52px;
  top: 206px;
}

.uv-point-3 {
  left: 282px;
  top: 206px;
}

.texture-card {
  right: 58px;
  top: 66px;
  width: 142px;
  height: 72px;
  background: var(--warm);
}

.texture-sampler {
  position: absolute;
  right: 34px;
  bottom: 52px;
  width: 190px;
  padding: 10px;
  border: 2px solid #14191f;
  background: #15171a;
  color: #f7f5ef;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.media-atlas-demo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 24px;
  background: #15171a;
}

.atlas-cell {
  min-height: 72px;
  display: grid;
  place-items: center;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 900;
}

.atlas-cell:nth-child(3n) {
  background: var(--warm);
}

.atlas-cell:nth-child(4n) {
  background: var(--blue);
}

.media-text-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 28px 28px;
}

.text-dom-layer,
.text-preview-node,
.text-caret,
.text-pipeline {
  position: absolute;
}

.text-dom-layer {
  left: 58px;
  top: 60px;
  width: 250px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 2px dashed var(--accent);
  background: rgba(255, 255, 255, 0.8);
  color: var(--accent-dark);
  font-weight: 900;
}

.text-preview-node {
  left: 86px;
  top: 174px;
  width: 260px;
  height: 74px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
}

.text-caret {
  left: 184px;
  top: 76px;
  width: 3px;
  height: 58px;
  background: #15171a;
}

.text-pipeline {
  right: 24px;
  top: 38px;
  bottom: 30px;
  width: min(230px, 38%);
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 2px solid #14191f;
  background: #15171a;
}

.text-pipeline-step {
  padding: 8px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  color: #14191f;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.mixed-layer {
  position: absolute;
  left: 120px;
  right: 120px;
  height: 60px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.mixed-dom {
  top: 42px;
  background: var(--surface);
}

.mixed-svg {
  top: 112px;
  background: var(--warm);
}

.mixed-gpu {
  top: 182px;
  background: var(--blue);
}

.mixed-scene {
  top: 252px;
  background: var(--green);
}

.vector-path-line {
  position: absolute;
  left: 118px;
  top: 160px;
  width: 390px;
  height: 110px;
  border-top: 4px solid var(--accent);
  border-radius: 50%;
  transform: rotate(-10deg);
}

.vector-point {
  position: absolute;
  min-width: 78px;
  min-height: 36px;
  display: grid;
  place-items: center;
  padding: 6px 8px;
  border: 2px solid #14191f;
  background: var(--surface);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.vector-point-0 {
  left: 102px;
  top: 172px;
  background: var(--warm);
}

.vector-point-1 {
  left: 242px;
  top: 92px;
  background: var(--blue);
}

.vector-point-2 {
  left: 362px;
  top: 190px;
  background: var(--green);
}

.vector-point-3 {
  left: 454px;
  top: 120px;
}

.webgpu-flow-demo,
.webgpu-pipeline-demo,
.webgpu-bind-demo,
.webgpu-fallback-demo {
  position: relative;
  overflow: hidden;
  background: #15171a;
}

.webgpu-flow-demo,
.webgpu-pipeline-demo,
.webgpu-bind-demo {
  background:
    linear-gradient(rgba(219, 234, 254, 0.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 234, 254, 0.16) 1px, transparent 1px),
    #15171a;
  background-size: 28px 28px;
}

.webgpu-fallback-demo {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
  padding: 24px;
}

.webgpu-flow-step,
.pipeline-card,
.bind-card,
.fallback-step {
  min-height: 126px;
  display: grid;
  place-items: center;
  padding: 10px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 900;
  text-align: center;
}

.webgpu-flow-step,
.webgpu-surface,
.pipeline-card,
.pipeline-output,
.bind-resource,
.bind-group-box,
.bind-shader-box {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  color: #14191f;
  font-weight: 900;
  text-align: center;
}

.webgpu-flow-step {
  width: 130px;
  height: 58px;
  padding: 8px;
  font-size: 10.5px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.webgpu-flow-step-0 {
  left: 34px;
  top: 44px;
}

.webgpu-flow-step-1 {
  left: 170px;
  top: 44px;
}

.webgpu-flow-step-2 {
  left: 306px;
  top: 44px;
}

.webgpu-flow-step-3 {
  left: 170px;
  bottom: 48px;
  background: var(--warm);
}

.webgpu-flow-step-4 {
  left: 306px;
  bottom: 48px;
  background: #dbeafe;
}

.webgpu-surface {
  right: 42px;
  top: 92px;
  width: 142px;
  height: 110px;
  background: var(--blue);
}

.pipeline-card {
  width: 126px;
  height: 62px;
  min-height: 0;
  padding: 8px;
  font-size: 12px;
}

.pipeline-card-0 {
  left: 34px;
  top: 54px;
}

.pipeline-card-1 {
  left: 190px;
  top: 54px;
}

.pipeline-card-2 {
  left: 346px;
  top: 54px;
}

.pipeline-card-3 {
  left: 112px;
  bottom: 66px;
  background: var(--warm);
}

.pipeline-card-4 {
  left: 268px;
  bottom: 66px;
  background: #dbeafe;
}

.pipeline-output {
  right: 34px;
  top: 106px;
  width: 154px;
  height: 72px;
  background: var(--blue);
}

.bind-resource {
  left: 42px;
  width: 142px;
  height: 54px;
}

.bind-resource-0 {
  top: 48px;
}

.bind-resource-1 {
  top: 122px;
  background: var(--warm);
}

.bind-resource-2 {
  top: 196px;
  background: #dbeafe;
}

.bind-group-box {
  left: 244px;
  top: 92px;
  width: 128px;
  height: 112px;
  background: var(--blue);
}

.bind-shader-box {
  right: 38px;
  top: 92px;
  width: 160px;
  height: 112px;
}

.webgpu-swap-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.swap-core {
  position: absolute;
  left: 210px;
  top: 54px;
  width: 200px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--warm);
  font-weight: 900;
}

.swap-renderer {
  position: absolute;
  top: 184px;
  width: 190px;
  height: 80px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
  text-align: center;
}

.swap-webgl {
  left: 108px;
}

.swap-webgpu {
  right: 108px;
  background: var(--blue);
}

.webgpu-instance-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 24px 24px;
}

.gpu-unit-rect {
  position: absolute;
  left: 36px;
  bottom: 32px;
  width: 128px;
  height: 82px;
  display: grid;
  place-items: center;
  border: 3px solid #14191f;
  background: transparent;
  font-weight: 900;
  text-align: center;
}

.gpu-instance-rect {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
}

.gpu-instance-rect-0 {
  left: 210px;
  top: 60px;
  width: 96px;
  height: 62px;
}

.gpu-instance-rect-1 {
  left: 90px;
  top: 142px;
  width: 132px;
  height: 70px;
  background: var(--warm);
}

.gpu-instance-rect-2 {
  left: 268px;
  top: 146px;
  width: 88px;
  height: 108px;
  background: var(--green);
}

.gpu-instance-rect-3 {
  left: 344px;
  top: 78px;
  width: 78px;
  height: 56px;
  background: #dbeafe;
}

.gpu-instance-rect-4 {
  left: 146px;
  top: 232px;
  width: 160px;
  height: 42px;
  background: var(--surface);
}

.gpu-instance-panel {
  position: absolute;
  right: 24px;
  top: 34px;
  bottom: 28px;
  width: min(230px, 38%);
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 2px solid #14191f;
  background: #15171a;
}

.gpu-instance-row {
  padding: 8px;
  border: 2px solid #14191f;
  background: #f7f5ef;
  color: #14191f;
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.capstone-shell-demo,
.capstone-mini-demo {
  position: relative;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #fbfaf6;
  background-size: 32px 32px;
}

.shell-top,
.shell-left,
.shell-canvas,
.shell-right,
.shell-bottom {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--surface);
  font-weight: 900;
}

.shell-top {
  left: 24px;
  right: 24px;
  top: 24px;
  height: 42px;
}

.shell-left {
  left: 24px;
  top: 78px;
  bottom: 54px;
  width: 70px;
  background: var(--blue);
}

.shell-canvas {
  left: 106px;
  right: 158px;
  top: 78px;
  bottom: 54px;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--surface);
  background-size: 24px 24px;
}

.shell-right {
  right: 24px;
  top: 78px;
  bottom: 54px;
  width: 122px;
  background: var(--warm);
}

.shell-bottom {
  left: 24px;
  right: 24px;
  bottom: 12px;
  height: 30px;
}

.capstone-panels-demo,
.capstone-perf-demo,
.capstone-deploy-demo {
  display: grid;
  gap: 12px;
  padding: 24px;
  background: #15171a;
}

.capstone-panels-demo {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel-card,
.perf-metric,
.deploy-check {
  min-height: 118px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 900;
  text-align: center;
}

.mini-node {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.mini-node-a {
  left: 138px;
  top: 102px;
  width: 170px;
  height: 106px;
  background: var(--blue);
}

.mini-node-b {
  left: 342px;
  top: 146px;
  width: 140px;
  height: 72px;
  background: var(--warm);
}

.mini-selection {
  position: absolute;
  left: 128px;
  top: 92px;
  width: 364px;
  height: 140px;
  display: grid;
  place-items: end center;
  padding: 10px;
  border: 2px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
}

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

.capstone-deploy-demo {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.threejs-why-demo,
.threejs-loop-demo,
.threejs-material-demo,
.threejs-backend-demo,
.threejs-lifecycle-demo,
.threejs-textures-demo,
.threejs-dispose-demo,
.threejs-boundary-demo {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.threejs-why-demo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #f7f5ef;
}

.threejs-track {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 2px solid #14191f;
  background: var(--surface);
}

.threejs-track h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.threejs-chip,
.threejs-loop-step,
.material-card,
.backend-step {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px;
  border: 2px solid #14191f;
  background: #dbeafe;
  font-weight: 900;
  text-align: center;
}

.threejs-loop-demo,
.threejs-backend-demo {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #15171a;
}

.threejs-loop-step,
.backend-step {
  background: #f7f5ef;
}

.threejs-ortho-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 28px 28px;
}

.ortho-frustum,
.ortho-world,
.ortho-node,
.ortho-axis {
  position: absolute;
}

.ortho-frustum {
  inset: 42px 74px;
  display: grid;
  place-items: start end;
  padding: 12px;
  border: 3px solid var(--accent);
  color: var(--accent-dark);
  font-weight: 900;
}

.ortho-world {
  left: 58px;
  bottom: 34px;
  padding: 8px 10px;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.ortho-node {
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
}

.ortho-node-a {
  left: 154px;
  top: 106px;
  width: 154px;
  height: 92px;
  background: var(--blue);
}

.ortho-node-b {
  right: 134px;
  top: 148px;
  width: 124px;
  height: 72px;
  background: var(--warm);
}

.ortho-axis-x {
  left: 70px;
  right: 70px;
  top: 50%;
  border-top: 2px dashed #14191f;
}

.ortho-axis-y {
  top: 50px;
  bottom: 44px;
  left: 50%;
  border-left: 2px dashed #14191f;
}

.threejs-material-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 26px 26px;
}

.three-geometry-plane,
.three-mesh-output,
.three-attribute-row,
.three-material-box,
.three-shader-code {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
}

.three-geometry-plane {
  left: 58px;
  top: 68px;
  width: 198px;
  height: 126px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
  background:
    linear-gradient(28deg, transparent 49%, #14191f 50%, #14191f 51%, transparent 52%),
    var(--blue);
}

.three-mesh-output {
  right: 48px;
  top: 78px;
  width: 150px;
  height: 112px;
  border-width: 3px;
  background: var(--blue);
}

.three-attribute-row {
  left: 292px;
  width: 116px;
  height: 42px;
  background: #dbeafe;
  font-size: 12px;
}

.three-attribute-0 {
  top: 48px;
}

.three-attribute-1 {
  top: 104px;
  background: var(--warm);
}

.three-attribute-2 {
  top: 160px;
  background: var(--green);
}

.three-material-box {
  left: 74px;
  bottom: 42px;
  width: 210px;
  height: 62px;
  background: var(--warm);
  white-space: pre-line;
}

.three-shader-code {
  right: 34px;
  bottom: 34px;
  width: 266px;
  min-height: 78px;
  padding: 10px;
  background: #15171a;
  color: #f7f5ef;
  font-size: 11px;
  line-height: 1.45;
  text-align: left;
}

.three-shader-code code {
  white-space: pre-line;
}

.threejs-raycaster-demo {
  position: relative;
  overflow: hidden;
  background: #15171a;
}

.ray-camera,
.ray-object,
.ray-result {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #dbeafe;
  font-weight: 900;
  text-align: center;
}

.ray-camera {
  left: 38px;
  top: 112px;
  width: 96px;
  height: 72px;
  background: #dbeafe;
}

.ray-line {
  position: absolute;
  left: 118px;
  top: 152px;
  width: 398px;
  border-top: 3px solid var(--accent);
  transform: rotate(-9deg);
  transform-origin: left center;
}

.ray-object {
  width: 116px;
  height: 68px;
  background: #f7f5ef;
}

.ray-object-0 {
  right: 80px;
  top: 72px;
}

.ray-object-1 {
  right: 150px;
  top: 142px;
  background: var(--warm);
}

.ray-object-2 {
  right: 70px;
  bottom: 52px;
  background: var(--blue);
}

.ray-result {
  left: 222px;
  bottom: 24px;
  width: 164px;
  height: 46px;
  background: #dbeafe;
}

.threejs-backend-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(rgba(219, 234, 254, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(219, 234, 254, 0.14) 1px, transparent 1px),
    #15171a;
  background-size: 28px 28px;
}

.threejs-backend-demo .backend-step {
  position: absolute;
  width: 112px;
  min-height: 58px;
  padding: 8px;
  font-size: 12px;
}

.backend-step-0 {
  left: 30px;
  top: 120px;
}

.backend-step-1 {
  left: 158px;
  top: 72px;
  background: var(--warm);
}

.backend-step-2 {
  left: 286px;
  top: 120px;
  background: #dbeafe;
}

.backend-step-3 {
  left: 414px;
  top: 72px;
}

.backend-step-4 {
  right: 30px;
  top: 120px;
  background: var(--blue);
}

.backend-rule {
  position: absolute;
  left: 116px;
  right: 116px;
  bottom: 42px;
  min-height: 46px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.threejs-lifecycle-demo,
.threejs-textures-demo,
.threejs-dispose-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 26px 26px;
}

.lifecycle-step,
.texture-step,
.dispose-card {
  position: absolute;
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 10px;
  border: 2px solid #14191f;
  background: #dbeafe;
  font-weight: 900;
  text-align: center;
}

.lifecycle-canvas {
  position: absolute;
  left: 40px;
  top: 52px;
  width: 192px;
  height: 142px;
  display: grid;
  place-items: center;
  border: 3px solid #14191f;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--surface);
  background-size: 20px 20px;
  font-weight: 900;
}

.lifecycle-step {
  right: 36px;
  width: 188px;
  height: 36px;
  font-size: 12px;
}

.lifecycle-step-0 {
  top: 28px;
}

.lifecycle-step-1 {
  top: 74px;
  background: var(--warm);
}

.lifecycle-step-2 {
  top: 120px;
}

.lifecycle-step-3 {
  top: 166px;
  background: var(--blue);
}

.lifecycle-step-4 {
  top: 212px;
  background: var(--green);
}

.lifecycle-step-5 {
  top: 258px;
  background: var(--warm);
}

.three-image-source,
.three-text-canvas,
.three-texture-cache {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
  white-space: pre-line;
}

.three-image-source {
  left: 38px;
  top: 52px;
  width: 142px;
  height: 96px;
  background: var(--blue);
}

.three-text-canvas {
  left: 38px;
  bottom: 42px;
  width: 174px;
  height: 82px;
  background: var(--surface);
}

.three-texture-cache {
  left: 256px;
  top: 88px;
  width: 132px;
  height: 114px;
  background: var(--warm);
}

.texture-step {
  right: 34px;
  width: 172px;
  height: 54px;
  font-size: 12px;
}

.texture-step-0 {
  top: 58px;
  background: #dbeafe;
}

.texture-step-1 {
  top: 128px;
  background: var(--blue);
}

.texture-step-2 {
  top: 198px;
  background: var(--green);
}

.dispose-scene-node,
.dispose-queue,
.dispose-info {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
  white-space: pre-line;
}

.dispose-scene-node {
  left: 36px;
  top: 116px;
  width: 136px;
  height: 72px;
  background: var(--warm);
}

.dispose-card {
  left: 226px;
  width: 142px;
  height: 44px;
  font-size: 12px;
}

.dispose-card-0 {
  top: 54px;
}

.dispose-card-1 {
  top: 128px;
  background: var(--blue);
}

.dispose-card-2 {
  top: 202px;
  background: var(--green);
}

.dispose-queue {
  right: 58px;
  top: 88px;
  width: 150px;
  height: 78px;
  background: #dbeafe;
}

.dispose-info {
  right: 34px;
  bottom: 42px;
  width: 196px;
  height: 62px;
  background: #15171a;
  color: #f7f5ef;
  font-size: 12px;
}

.threejs-object3d-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 26px 26px;
}

.object-parent,
.object-child,
.object-formula {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
}

.object-parent {
  left: 116px;
  top: 54px;
  width: 320px;
  height: 172px;
  border-color: var(--accent);
  color: var(--accent-dark);
  transform: rotate(-4deg);
}

.object-child-a {
  left: 176px;
  top: 120px;
  width: 130px;
  height: 72px;
  background: var(--blue);
  transform: rotate(8deg);
}

.object-child-b {
  right: 84px;
  bottom: 54px;
  width: 156px;
  height: 62px;
  background: var(--warm);
}

.object-formula {
  left: 64px;
  bottom: 32px;
  width: 240px;
  min-height: 44px;
  padding: 8px;
  background: #15171a;
  color: #f7f5ef;
}

.threejs-instanced-demo {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 84px 24px 24px;
  background: #15171a;
}

.instanced-source {
  position: absolute;
  left: 24px;
  right: 24px;
  top: 18px;
  display: grid;
  place-items: center;
  min-height: 44px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 900;
}

.instanced-cell {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 2px solid #dbeafe;
  background: var(--blue);
  font-weight: 900;
}

.instanced-cell:nth-child(3n) {
  background: var(--warm);
}

.threejs-overlay-demo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 24px 24px;
}

.overlay-content,
.overlay-selection,
.overlay-handle,
.overlay-label {
  position: absolute;
}

.overlay-content {
  left: 188px;
  top: 104px;
  width: 212px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  background: var(--blue);
  font-weight: 900;
  transform: rotate(-6deg);
}

.overlay-selection {
  left: 176px;
  top: 92px;
  width: 236px;
  height: 128px;
  border: 3px solid var(--accent);
  transform: rotate(-6deg);
}

.overlay-handle {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent);
  background: #f7f5ef;
}

.overlay-nw {
  left: 168px;
  top: 84px;
}

.overlay-ne {
  left: 404px;
  top: 60px;
}

.overlay-sw {
  left: 184px;
  top: 214px;
}

.overlay-se {
  left: 420px;
  top: 188px;
}

.overlay-label {
  right: 26px;
  bottom: 22px;
  padding: 8px 10px;
  background: #15171a;
  color: #f7f5ef;
  font-weight: 900;
}

.threejs-webgpu-demo {
  position: relative;
  overflow: hidden;
  background: #15171a;
}

.webgpu-core,
.webgpu-path,
.webgpu-tsl {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #dbeafe;
  font-weight: 900;
  text-align: center;
}

.webgpu-core {
  left: 38px;
  top: 112px;
  width: 144px;
  height: 76px;
  background: #f7f5ef;
}

.webgpu-path {
  width: 156px;
  height: 78px;
  background: var(--blue);
}

.webgpu-webgl {
  left: 250px;
  top: 66px;
}

.webgpu-next {
  left: 250px;
  bottom: 58px;
  background: var(--warm);
}

.webgpu-tsl {
  right: 38px;
  top: 112px;
  width: 146px;
  height: 76px;
  background: #dbeafe;
}

.threejs-picking-demo {
  position: relative;
  overflow: hidden;
  background: #f7f5ef;
}

.picking-scene,
.picking-target,
.picking-pixel,
.picking-id {
  position: absolute;
  display: grid;
  place-items: center;
  border: 2px solid #14191f;
  font-weight: 900;
  text-align: center;
}

.picking-scene {
  left: 32px;
  top: 36px;
  width: 184px;
  height: 142px;
  background: var(--blue);
}

.picking-target {
  left: 286px;
  top: 72px;
  width: 128px;
  height: 128px;
  background: #15171a;
  color: #f7f5ef;
}

.picking-pixel {
  right: 28px;
  top: 104px;
  width: 146px;
  height: 82px;
  background: #dbeafe;
}

.picking-id {
  width: 96px;
  height: 46px;
  background: var(--warm);
}

.picking-id-0 {
  left: 56px;
  bottom: 34px;
}

.picking-id-1 {
  left: 166px;
  bottom: 68px;
}

.picking-id-2 {
  left: 116px;
  bottom: 118px;
}

.threejs-boundary-demo {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #f7f5ef;
}

.boundary-column {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 16px;
  border: 2px solid #14191f;
  background: var(--surface);
}

.boundary-column h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.boundary-item {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 10px;
  border: 2px solid #14191f;
  background: #dbeafe;
  font-weight: 900;
  text-align: center;
}

.boundary-column:nth-child(2) .boundary-item {
  background: var(--warm);
}

.appendix-demo {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 24px;
  background: #15171a;
}

.appendix-card {
  display: grid;
  place-items: center;
  min-height: 128px;
  padding: 10px;
  border: 2px solid #dbeafe;
  background: #f7f5ef;
  font-weight: 900;
  text-align: center;
}

.appendix-card:nth-child(2n) {
  background: #dbeafe;
}

.appendix-card:nth-child(3n) {
  background: var(--warm);
}

.appendix-debug-overlay,
.appendix-readout,
.appendix-context-lost,
.appendix-overlay-like {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    #f7f5ef;
  background-size: 24px 24px;
}

.appendix-debug-overlay .appendix-card,
.appendix-readout .appendix-card,
.appendix-context-lost .appendix-card {
  min-height: 86px;
  border-color: #14191f;
}

.appendix-frame-metrics,
.appendix-gpu-limits,
.appendix-dispose-like {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.appendix-feature-detect,
.appendix-browser-fallback,
.appendix-export,
.appendix-plugin-api,
.appendix-testable-renderer {
  background: #f7f5ef;
}

.appendix-feature-detect .appendix-card,
.appendix-browser-fallback .appendix-card,
.appendix-export .appendix-card,
.appendix-plugin-api .appendix-card,
.appendix-testable-renderer .appendix-card {
  border-color: #14191f;
}

.appendix-image-pipeline .appendix-card,
.appendix-svg-policy .appendix-card,
.appendix-font-metrics .appendix-card {
  min-height: 104px;
}

.appendix-inertial-pan .appendix-card,
.appendix-snap-motion .appendix-card,
.appendix-hover-transition .appendix-card,
.appendix-motion-math .appendix-card {
  border-color: #dbeafe;
  background: var(--blue);
}

.appendix-inertial-pan .appendix-card:nth-child(2n),
.appendix-snap-motion .appendix-card:nth-child(2n),
.appendix-hover-transition .appendix-card:nth-child(2n),
.appendix-motion-math .appendix-card:nth-child(2n) {
  background: var(--warm);
}

.appendix-offscreen,
.appendix-versioning {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: #15171a;
}

.appendix-offscreen .appendix-card,
.appendix-versioning .appendix-card {
  min-height: 96px;
}

.readout {
  min-height: 92px;
  margin: 0;
  padding: 16px;
  overflow: auto;
  border: 1px solid var(--line);
  background: #15171a;
  color: #dbeafe;
  font-size: 13px;
  line-height: 1.45;
}

@media (max-width: 860px) {
  .lesson-shell {
    grid-template-columns: 1fr;
  }

  .lesson-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .flow-demo {
    grid-template-columns: 1fr 1fr;
  }

  .compare-demo {
    grid-template-columns: 1fr;
  }

  .pipeline-demo,
  .coordinate-demo,
  .webgl-context-demo,
  .shader-demo,
  .matrix-demo,
  .buffer-demo,
  .batch-demo,
  .instance-demo,
  .tool-flow-demo,
  .scene-style-demo,
  .scene-command-demo,
  .media-atlas-demo,
  .media-text-demo,
  .webgpu-flow-demo,
  .webgpu-pipeline-demo,
  .webgpu-bind-demo,
  .webgpu-fallback-demo,
  .webgpu-instance-demo,
  .capstone-panels-demo,
  .capstone-perf-demo,
  .capstone-deploy-demo,
  .threejs-why-demo,
  .threejs-loop-demo,
  .threejs-material-demo,
  .threejs-backend-demo,
  .threejs-lifecycle-demo,
  .threejs-textures-demo,
  .threejs-dispose-demo,
  .threejs-instanced-demo,
  .threejs-boundary-demo,
  .appendix-demo {
    grid-template-columns: 1fr;
  }
}
