/* ════════════════════════════════════════════════════════════════
   RandWOD Website — lab.css
   The LAB panel (#pl): bench plot + app hand-off card.
   Depends on style.css tokens: --bg --bg2 --text --text-25/40/60
   --line --line-strong --orange --blue --body --mono
   ════════════════════════════════════════════════════════════════ */

/* ── panel ────────────────────────────────────────────────────── */
/* LAB-local padding: the densest panel on the site buys ~28px against the
   pinned-viewport budget without touching the shared .panel rule */
#pl { padding-top: 72px; padding-bottom: 48px; }

/* ── lede ─────────────────────────────────────────────────────── */
#pl .lab-lede {
  margin: 10px 0 0;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text-60);
  max-width: 700px;
  text-wrap: pretty;
}

/* ── mono labels ──────────────────────────────────────────────── */
#pl .lab-l {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  color: var(--text-40);
}
#pl .lab-l-dim { letter-spacing: 0.14em; color: var(--text-25); }

/* ── specimen / evidence header row ───────────────────────────── */
#pl .lab-io {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 10px;
}
#pl .lab-io-col { display: flex; flex-direction: column; gap: 5px; }
#pl .lab-io-col--right { text-align: right; }
#pl .lab-out { display: flex; align-items: flex-end; gap: 16px; }
#pl .lab-count {
  font-family: var(--mono);
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 0.86;
  font-variant-numeric: tabular-nums;
  color: rgba(242, 240, 235, 0.12);
  transition: color .2s;
}
#pl .lab-count.on { color: var(--orange); }

/* ── the bench plot ───────────────────────────────────────────── */
#pl .lab-plot { position: relative; height: 320px; margin-top: 8px; }
#pl .lab-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
#pl .lab-yt {
  position: absolute;
  left: 0;
  width: 52px;
  text-align: right;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--text-25);
}
#pl .lab-ytitle {
  position: absolute;
  left: -4px;
  top: 78px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--text-40);
}
#pl .lab-tag {
  position: absolute;
  top: 0;
  left: 66px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--blue);
}
#pl .lab-xlabels {
  position: absolute;
  left: 66px;
  right: 40px;
  top: 302px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-25);
}
#pl .lab-xlabels span.past { color: var(--text-40); }
#pl .lab-xlabels span.on { color: var(--orange); font-weight: 700; }
#pl .lab-xend {
  position: absolute;
  right: 0;
  top: 0;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: var(--text-25);
}
#pl .lab-drag {
  position: absolute;
  left: 66px;
  right: 40px;
  top: 0;
  height: 294px;
  cursor: grab;
  touch-action: none;
}
#pl .lab-drag:active { cursor: grabbing; }
#pl .lab-drag:focus-visible { outline: 1px solid var(--blue); outline-offset: 4px; }

/* ── stage description ────────────────────────────────────────── */
/* sits tight under the stage labels — axis, labels and description read as
   one unit, so no separator and almost no gap */
#pl .lab-desc {
  margin-top: 4px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
#pl .lab-desc-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--orange);
  white-space: nowrap;
}
#pl .lab-desc p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-60);
  max-width: 760px;
  text-wrap: pretty;
}
#pl .lab-hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-25);
  white-space: nowrap;
}

/* ── bottom: app card + open questions ────────────────────────── */
#pl .lab-bottom {
  margin-top: 10px;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 48px;
}
#pl .lab-open {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  max-width: 480px;
}
#pl .lab-open p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-40);
  text-wrap: pretty;
}

/* frameless hand-off CTA — SF type + the capsule are the app vocabulary; the
   card frame that used to wrap them was dropped for breathing room */
#pl .lab-cta {
  width: 380px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  font-family: -apple-system, 'SF Pro Text', system-ui, sans-serif;
}
#pl .lab-cta-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #fff;
}
#pl .lab-cta-sub { font-size: 14px; line-height: 1.45; color: rgba(255, 255, 255, 0.6); }
#pl .lab-send {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 46px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  transition: box-shadow .25s;
}
#pl .lab-send:hover { box-shadow: 0 0 32px rgba(0, 177, 252, 0.4); }
/* inline SVG (see index.html) — currentColor inherits the capsule's white */
#pl .lab-send-ico { flex: none; display: block; }

/* ── narrow ───────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  #pl .lab-bottom { flex-direction: column-reverse; gap: 24px; }
  #pl .lab-cta { width: 100%; max-width: 380px; }
  #pl .lab-open { max-width: none; }
}
@media (max-width: 760px) {
  #pl .lab-io { flex-direction: column; align-items: flex-start; gap: 18px; }
  #pl .lab-io-col--right { text-align: left; }
  #pl .lab-desc { flex-direction: column; gap: 10px; }
  #pl .lab-hint { display: none; }
  #pl .lab-xlabels { font-size: 8.5px; letter-spacing: 0.08em; }
  #pl .lab-xend { display: none; }
}

/* ── reduced motion ───────────────────────────────────────────────── */
/* lab.js freezes the snow itself (its RM flag); these are the CSS-side
   transitions, per the both-CSS-and-JS rule in docs/ui-guidelines/site.md. */
@media (prefers-reduced-motion: reduce) {
  #pl .lab-count, #pl .lab-send { transition: none; }
}
