/* Think it, see it: the live agent lab on the home page. */

/* Step colors for chart marks, validated for the dark surface (dataviz validator: all checks pass). */
.s-plan { --mk: #4a8ae6; }
.s-make { --mk: #d9673f; }
.s-check { --mk: #1fa094; }
.s-ship { --mk: #bf8420; }

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Lab panel: header line, agent bar, composer, machine, run results */
.think { border-top: 1px solid var(--divider); border-bottom: 1px solid var(--divider); background: #0f100e; padding-block: clamp(40px, 6vw, 72px); }
.lab { display: grid; gap: 16px; }
.lab-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 20px; }
.lab-intro { margin-top: 8px; color: var(--muted); }
.think h2 { font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.05; letter-spacing: -0.02em; }
.lab-meta { display: inline-flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); max-width: none; }
.lab-live { display: inline-flex; align-items: center; gap: 8px; color: var(--text); }
.lab-meta.offline .live-dot { background: var(--muted); animation: none; }

.lab-panel { background: var(--surface); border: 1px solid var(--divider); border-radius: 14px; display: grid; min-width: 0; }
.lab-panel > * { padding-inline: clamp(14px, 2.4vw, 20px); }
.agent-bar { display: flex; align-items: center; gap: 12px; padding-block: 14px; border-bottom: 1px solid var(--divider); }
.agent-mark { width: 40px; height: 40px; flex: none; fill: none; stroke: var(--primary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agent-mark rect { fill: var(--field); stroke: var(--border); stroke-width: 1; }
.agent-mark circle { fill: var(--primary); stroke: none; }
.agent-id { flex: 1; min-width: 0; }
.agent-name { font: 700 15px/1.3 var(--heading); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.agent-status { font-size: 14px; color: var(--muted); max-width: none; }
.agent-stats { display: flex; gap: 18px; margin: 0; }
.agent-stats div { display: grid; text-align: right; }
.agent-stats dt { font-size: 11px; color: var(--muted); order: 2; }
.agent-stats dd { margin: 0; font: 600 15px/1.2 var(--heading); order: 1; }
.mode-chip { --fx: var(--muted); }
/* The lab keeps its pill chips; site.css squares the rest of the site's tags. */
.think .chip, .lab-dialog .chip { background: var(--fbg, var(--soft)); color: var(--fx, var(--muted)); border: 1px solid color-mix(in srgb, var(--fx, var(--muted)) 45%, transparent); border-radius: 999px; padding: 5px 10px; font-weight: 600; }

.prompt { display: flex; align-items: center; gap: 8px; padding-block: 12px 8px; }
.prompt textarea {
  flex: 1; min-width: 0; resize: none; border: 1px solid var(--border); border-radius: 10px; outline: 0;
  background: var(--field); color: var(--text); font: 400 16px/1.5 var(--body);
  padding: 9px 12px; min-height: 42px; max-height: 120px; field-sizing: content;
}
.prompt textarea:focus-visible { border-color: var(--muted); }
.prompt textarea::placeholder { color: var(--muted); }
.prompt .count { font-size: 12px; color: var(--muted); }
.ghost {
  min-height: 40px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border);
  background: none; color: var(--text); font: 500 13px/1 var(--body); cursor: pointer; white-space: nowrap;
}
.ghost:hover { border-color: var(--muted); }
.send {
  width: 42px; height: 42px; flex: none; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--primary); color: var(--on-primary); display: grid; place-items: center;
}
.send:hover { background: var(--primary-hover); }
.send:disabled { background: var(--soft); color: var(--muted); cursor: not-allowed; }
.send svg { width: 18px; height: 18px; }
.ghost:focus-visible, .send:focus-visible, .preset:focus-visible, .link-btn:focus-visible, .timing summary:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.presets { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 12px; }
.presets[hidden] { display: none; }
.quota-note { margin: 0 0 12px; font-size: 14px; color: var(--muted); max-width: 72ch; }
.quota-note b { color: var(--text); font-weight: 600; }
.send.replay { width: auto; padding: 0 14px; font: 600 14px/1 var(--body); white-space: nowrap; }
#think-idea:disabled { opacity: 0.6; cursor: not-allowed; }
.preset {
  min-height: 32px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--divider); background: var(--field); color: var(--muted);
  font: 500 12px/1 var(--body); cursor: pointer;
}
.preset:hover { border-color: var(--border); color: var(--text); }

/* Human check: only shown when Turnstile needs an interaction */
.human-check { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 clamp(14px, 2.4vw, 20px) 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--field); }
.human-check p { font-size: 14px; color: var(--muted); max-width: 44ch; }
.human-check b { color: var(--text); font-weight: 600; }

/* The machine: Plan, Make, Check, Ship on one conveyor. State lives on data attributes and station classes. */
/* Stage: the 2x2 machine on the left, the concept it is building on the right */
.stage { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(16px, 3vw, 28px); align-items: start; padding-block: 16px; border-top: 1px solid var(--divider); }
.machine { display: block; width: 100%; max-width: 460px; height: auto; margin-inline: auto; overflow: visible; }
.machine .housing, .machine .leg, .machine .sheet, .machine .lens { fill: var(--field); stroke: var(--border); stroke-width: 1.5; transition: stroke 0.3s, fill 0.3s; }
.machine .sheet { fill: #20221f; }
.machine .ink { fill: none; stroke: var(--mk); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 50; stroke-dashoffset: 50; }
.machine .mote { fill: color-mix(in srgb, var(--mk) 30%, #fff); opacity: 0; transform-box: fill-box; transform-origin: center; }
.machine .bulb circle { fill: none; stroke: var(--border); stroke-width: 1.5; transition: fill 0.3s, stroke 0.3s; }
.machine .bulb path { stroke: var(--border); stroke-width: 1.5; stroke-linecap: round; }
.machine .nozzle { fill: var(--raised); stroke: var(--border); stroke-width: 1.5; }
.machine .spark { fill: none; stroke: var(--mk); stroke-width: 2; stroke-linecap: round; opacity: 0; }
.machine .slot { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 4 4; transition: stroke 0.3s; }
.machine .arch { fill: none; }
.machine .lens-in { fill: var(--border); transition: fill 0.3s; }
.machine .beam { fill: var(--mk); opacity: 0; transform-box: fill-box; transform-origin: 50% 0; }
.machine .lamp { fill: var(--raised); stroke: var(--border); stroke-width: 1.5; transition: fill 0.3s; }
.machine .lamp.pass { fill: #1fa094; }
.machine .lamp.fail { fill: #ff8a7a; }
.machine .face { fill: var(--raised); stroke: var(--border); stroke-width: 1.5; }
.machine .dial { fill: none; stroke: var(--divider); stroke-width: 3; stroke-linecap: round; }
.machine .hub { fill: var(--text); }
.machine .mast { stroke: var(--border); stroke-width: 2; }
.machine .pass-tick { stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.machine .needle { stroke: var(--text); stroke-width: 2; stroke-linecap: round; transform-box: fill-box; transform-origin: 50% 100%; transform: rotate(var(--needle, -90deg)); transition: transform 0.8s cubic-bezier(0.3, 1.4, 0.5, 1); }
.machine .slats, .machine .lid { fill: none; stroke: var(--border); stroke-width: 1.5; }
.machine .lid { stroke-width: 3; stroke-linecap: round; }
.machine .shipmark { fill: none; stroke: var(--mk); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; }
.machine .belt-edge { fill: none; stroke: var(--border); stroke-width: 16; stroke-linecap: round; stroke-linejoin: round; }
.machine .belt { fill: none; stroke: #1b1c1a; stroke-width: 12; stroke-linecap: round; stroke-linejoin: round; }
.machine .belt-return { fill: none; stroke: var(--divider); stroke-width: 2; stroke-dasharray: 3 6; }
.machine .roller circle { fill: var(--raised); stroke: var(--border); stroke-width: 1.5; }
.machine .roller path { stroke: var(--muted); stroke-width: 1.5; }
.machine .loop { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 4 5; transition: stroke 0.3s; }
.machine .loop-label { fill: var(--muted); font: 500 11px var(--body); text-anchor: middle; }
.machine .retry-dot { fill: var(--primary); opacity: 0; transition: opacity 0.2s; }
.machine .part { transition: opacity 0.4s; }
.machine .part-shell { fill: var(--raised); stroke: var(--muted); stroke-width: 1.5; }
.machine .part-fill { fill: #d9673f; transform-box: fill-box; transform-origin: 50% 100%; transform: scaleY(var(--fill, 0)); transition: transform 0.4s; }
.machine[data-state="idle"] .part { opacity: 0; }
.machine.shipped .part { opacity: 0; }
.machine .labels text { fill: var(--muted); font: 600 13px var(--body); text-anchor: middle; }
.machine .labels .sub { font: 400 11px var(--body); }

/* Station states */
.machine .st.active .housing, .machine .st.done .housing { stroke: var(--mk); }
.machine .st.done .housing { fill: color-mix(in srgb, var(--mk) 14%, var(--field)); }
.machine .st.fail .housing { stroke: #ff8a7a; }
.machine .s-plan.active .bulb circle, .machine .s-plan.done .bulb circle { fill: rgba(244, 226, 122, 0.55); stroke: #f4e27a; }
.machine .s-plan.done .ink { stroke-dashoffset: 0; }
.machine .s-plan.active .ink { animation: ink 1.6s ease-out forwards; }
.machine .s-plan.active .mote { animation: mote 2.6s ease-out var(--d, 0s) infinite; }
.machine .s-make.active .nozzle { animation: nozzle 0.9s ease-in-out infinite alternate; }
.machine .s-make.active .spark { animation: spark 0.45s steps(2) infinite; }
.machine .s-make.active .slot { stroke: var(--mk); animation: bay-dash 1s linear infinite; }
.machine .s-make.done .slot { stroke: var(--mk); stroke-dasharray: none; }
.machine .part.filling .part-fill { transition: transform var(--fill-ms, 9000ms) cubic-bezier(0.2, 0.6, 0.4, 1); }
.machine .s-check.active .beam { animation: beam 1.1s ease-in-out infinite alternate; }
.machine .s-check.active .lens-in { fill: var(--mk); }
.machine .s-ship.done .shipmark { stroke-dashoffset: 0; transition: stroke-dashoffset 0.6s ease-out 0.2s; }
.machine.retrying .loop { stroke: var(--primary); }
.machine.retrying .retry-dot { opacity: 1; }

@keyframes ink { to { stroke-dashoffset: 0; } }
@keyframes mote { 0% { opacity: 0; transform: translateY(8px) scale(calc(var(--s, 1) * 0.6)); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-58px) scale(calc(var(--s, 1) * 1.6)) rotate(45deg); } }
@keyframes nozzle { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
@keyframes spark { 50% { opacity: 1; } }
@keyframes beam { from { opacity: 0.14; transform: rotate(-12deg); } to { opacity: 0.32; transform: rotate(12deg); } }

/* Run results inside the panel */
.frame.idle { border-style: dashed; }
/* Empty concept frame: one scene holds the still life (Plan colors) and the crystal (Make colors). Idle shows the
   still life; planning lights its bulb and the white swarm circles it; rendering fades the still life while the swarm
   builds the crystal. The specks stay white throughout so they read as the same dots in every state. */
.frame-empty { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); place-content: center; justify-items: center; gap: 14px; color: var(--muted); font-size: 14px; text-align: center; padding: 16px; }
.frame-empty[hidden] { display: none; }
.frame-empty p { max-width: 30ch; }
.frame-empty p:empty { display: none; }
.scene { display: grid; width: min(460px, 94%); }
.scene > svg { grid-area: 1 / 1; width: 100%; height: auto; overflow: visible; transition: opacity 0.6s var(--ease); }
.frame-empty[data-state="idle"] .latent, .frame-empty[data-state="working"] .muse, .frame-empty[data-state="failed"] .muse { opacity: 0; }
.latent line { stroke: var(--border); stroke-opacity: 0.8; stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: 0 3.2; }
.latent line.hot { stroke: var(--mk); }
/* Nodes are invisible until their specks arrive, then fade in. Hot center, cool edge: core and inner ring in Make
   orange, outer ring graphite. */
.latent .node { fill: #20221f; stroke: var(--border); stroke-width: 1.1; opacity: var(--f, 0); }
.latent .node.inner { stroke: var(--mk); }
.latent .node.core { fill: color-mix(in srgb, var(--mk) 55%, #fff); stroke: var(--mk); }
.latent[data-state="failed"] .node { stroke: var(--border); stroke-dasharray: 2 3; opacity: 0.8; }
.muse .belt-edge { fill: none; stroke: var(--border); stroke-width: 11; stroke-linecap: round; }
.muse .belt { fill: none; stroke: #1b1c1a; stroke-width: 8; stroke-linecap: round; }
.muse .roller { fill: var(--raised); stroke: var(--border); stroke-width: 1.2; }
.muse .slot { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-dasharray: 4 4; }
.muse .line { fill: none; stroke: var(--border); stroke-width: 1.5; stroke-linecap: round; }
.muse .accent { fill: none; stroke: var(--mk); stroke-width: 1.5; stroke-linecap: round; transition: stroke 0.4s; }
.muse .glow { fill: color-mix(in srgb, var(--mk) 35%, transparent); animation: glow 3.6s ease-in-out infinite; transition: fill 0.4s; }
.muse .twinkles { transition: opacity 0.4s; }
.muse .twinkles use { fill: #e2e3e0; transform-box: fill-box; transform-origin: center; animation: twinkle 3.2s ease-in-out var(--d, 0s) infinite; }
/* Planning: the bulb lights like the Plan machine's, and the sparkles hand off to the swarm. */
.frame-empty[data-state="drifting"] .muse .accent { stroke: #f4e27a; }
.frame-empty[data-state="drifting"] .muse .glow { fill: rgba(244, 226, 122, 0.55); }
.frame-empty:not([data-state="idle"]) .muse .twinkles { opacity: 0; }
@keyframes glow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes twinkle { 0%, 100% { opacity: 0.25; scale: 0.7; } 50% { opacity: 1; scale: 1; } }
@keyframes bay-dash { to { stroke-dashoffset: -16; } }
.lab-panel > .log { padding: 12px clamp(14px, 2.4vw, 20px); border-top: 1px solid var(--divider); max-height: 320px; }
.lab-foot { display: grid; gap: 10px; padding-block: 12px 14px; border-top: 1px solid var(--divider); }
.link-btn { background: none; border: 0; padding: 4px 0; color: var(--text); font: 500 14px/1.4 var(--body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.mode-note { font-size: 13px; color: var(--muted); max-width: 70ch; }
.mode-note:empty { display: none; }
.cookie-note { margin: 0; font-size: 12px; color: var(--muted); max-width: 70ch; }
.timing summary { cursor: pointer; font-size: 13px; color: var(--muted); width: fit-content; }
.timing[open] { display: grid; gap: 12px; }

/* Step log */
.log { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; max-height: 440px; overflow: auto; font-size: 13px; }
.log li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--divider); }
.log li:first-child { border-top: 0; }
.log .sw-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--mk); align-self: center; }
.log .what { min-width: 0; }
.log .what b { font-weight: 600; }
.log .what span { color: var(--muted); display: block; overflow-wrap: anywhere; }
.log .t { color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Concept card */
.concept { display: grid; gap: 12px; }
.concept .frame { position: relative; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--field); border: 1px solid var(--divider); }
.concept .frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: filter 0.4s, opacity 0.6s; }
.concept .frame.fading img, .concept .frame.fading .pixels.on { opacity: 0; transition: opacity 0.6s; }
/* While an attempt is graded it shows as a light pixel grid; the clear render appears only if it passes. */
.concept .frame img.draft { opacity: 0; }
.concept .frame .pixels { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; opacity: 0; pointer-events: none; transition: opacity 0.5s; }
.concept .frame .pixels.on { opacity: 1; }
.concept .frame .attempt { position: absolute; left: 10px; top: 10px; }
.concept .name { margin: 0; font: 700 1.3rem/1.2 var(--heading); }
.concept .tagline { color: var(--text); }
.concept .brief { color: var(--muted); font-size: 14px; }
.concept .verdict { font-size: 14px; color: var(--muted); }
.score { display: inline-flex; align-items: center; gap: 6px; font: 600 12px/1 var(--body); padding: 5px 10px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); background: var(--raised); }
.concept .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* Waterfall */
.waterfall { display: grid; gap: 10px; }
.wf-axis, .wf-row { display: grid; grid-template-columns: 74px minmax(0, 1fr); gap: 10px; align-items: center; }
.wf-axis .ticks { position: relative; height: 16px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wf-axis .ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.wf-axis .ticks span:first-child { transform: none; }
.wf-axis .ticks span:last-child { transform: translateX(-100%); }
.wf-row .label { font-size: 13px; color: var(--muted); white-space: nowrap; }
.wf-row .track { position: relative; height: 18px; background-image: linear-gradient(to right, var(--divider) 1px, transparent 1px); background-size: 25% 100%; }
.wf-row .bar { position: absolute; top: 4px; height: 10px; min-width: 4px; border-radius: 4px; background: var(--mk); cursor: default; }
.wf-row .bar::after { content: ""; position: absolute; inset: -6px -2px; }
.wf-row .bar.running { animation: grow-pulse 1s ease-in-out infinite; }
@keyframes grow-pulse { 50% { opacity: 0.55; } }
.wf-row .ms { position: absolute; top: 0; font-size: 11px; line-height: 18px; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; padding-left: 6px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--mk); }
.tip {
  position: fixed; z-index: 50; pointer-events: none; max-width: 260px;
  background: var(--raised); border: 1px solid var(--border); border-radius: 8px;
  padding: 8px 10px; font-size: 12px; color: var(--text); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
.tip b { display: block; font-size: 13px; }
.tip span { color: var(--muted); display: block; }
.table-view { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.table-view th, .table-view td { text-align: left; padding: 6px 8px; border-top: 1px solid var(--divider); }
.table-view th { color: var(--muted); font-weight: 600; }
.run-note { font-size: 12px; color: var(--muted); }

/* Dialogs */
dialog.lab-dialog {
  width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0;
  background: var(--canvas); color: var(--text); border: 1px solid var(--border); border-radius: 12px;
}
dialog.lab-dialog::backdrop { background: rgba(8, 9, 8, 0.75); backdrop-filter: blur(4px); }
.dialog-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: var(--header); border-bottom: 1px solid var(--divider); }
.dialog-head h3 { font-size: 16px; }
.dialog-body { padding: 16px; display: grid; gap: 16px; }
.card-detail { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 16px; align-items: start; }
.card-detail img { width: 100%; aspect-ratio: 1; object-fit: cover; height: auto; border-radius: 8px; display: block; border: 1px solid var(--divider); }
.dialog-body .ghost { border-color: var(--border); }
.lab-gallery { display: grid; gap: 10px; justify-items: start; }
.lab-gallery-head { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--muted); max-width: none; }
.lab-gallery-head span:first-child { color: var(--text); font-weight: 600; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; width: 100%; }
.gallery-grid button { padding: 0; border: 1px solid var(--divider); border-radius: 10px; overflow: hidden; background: var(--surface); color: var(--text); cursor: pointer; text-align: left; display: grid; }
.gallery-grid button:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-grid span { padding: 6px 8px; font: 600 12px/1.3 var(--body); }
.gallery-status { min-height: 1.5em; font-size: 13px; color: var(--muted); text-align: center; }
/* Concept preview: a Gallery button beside Close, and arrows just outside the dialog's sides (over its edges on narrow screens). */
.dialog-actions { display: flex; gap: 8px; }
.card-nav { position: fixed; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--border); background: var(--header); color: var(--text); cursor: pointer; }
.card-nav[hidden] { display: none; }
.card-nav.prev { left: max(8px, calc(50vw - min(480px, 50vw - 16px) - 56px)); }
.card-nav.next { right: max(8px, calc(50vw - min(480px, 50vw - 16px) - 56px)); }
.card-nav:hover:not(:disabled) { border-color: var(--text); }
.card-nav:disabled { opacity: 0.35; cursor: default; }
.card-nav:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

@media (max-width: 860px) {
  .stage, .card-detail { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .agent-bar { flex-wrap: wrap; }
  .agent-stats { width: 100%; }
  .agent-stats div { text-align: left; }
  .prompt { flex-wrap: wrap; }
  .prompt textarea { flex-basis: 100%; }
  .prompt .count { margin-right: auto; }
}
@media (max-width: 520px) {
  .wf-axis, .wf-row { grid-template-columns: 56px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .muse .twinkles use, .muse .glow, .concept .frame .pixels,
  .wf-row .bar.running,
  .machine .st.active * { animation: none !important; }
  .machine .part, .machine .needle, .machine .part-fill { transition: none !important; }
  .machine .s-plan.active .ink { stroke-dashoffset: 0; }
  .machine .s-check.active .beam { opacity: 0.22; }
}

/* Card dialog sections */
.panel-card { background: var(--surface); border: 1px solid var(--divider); border-radius: 10px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.panel-card > h4 { margin: 0; font: 600 12px/1.4 var(--body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
