/* All lab styles are locally scoped. No global tokens or CMS content are changed. */
.movement-lab {
  --ml-ink: #17332f;
  --ml-paper: #f6f3eb;
  --ml-gold: #82683f;
  --ml-muted: #53625a;
  --ml-line: #c6cabe;
  color: var(--ml-ink);
  background: var(--ml-paper);
  border: 1px solid var(--ml-line);
  margin: 36px 0 52px;
  padding: clamp(18px, 4vw, 44px);
  font-family: Arial, sans-serif;
  line-height: 1.6;
  scroll-margin-top: 120px;
}
.movement-lab, .movement-lab * { box-sizing: border-box; }
.movement-lab [hidden] { display: none !important; }
.movement-lab :is(h2, h3, h4) { font-family: Georgia, serif; color: var(--ml-ink); font-weight: 400; }
.movement-lab h2 { font-size: clamp(30px, 4vw, 48px); line-height: 1.1; margin: 0 0 18px; }
.movement-lab h3 { font-size: clamp(25px, 3vw, 34px); line-height: 1.2; margin: 0 0 10px; }
.movement-lab h4 { font-size: 24px; line-height: 1.25; margin: 0 0 12px; }
.movement-lab p { font-size: 15px; line-height: 1.7; margin: 0 0 16px; }
.movement-lab .ml-kicker { color: var(--ml-gold); font-size: 10px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0 0 12px; }
.movement-lab .ml-intro { max-width: 740px; font-size: 17px; }
.movement-lab .ml-fine { color: var(--ml-muted); font-size: 12px; line-height: 1.65; }
.movement-lab a { color: var(--ml-ink); text-decoration: underline; text-underline-offset: .2em; }
.movement-lab a:hover { text-decoration-thickness: 2px; }
.movement-lab :is(button, input) { font: inherit; }
.movement-lab button {
  color: var(--ml-ink); background: transparent; border: 1px solid var(--ml-line);
  border-radius: 0; padding: 11px 15px; min-height: 44px; cursor: pointer;
  font-family: Arial, sans-serif; font-size: 13px; line-height: 1.4; text-align: left;
}
.movement-lab button:hover { border-color: var(--ml-ink); background: #e7eadd; }
.movement-lab button[aria-pressed="true"] { background: var(--ml-ink); border-color: var(--ml-ink); color: var(--ml-paper); }
.movement-lab button:disabled { opacity: .65; cursor: not-allowed; }
.movement-lab :focus-visible { outline: 3px solid var(--ml-gold); outline-offset: 4px; }
.movement-lab .ml-system-controls { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0; }
.movement-lab .ml-system-controls button { flex: 1 1 150px; font-size: 15px; padding: 14px 18px; }
.movement-lab .ml-panel { border-top: 1px solid var(--ml-line); padding: 26px 0 0; margin-top: 26px; }
.movement-lab[data-ml-ready="true"] .ml-panel { margin-top: 0; }
.movement-lab .ml-panel-header { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 24px; justify-content: space-between; }
.movement-lab .ml-panel-header p { font-size: 12px; color: var(--ml-muted); }
.movement-lab .ml-trace { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 44px); align-items: center; }
.movement-lab .ml-diagram { margin: 0; min-width: 0; }
.movement-lab .ml-diagram svg { width: 100%; height: auto; max-width: 530px; display: block; margin: auto; overflow: visible; }
.movement-lab .ml-diagram figcaption { font-size: 11px; line-height: 1.6; color: var(--ml-muted); padding-top: 4px; }
.movement-lab .ml-node-disc { fill: #fffdf7; stroke: var(--ml-line); stroke-width: 1.4; }
.movement-lab .ml-node-active .ml-node-disc { fill: #e5e8db; stroke: var(--ml-gold); stroke-width: 3; }
.movement-lab .ml-node-art { fill: none; stroke: var(--ml-ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.movement-lab .ml-node-label { font: 16px Arial, sans-serif; fill: var(--ml-ink); text-anchor: middle; }
.movement-lab .ml-node-number { font: bold 12px Arial, sans-serif; fill: var(--ml-gold); text-anchor: middle; }
.movement-lab .ml-path { fill: none; stroke: var(--ml-gold); stroke-width: 2; }
.movement-lab .ml-control-path { fill: none; stroke: var(--ml-muted); stroke-width: 1.7; stroke-dasharray: 5 5; }
.movement-lab .ml-path-label { font: 12px Arial, sans-serif; fill: var(--ml-muted); text-anchor: middle; }
.movement-lab .ml-stage-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 22px; }
.movement-lab .ml-stage-controls button { padding: 11px 10px; }
.movement-lab .ml-stage-controls button span { display: inline-block; padding-right: 5px; opacity: .75; }
.movement-lab .ml-stage-note { border-left: 2px solid var(--ml-gold); padding: 0 0 0 18px; margin-bottom: 24px; }
.movement-lab[data-ml-ready="true"] .ml-notes { min-height: 190px; }
.movement-lab .ml-note-actions { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.movement-lab .ml-note-actions span { font-size: 11px; color: var(--ml-muted); letter-spacing: .04em; }
.movement-lab .ml-panel-source { margin: 22px 0 0; padding: 14px 0 0; border-top: 1px solid var(--ml-line); font-size: 12px; }
.movement-lab .ml-comparison { margin-top: 38px; padding-top: 30px; border-top: 1px solid var(--ml-line); }
.movement-lab .ml-comparison-intro { max-width: 740px; }
.movement-lab .ml-dials { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 24px 0; }
.movement-lab .ml-dial { min-width: 0; margin: 0; text-align: center; padding: 16px 10px; border: 1px solid var(--ml-line); background: #fffdf7; }
.movement-lab .ml-dial svg { display: block; width: min(100%, 200px); height: auto; margin: 0 auto 12px; }
.movement-lab .ml-dial figcaption { font-size: 12px; line-height: 1.5; }
.movement-lab .ml-dial strong { display: block; font-family: Georgia, serif; font-size: 20px; font-weight: 400; margin: 0 0 5px; }
.movement-lab .ml-dial-track { stroke: var(--ml-line); fill: none; }
.movement-lab .ml-dial-ticks { stroke: var(--ml-gold); stroke-width: 1.5; }
.movement-lab .ml-dial-hand { stroke: var(--ml-ink); stroke-width: 2; stroke-linecap: round; }
.movement-lab .ml-dial-center { fill: var(--ml-gold); }
.movement-lab .ml-playback-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.movement-lab .ml-playback-buttons button { text-align: center; }
.movement-lab .ml-scrubber { display: grid; grid-template-columns: 1fr auto; gap: 10px 14px; margin-bottom: 16px; align-items: center; }
.movement-lab .ml-scrubber label { font-size: 13px; }
.movement-lab .ml-scrubber output { font-variant-numeric: tabular-nums; font-size: 13px; min-width: 4ch; text-align: right; }
.movement-lab .ml-scrubber input { grid-column: 1 / -1; width: 100%; accent-color: var(--ml-ink); min-height: 36px; margin: 0; cursor: pointer; }
.movement-lab .ml-motion-note { min-height: 2em; }
.movement-lab .ml-takeaway { margin: 26px 0 0; padding: 20px 22px; background: var(--ml-ink); color: var(--ml-paper); }
.movement-lab .ml-takeaway p { margin: 0; font-size: 14px; }
.movement-lab .ml-takeaway strong { color: #dfca9d; font-weight: 400; }
.movement-lab .ml-links { display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 12px; margin-top: 22px; }
.movement-lab .ml-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 800px) {
  .movement-lab .ml-trace { grid-template-columns: 1fr; }
  .movement-lab .ml-diagram svg { max-width: 450px; }
  .movement-lab[data-ml-ready="true"] .ml-notes { min-height: 0; }
}
@media (max-width: 480px) {
  .movement-lab { padding: 18px 14px; }
  .movement-lab .ml-dials { grid-template-columns: 1fr; gap: 8px; }
  .movement-lab .ml-dial { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 12px; text-align: left; padding: 12px; }
  .movement-lab .ml-dial svg { margin: 0; width: 104px; }
  .movement-lab .ml-dial strong { font-size: 20px; }
  .movement-lab .ml-stage-controls button { font-size: 12px; }
  .movement-lab .ml-system-controls { gap: 6px; }
  .movement-lab .ml-system-controls button { flex-basis: 100%; padding: 11px 14px; }
  .movement-lab .ml-playback-buttons button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .movement-lab *, .movement-lab *::before, .movement-lab *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
html.motion-off .movement-lab *, html.motion-off .movement-lab *::before, html.motion-off .movement-lab *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media print {
  .movement-lab [data-ml-enhanced], .movement-lab .ml-sr { display: none !important; }
  .movement-lab [data-ml-panel][hidden], .movement-lab [data-ml-note][hidden] { display: block !important; }
  .movement-lab .ml-trace { grid-template-columns: 1fr 1fr; }
  .movement-lab .ml-panel { break-inside: avoid; }
  .movement-lab .ml-takeaway { background: transparent; color: var(--ml-ink); border: 1px solid var(--ml-line); }
  .movement-lab .ml-takeaway strong { color: var(--ml-ink); }
}
