/* Floating Leaf Disks: only what's specific to this lab. Shared chrome is in ../lab.css. */
:root {
  --cup-a: #16a34a;
  --cup-b: #94a3b8;
}

/* ---------- data panel ---------- */
.data-panel {
  right: var(--gutter);
  bottom: calc(var(--timeline-h) + var(--gutter) * 2);
  width: 348px;
  padding-bottom: 14px;
}
.clock {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px; font-weight: 600;
  padding: 3px 9px; border-radius: 8px;
  background: #0f1d2b; color: var(--accent-glow);
}
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px; }
.stat {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 11px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.swatch { width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; flex: none; }
.sw-a { background: var(--cup-a); }
.sw-b { background: var(--cup-b); }
.stat-label { font-size: 11.5px; color: var(--muted); }
.stat-val { margin-top: 2px; }
.stat-val b { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-val span { font-size: 12px; color: var(--muted); margin-left: 2px; }
.chart-wrap { padding: 10px 14px 0; }
#chart { width: 100%; height: 160px; display: block; }
.speed {
  display: flex; align-items: center; gap: 4px;
  margin: 10px 14px 0; padding: 4px;
  background: rgba(23, 24, 26, 0.05); border-radius: var(--pill);
}
.speed span { flex: 1; display: inline-flex; align-items: center; gap: 6px; padding-left: 8px; font-size: 12.5px; color: var(--muted); }
.speed button {
  border: 0; background: transparent;
  padding: 6px 13px; border-radius: var(--pill);
  font: 500 13px/1 var(--display); letter-spacing: .02em; color: var(--ink-2);
  cursor: pointer;
}
.speed button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(23, 24, 26, 0.12); }

.result { margin: 12px 14px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; color: var(--ink-2); }
.result .res-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.result .res-row b { color: var(--ink); }
.result p { margin: 8px 0 12px; }

/* ---------- info modal ---------- */
.equation {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 14px 0; padding: 12px; border-radius: 12px;
  background: #f4f7f9;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 14px; color: var(--ink);
}

/* observation mode: the data panel takes the right side, so the card moves left of it,
 * and the list and card slim down to leave the cups in view */
body.observing .lab-steps small, body.observing .lab-steps .pips, body.observing .lab-card .why { display: none; }
body.observing .lab-steps li { padding: 6px 8px; }
body.observing .lab-steps li:not(:last-child)::after { top: 32px; height: calc(100% - 26px); }
@media (min-width: 821px) {
  body.observing .lab-card {
    left: calc((100% - 348px - var(--gutter)) / 2);
    width: min(480px, calc(100% - 348px - var(--gutter) * 4));
    min-width: 0;
  }
}

@media (max-width: 820px) {
  .data-panel { left: var(--gutter); right: var(--gutter); width: auto; }
  .data-panel #chart { height: 110px; }
  body.observing .lab-card { display: none; } /* the data panel takes the bottom of the screen */
}

/* Watch mode: the captions keep clear of the data panel (beside it, or above the scene on phones) */
@media (min-width: 821px) {
  body.observing .lab-captions { right: calc(348px + var(--gutter) * 2); }
}
@media (max-width: 820px) {
  body.observing .lab-captions { top: 60px; bottom: auto; align-items: flex-start; }
}
