/* the 3D figures, shared by the pages that draw one: src/stage3d.js (lp3d,
   svm, hopfield) puts its canvas in a .stage3d box with the bar .bar3d under
   it; src/stage3d-b.js (network, manifolds, superposition) makes a square
   .view3d box with the bar .tools3d over its top right corner and the labels
   of the axes; learning.html draws its own surface in a .stage3d box */
.stage3d { position: relative; }
.stage3d canvas, .view3d > canvas { display: block; width: 100%; cursor: grab; border-radius: 6px; touch-action: none; }
.stage3d:fullscreen { background: var(--ground); padding: 12px; }
.stage3d:-webkit-full-screen { background: var(--ground); padding: 12px; width: 100%; height: 100%; }
.bar3d { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; font: 12px 'IBM Plex Mono', monospace; color: var(--ink-soft); }
.bar3d label { display: flex; align-items: center; gap: 4px; }
.bar3d input { accent-color: var(--accent); }
.bar3d button { padding: 3px 8px; font-size: 12px; }
.view3d { position: relative; width: 100%; aspect-ratio: 1; border-radius: 6px; background: var(--ground); overflow: hidden; }
.view3d > canvas { height: 100%; border-radius: 0; }
.view3d:fullscreen { width: 100vw; height: 100vh; aspect-ratio: auto; border-radius: 0; }
.view3d .labels3d { position: absolute; inset: 0; pointer-events: none; }
.tools3d { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; z-index: 2; }
.tools3d button { font: 11px/1.2 'IBM Plex Mono', monospace; padding: 2px 6px; background: var(--panel); opacity: .85; }
.tools3d button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.lab3d { font: 11px 'IBM Plex Mono', monospace; color: var(--ink-soft); white-space: nowrap; }
.lab3d.name { color: var(--ink); font-weight: 500; }
.lab3d.feat { color: var(--ink); font-size: 12px; font-weight: 500; }
.view3d:fullscreen .lab3d { font-size: 16px; }
.view3d:fullscreen .tools3d button { font-size: 14px; }
/* two views of one figure, switched by a pair of buttons */
.switch { display: inline-flex; gap: 0; }
.switch button { border-radius: 0; padding: 2px 8px; font-size: 11px; }
.switch button:first-child { border-radius: 6px 0 0 6px; }
.switch button:last-child { border-radius: 0 6px 6px 0; border-left: 0; }
.switch button[aria-pressed="true"] { background: var(--accent); color: var(--ground); border-color: var(--accent); }
