/* web/lab.css -- the collision lab: the stage beside a rail of controls; stacked on a phone.
   Colours and type come from chrome.css and notebook.css (--rule, --muted, --blue, --amber,
   --green, --red, --mono). */
main.lab-page { max-width: none; }
.lab { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; margin-top: 20px; height: calc(100vh - 210px); min-height: 520px; }
.lab .stage { position: relative; margin: 0; height: auto; min-height: 0; }
.lab .stage canvas { width: 100%; height: 100%; display: block; }
.stage-note { position: absolute; left: 16px; bottom: 12px; margin: 0; font-family: var(--mono); font-size: 13px; color: var(--muted); }
.stage-note:empty { display: none; }
.rail { overflow-y: auto; border: 1px solid var(--rule); padding: 0 16px; }
.rail section { padding: 14px 0; border-bottom: 1px solid var(--rule); display: grid; gap: 8px; }
.rail section:last-child { border-bottom: 0; }
.rail h1 { font-size: 20px; margin: 0; }
.rail h2 { font-size: 13px; margin: 0; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.muted { color: var(--muted); margin: 0; }
.mono { font-family: var(--mono); }
.small { font-size: 13px; }
.row { display: flex; gap: 8px; align-items: center; }
.status { display: flex; align-items: center; gap: 8px; margin: 0; font-family: var(--mono); font-size: 14px; }
.status .dot, .chip .dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--amber); }
[data-state="clear"] .dot { background: var(--green); }
[data-state="collides"] .dot { background: var(--red); }
[data-state="undecided"] .dot { background: var(--muted); }
.pairs { margin: 0; padding-left: 18px; font-family: var(--mono); font-size: 12px; max-height: 8em; overflow-y: auto; }
.poses { display: flex; flex-wrap: wrap; gap: 6px; }
.mechs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.mechs a { border: 1px solid var(--rule); padding: 3px 8px; text-decoration: none; }
.mechs a[aria-current="page"] { border-color: currentColor; font-weight: 600; }
.poses button, .row button, .row select { font: inherit; font-size: 13px; }
.joints { display: grid; gap: 6px; }
.joint { display: grid; grid-template-columns: 52px minmax(0, 1fr) 72px 18px; gap: 8px; align-items: center; font-family: var(--mono); font-size: 13px; }
.joint input { width: 100%; }
.joint output { text-align: right; font-variant-numeric: tabular-nums; }
.chip { display: inline-flex; }
.scrub { width: 100%; height: 24px; background: var(--rule); }
.chart { width: 100%; height: 160px; border: 1px solid var(--rule); cursor: crosshair; }
.funnel { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; margin: 0; font-family: var(--mono); font-size: 12px; }
.funnel dt { color: var(--muted); }
.funnel dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) {
  .lab { grid-template-columns: minmax(0, 1fr); height: auto; }
  .lab .stage { height: 60vh; }
  .rail { max-height: none; }
}
