/* Scoped reading layout. The homepage and laboratory overview keep their own themes. */
:root:has(.motion-prototype[data-lab-path]) { color-scheme:light; }
.motion-prototype[data-lab-path] { --paper:#f4f4f4; --ink:#292d29; --muted:#737870; --line:#e2e5df; --theme-body-ink:#4c524a; --theme-focus:#33432c; background:var(--paper); color:var(--ink); }
:root[data-reading-mode="study"] .motion-prototype[data-lab-path]:not(:has(.scene-work[data-tone="dark"])) .site-header {
  --navigation-surface-rgb:210 210 210; --navigation-menu-rgb:242 242 242; --navigation-switch-surface:#fafafa;
  --navigation-text:#4d4d4d; --navigation-active:#171717; --navigation-subdued:#939393;
}
.motion-prototype[data-lab-path] .site-footer, .motion-prototype[data-lab-path] .prototype-review { display:none; }
.motion-prototype .lab-path-page { width:min(1480px,calc(100% - 96px)); margin:0 auto; padding:32px 0 64px; color:var(--ink); }
.motion-prototype .lab-notes-index { width:min(1080px,calc(100% - 2 * var(--gutter))); margin:0 auto; padding:40px 0 88px; color:var(--ink); }
.motion-prototype .lab-path-top { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:44px; }
.motion-prototype .lab-path-top a { color:var(--muted); font-size:13px; text-decoration:none; line-height:1.8; }
.motion-prototype .lab-path-top a:hover { color:var(--ink); }
.motion-prototype .lab-reading-layout { display:grid; grid-template-columns:minmax(0,4fr) minmax(0,6fr); align-items:start; gap:clamp(40px,5vw,80px); }
.motion-prototype .lab-reading-column { min-width:0; }
.motion-prototype .lab-path-header { padding-bottom:28px; border-bottom:1px solid var(--line); }
.motion-prototype .lab-path-kind { font-size:12px; line-height:1.6; margin:0 0 14px; color:var(--muted); }
.motion-prototype .lab-path-header h1 { margin:0 0 20px; font-size:clamp(28px,2.5vw,38px); line-height:1.3; font-weight:400; letter-spacing:-.025em; }
.motion-prototype .lab-path-question { margin:0; color:var(--theme-body-ink,var(--muted)); font-size:15px; line-height:1.9; }
.motion-prototype .lab-path-example { margin:0 0 16px; color:var(--muted); font-size:12px; }
.motion-prototype .lab-path-background { margin-top:18px; color:var(--muted); font-size:13px; }
.motion-prototype .lab-path-background summary { width:fit-content; cursor:pointer; line-height:1.8; }
.motion-prototype .lab-path-background p { font-size:14px; line-height:1.95; margin:16px 0 0; }
.motion-prototype .lab-project-status { display:flex; align-items:center; gap:8px; margin:20px 0 0; font-size:12px; color:var(--muted); line-height:1.7; }
.motion-prototype .lab-project-status::before { content:""; width:5px; height:5px; background:#87977e; border-radius:50%; }
.motion-prototype .lab-inline-reader { padding-top:30px; }
.motion-prototype .lab-inline-heading h2 { margin:0; font-size:clamp(22px,2vw,28px); line-height:1.55; letter-spacing:-.02em; font-weight:400; text-wrap:pretty; }
.motion-prototype .lab-inline-meta { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin-top:13px; font-size:12px; color:var(--muted); line-height:1.8; }
.motion-prototype .lab-inline-summary { margin:24px 0 0; font-size:15px; line-height:1.95; color:var(--ink); }
.motion-prototype .lab-inline-body { margin-top:26px; }
.motion-prototype .lab-inline-body p, .motion-prototype .lab-inline-body li { font-size:15px; line-height:1.95; color:var(--theme-body-ink); }
.motion-prototype .lab-inline-body p { margin:0 0 20px; }
.motion-prototype .lab-inline-body h3 { margin:28px 0 12px; font-size:16px; line-height:1.7; font-weight:500; }
.motion-prototype .lab-inline-body h3:first-child { margin-top:0; }
.motion-prototype .lab-inline-body ul { margin:18px 0; padding-left:20px; }
.motion-prototype .lab-inline-body li + li { margin-top:8px; }
.motion-prototype .lab-inline-body figure { margin:24px 0; }
.motion-prototype .lab-inline-body img, .motion-prototype .lab-inline-body video { display:block; width:100%; height:auto; }
.motion-prototype .lab-inline-body figcaption { margin-top:10px; font-size:12px; line-height:1.8; color:var(--muted); }
.motion-prototype .lab-inline-empty h2 { font-size:22px; font-weight:400; }
.motion-prototype .lab-inline-empty p { font-size:15px; line-height:1.9; color:var(--muted); }
.motion-prototype .lab-inline-empty button { background:none; border:0; padding:8px 0; color:var(--ink); font:inherit; cursor:pointer; }
.motion-prototype .lab-selection-announcement { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.motion-prototype .lab-record-picker { display:none; }
.motion-prototype .lab-path-development { position:sticky; top:104px; min-width:0; }
.motion-prototype .lab-path-section-header { display:flex; align-items:center; justify-content:space-between; gap:20px; padding-bottom:12px; border-bottom:1px solid var(--line); }
.motion-prototype .lab-path-section-header h2 { margin:0; font-size:13px; line-height:1.7; font-weight:400; color:var(--muted); }
.motion-prototype .lab-path-controls { display:flex; flex-wrap:wrap; gap:16px; }
.motion-prototype .lab-path-controls button { background:none; padding:4px 0; border:0; color:var(--muted); font:inherit; font-size:12px; cursor:pointer; }
.motion-prototype .lab-path-controls button:hover { color:var(--ink); }
.motion-prototype .lab-canvas { position:relative; overflow:clip; height:clamp(400px,calc(100svh - 300px),700px); isolation:isolate; overscroll-behavior:contain; }
.motion-prototype .lab-canvas[data-lab-canvas-panning="true"], .motion-prototype .lab-canvas[data-lab-canvas-panning="true"] button { cursor:grabbing; }
.motion-prototype .lab-path-board { position:absolute; top:0; left:0; transform-origin:0 0; user-select:none; }
.motion-prototype .lab-path-links { position:absolute; inset:0; width:100%; height:100%; pointer-events:none; overflow:visible; }
.motion-prototype .lab-path-links path { fill:none; stroke:#bec6b7; stroke-width:1; vector-effect:non-scaling-stroke; transition:stroke var(--motion-duration-state,180ms) var(--motion-ease-standard,cubic-bezier(.2,.7,.2,1)); }
.motion-prototype .lab-path-links path.is-related { stroke:#8e9c83; stroke-width:1.35; }
.motion-prototype .lab-path-node { position:absolute; width:210px; height:44px; transform:translate(-22px,-22px); }
.motion-prototype .lab-path-point { display:flex; align-items:center; position:relative; gap:0; min-height:44px; max-width:100%; padding:0; border:0; background:none; font:inherit; color:var(--ink); cursor:pointer; text-align:left; }
.motion-prototype .lab-path-light { display:block; width:8px; height:8px; flex:none; margin:0 18px; border:1px solid #8b9783; border-radius:50%; background:#fff; transition:background-color var(--motion-duration-state,180ms) var(--motion-ease-standard,cubic-bezier(.2,.7,.2,1)),box-shadow var(--motion-duration-state,180ms) var(--motion-ease-standard,cubic-bezier(.2,.7,.2,1)); }
.motion-prototype .lab-path-label { display:flex; align-items:center; gap:9px; font-size:clamp(14px,calc(12px / var(--lab-canvas-scale,1)),24px); line-height:1.6; white-space:nowrap; }
.motion-prototype .lab-path-label small { font-size:10px; line-height:1.6; color:var(--muted); }
.motion-prototype .lab-path-node[data-status="stopped"] .lab-path-label { color:var(--muted); }
.motion-prototype .lab-path-node[aria-current="step"] .lab-path-light { background:#8b9783; }
.motion-prototype .lab-path-node[data-selected="true"] .lab-path-light { background:#819275; box-shadow:0 0 0 5px #e7ebe3; }
.motion-prototype .lab-path-node[data-selected="true"] .lab-path-label { color:#33432c; font-weight:500; }
.motion-prototype .lab-path-point:hover .lab-path-light { box-shadow:0 0 0 4px #eef0ea; }
.motion-prototype .lab-canvas-toolbar { display:flex; align-items:center; gap:10px; padding-top:10px; border-top:1px solid var(--line); font-size:11px; color:var(--muted); }
.motion-prototype .lab-canvas-hint { margin-right:auto; }
.motion-prototype .lab-canvas-toolbar output { min-width:36px; text-align:right; font-variant-numeric:tabular-nums; }
.motion-prototype .lab-canvas-toolbar button { min-width:32px; min-height:32px; padding:4px; border:0; background:none; color:var(--ink); font:inherit; font-size:12px; cursor:pointer; }
.motion-prototype .lab-path-empty { min-height:300px; padding:40px 0; color:var(--muted); font-size:14px; line-height:1.8; }
.motion-prototype .lab-path-empty button { display:block; background:none; border:0; padding:12px 0; color:var(--ink); font:inherit; cursor:pointer; text-align:left; }
.motion-prototype .lab-path-page :focus-visible { outline:1px solid #7c8d70; outline-offset:4px; }
.motion-prototype .lab-canvas:focus-visible { outline-offset:-2px; }
.motion-prototype .lab-notes-index h1 { margin:0 0 20px; font-size:40px; font-weight:400; }
.motion-prototype .lab-project-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:clamp(24px,5vw,64px); margin:44px 0; }
.motion-prototype .lab-project-card { display:block; min-width:0; color:var(--ink); text-decoration:none; }
.motion-prototype .lab-project-figure { display:grid; place-items:center; aspect-ratio:1; margin-bottom:20px; }
.motion-prototype .lab-project-figure .lab-organism { width:100%; height:auto; max-width:280px; transform:none; }
.motion-prototype .lab-project-figure .lab-star-form { display:none; }
.motion-prototype .lab-project-card-heading { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding-top:20px; border-top:1px solid color-mix(in srgb,var(--ink) 12%,transparent); }
.motion-prototype .lab-project-card h2 { margin:0; font-size:20px; line-height:1.5; font-weight:450; }
.motion-prototype .lab-project-card-heading span { flex:none; color:var(--muted); font-size:12px; }
.motion-prototype .lab-project-card p { margin:12px 0 0; color:var(--muted); line-height:1.8; font-size:14px; }
.motion-prototype .lab-project-card:hover h2 { text-decoration:underline; text-underline-offset:5px; text-decoration-thickness:1px; }
.motion-prototype .lab-project-card:focus-visible { outline:1px solid var(--muted); outline-offset:8px; }
@media (max-width:1100px) {
  .motion-prototype .lab-path-page { width:calc(100% - 64px); }
  .motion-prototype .lab-reading-layout { gap:36px; }
}
@media (min-width:901px) and (max-height:700px) {
  .motion-prototype .lab-path-development { top:88px; }
  .motion-prototype .lab-canvas { height:max(240px,calc(100svh - 220px)); }
}
@media (max-width:900px) {
  .motion-prototype .lab-path-page { width:calc(100% - 48px); }
  .motion-prototype .lab-reading-layout { grid-template-columns:minmax(0,1fr); gap:36px; }
  .motion-prototype .lab-reading-column { max-width:620px; width:100%; margin-inline:auto; }
  .motion-prototype .lab-path-development { position:static; }
  .motion-prototype .lab-canvas { height:480px; }
  .motion-prototype .lab-record-picker { display:grid; gap:10px; margin-top:24px; color:var(--muted); font-size:12px; }
  .motion-prototype .lab-record-picker select { width:100%; min-width:0; padding:12px 8px; border:1px solid var(--line); border-radius:0; color:var(--ink); background:var(--paper); font:inherit; font-size:14px; }
}
@media (max-width:600px) {
  .motion-prototype .lab-path-page { width:calc(100% - 36px); padding:24px 0 48px; }
  .motion-prototype .lab-path-top { margin-bottom:32px; }
  .motion-prototype .lab-canvas { height:400px; }
  .motion-prototype .lab-inline-body p, .motion-prototype .lab-inline-body li { font-size:15px; }
  .motion-prototype .lab-canvas-hint { font-size:0; }
  .motion-prototype .lab-canvas-hint::after { content:"拖动浏览 · 双指缩放"; font-size:11px; }
  .motion-prototype .lab-project-grid { grid-template-columns:minmax(0,1fr); gap:36px; margin-top:32px; }
  .motion-prototype .lab-project-card { width:min(100%,420px); margin-inline:auto; }
  .motion-prototype .lab-project-figure { aspect-ratio:1.35; margin-bottom:12px; }
  .motion-prototype .lab-project-figure .lab-organism { width:250px; max-width:100%; }
}
@media (prefers-reduced-motion:reduce) {
  .motion-prototype .lab-path-light, .motion-prototype .lab-path-links path { transition:none; }
}
