/* A task travels through the system; human review is the authored stopping point. */
.workbench.system-scene { padding: clamp(88px, 8vw, 132px) 0 64px; background: var(--ink); color: var(--on-dark); position: relative; overflow: clip; }
.system-scene-heading { display: grid; grid-template-columns: 1.1fr 1fr; align-items: end; gap: 60px; margin-bottom: 54px; }
.system-scene-heading h2 { font-size: clamp(40px, 5vw, 70px); line-height: 1.16; letter-spacing: -.04em; font-weight: 750; }
.system-scene-heading h2 span { color: var(--on-dark-muted); }
.system-scene-heading > p { max-width: 33em; font-size: 16px; line-height: 1.9; color: var(--on-dark-muted); padding-bottom: 6px; }
.system-scene-heading > p strong { display: block; color: var(--on-dark); font-weight: 600; margin-top: 12px; }
.system-demo { position: relative; border: 1px solid var(--dark-line); border-radius: var(--radius); background: var(--dark-panel); isolation: isolate; }
.system-demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 27px 32px; border-bottom: 1px solid var(--dark-line); }
.system-demo-bar h3 { font-size: 21px; line-height: 1.5; font-weight: 650; letter-spacing: -.025em; }
.system-demo-bar p { font-size: 11px; color: var(--on-dark-muted); margin-top: 5px; }
.system-demo-controls { display: flex; align-items: center; gap: 15px; flex: none; }
.system-demo-controls button { min-height: 44px; font-size: 12px; white-space: nowrap; }
.system-demo-controls .system-play { display: inline-flex; align-items: center; gap: 10px; padding: 11px 17px; color: var(--on-dark); background: var(--signal-cobalt); border-radius: var(--radius-pill); border: 1px solid var(--signal-cobalt); transition: background .2s, color .2s; }
.system-demo-controls .system-play:hover { background: var(--on-dark); color: var(--ink); border-color: var(--on-dark); }
.system-play .ic { width: 15px; height: 15px; }
.system-reset { color: var(--on-dark-muted); padding: 10px 5px; border-bottom: 1px solid transparent; }
.system-reset:hover { color: var(--on-dark); border-color: var(--on-dark-muted); }
.system-scene :focus-visible { outline-color: var(--on-dark); }
.system-stage { height: 660px; position: relative; margin: 30px 28px 18px; perspective: 1100px; }
.system-stage-floor { position: absolute; inset: 12% 1% 9%; transform: rotateX(44deg) rotateZ(-9deg); transform-origin: center; border: 1px solid var(--dark-line); border-radius: 50%; pointer-events: none; opacity: .5; }
.system-stage-floor span { position: absolute; inset: 13%; border: 1px solid var(--dark-line); border-radius: 50%; }
.system-stage-floor span:nth-child(2) { inset: 27%; }
.system-stage-floor span:nth-child(3) { inset: 42%; }
.system-stage-floor span:nth-child(4) { inset: 0; transform: rotate(90deg); border-radius: 0; border-width: 0 1px; }
.system-paths { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; overflow: visible; pointer-events: none; }
.system-route-bases path { fill: none; stroke: var(--on-dark-muted); stroke-width: 1.8; stroke-linecap: round; opacity: .72; }
.system-route-trails path { fill: none; stroke: var(--on-dark); stroke-width: 2.4; stroke-linecap: round; opacity: 0; }
.system-station { position: absolute; z-index: 2; padding: 20px 21px; border: 1px solid var(--dark-line); border-radius: var(--radius); background: var(--ink); transition: border-color .25s, background .25s; }
.system-station.is-current { border-color: var(--on-dark-muted); }
.system-station.is-complete { border-color: var(--dark-line); }
.system-station-select { display: block; text-align: left; width: 100%; padding: 0; position: relative; min-height: 72px; }
.system-station-select:disabled { opacity: 1; }
.system-station-title { display: block; font-size: 19px; letter-spacing: -.025em; font-weight: 650; line-height: 1.4; margin-top: 8px; }
.system-step { display: block; color: var(--on-dark-muted); font-family: var(--font-mono); font-size: 9px; letter-spacing: .08em; font-weight: 400; }
.system-station-state { display: inline-block; font-size: 10px; color: var(--on-dark-muted); margin-top: 8px; font-weight: 400; }
.system-station-select[aria-pressed="true"] .system-station-state { color: var(--on-dark); }
.system-station > p { font-size: 11px; line-height: 1.85; color: var(--on-dark-muted); margin-top: 14px; }
.system-project-links { display: flex; flex-wrap: wrap; gap: 5px 13px; margin-top: 15px; }
.system-project-links a { font-size: 10px; line-height: 1.8; color: var(--on-dark-muted); border-bottom: 1px solid var(--dark-line); padding-bottom: 1px; }
.system-project-links a:hover { color: var(--on-dark); border-color: var(--on-dark); }
.system-input { width: 24%; left: 0; top: 29%; transform: rotate(-2deg); }
.system-knowledge { width: 29%; left: 29%; top: 0; transform: rotate(1deg); }
.system-artifact { width: 29%; left: 30%; bottom: 0; transform: rotate(-1deg); }
.system-human { width: 32%; right: 0; top: 2%; background: var(--signal-cobalt); border-color: var(--signal-cobalt); }
.system-human.is-current { border-color: var(--on-dark); }
.system-human .system-step, .system-human .system-station-state, .system-human .system-project-links a { color: var(--on-dark); }
.system-human .system-project-links a { border-color: color-mix(in srgb, var(--on-dark) 45%, transparent); }
.system-archive { width: 27%; right: 0; bottom: 8%; padding: 20px 23px; border-style: dashed; background: var(--dark-panel); }
.system-archive .system-station-title { font-size: 20px; }
.system-anchor { position: absolute; width: 8px; height: 8px; border-radius: 50%; border: 1px solid var(--on-dark-muted); background: var(--dark-panel); left: 50%; top: 100%; transform: translate(-50%, -50%); }
.system-input .system-anchor { top: 30%; left: 100%; }
.system-knowledge .system-anchor { top: 100%; }
.system-artifact .system-anchor { top: 8%; left: 100%; }
.system-human .system-anchor { top: 100%; background: var(--on-dark); border-color: var(--on-dark); }
.system-archive .system-anchor { top: 0; }
.system-station.is-current .system-anchor { background: var(--on-dark); }
.system-input-stack { height: 72px; position: relative; margin-top: 10px; }
.system-input-stack span { position: absolute; inset: 0 14px 24px 0; padding: 12px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-control); font-size: 10px; font-weight: 600; transform: rotate(-3deg); }
.system-input-stack span:nth-child(2) { inset: 12px 7px 12px 7px; transform: rotate(2deg); background: var(--signal-soft); }
.system-input-stack span:nth-child(3) { inset: 24px 0 0 14px; transform: rotate(-1deg); background: var(--paper); }
.system-source-lines { margin-top: 13px; display: grid; gap: 5px; }
.system-source-lines > span { display: flex; align-items: center; gap: 7px; padding: 5px 0; font-size: 10px; color: var(--on-dark); border-bottom: 1px solid var(--dark-line); }
.system-source-lines > span > span { color: var(--on-dark-muted); margin-left: auto; font-size: 9px; }
.system-source-lines i { height: 4px; width: 4px; border-radius: 50%; background: var(--on-dark-muted); flex: none; }
.system-report { position: relative; height: 126px; margin: 18px 2px 0; transform-style: preserve-3d; }
.system-report-page { position: relative; z-index: 2; color: var(--ink); background: var(--paper); padding: 12px 14px; min-height: 119px; border-radius: var(--radius-control); transform: rotate(-2deg); }
.system-report-page > span { font-size: 8px; color: var(--muted); }
.system-report-page strong { display: block; font-size: 12px; font-weight: 650; margin: 2px 0 7px; }
.system-report-page i { display: block; height: 3px; width: 85%; margin-top: 5px; background: var(--line); }
.system-report-page i:nth-last-of-type(1) { width: 64%; }
.system-report-page small { display: block; color: var(--muted); font-size: 8px; margin-top: 9px; }
.system-report-back { position: absolute; inset: 0 0 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-control); transform: rotate(4deg) translate(4px, 4px); }
.system-human-line { display: flex; align-items: center; gap: 12px; margin-top: 13px; }
.system-human-line img { width: 63px; height: 63px; object-fit: contain; flex: none; }
.system-human-line p { font-size: 10px; color: var(--on-dark); line-height: 1.85; }
.system-human-line strong { font-weight: 650; }
.system-confirm-card { padding: 15px 0 0; margin-top: 14px; border-top: 1px solid color-mix(in srgb, var(--on-dark) 35%, transparent); }
.system-confirm-card > span { color: var(--on-dark); font-size: 12px; font-weight: 650; }
.system-confirm-card p { font-size: 11px; color: var(--on-dark); margin-top: 5px; line-height: 1.85; }
.system-confirm-card button { display: flex; align-items: center; justify-content: space-between; gap: 8px; background: var(--paper); color: var(--ink); min-height: 44px; padding: 10px 12px; border-radius: var(--radius-control); width: 100%; font-size: 11px; font-weight: 600; margin-top: 14px; transition: background .2s; }
.system-confirm-card button:hover { background: var(--surface); }
.system-confirm-card button .ic { width: 14px; height: 14px; }
.system-archive-link { display: inline-flex; align-items: center; gap: 7px; font-size: 10px; margin-top: 20px; color: var(--on-dark); }
.system-task-packet { position: absolute; top: 0; left: 0; z-index: 5; width: 114px; padding: 9px 12px; pointer-events: none; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-control); box-shadow: 0 10px 25px color-mix(in srgb, var(--ink) 30%, transparent); transform-origin: center; }
.system-task-packet span { display: block; font-size: 8px; color: var(--muted); }
.system-task-packet b { font-size: 10px; font-weight: 650; display: block; margin-top: 3px; }
.system-demo-state { display: flex; align-items: baseline; justify-content: space-between; gap: 22px; padding: 20px 32px; border-top: 1px solid var(--dark-line); min-height: 74px; }
.system-demo-state > p { font-size: 11px; color: var(--on-dark); max-width: 65em; }
.system-demo-state > span { font-family: var(--font-mono); font-size: 9px; flex: none; color: var(--on-dark-muted); }
.system-scene-footer { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding-top: 31px; }
.system-scene-footer > p { font-size: 11px; color: var(--on-dark); line-height: 1.9; }
.system-scene-footer > p span { color: var(--on-dark-muted); }
.system-scene-footer > a { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark); font-size: 11px; padding-bottom: 4px; border-bottom: 1px solid var(--dark-line); white-space: nowrap; }
.system-scene-footer > a:hover { border-color: var(--on-dark); }
.system-scene.is-playing .system-task-packet { will-change: transform; }

@media (max-width: 1100px) and (min-width: 761px) {
  .system-stage { height: 720px; margin-left: 18px; margin-right: 18px; }
  .system-station { padding: 16px; }
  .system-station-title { font-size: 17px; }
  .system-input { width: 25%; top: 32%; }
  .system-knowledge { width: 32%; left: 27%; }
  .system-artifact { width: 34%; left: 27%; }
  .system-human { width: 34%; }
  .system-archive { width: 31%; bottom: 5%; }
  .system-human-line { gap: 6px; }
  .system-human-line img { width: 50px; height: 50px; }
  .system-demo-bar { padding: 22px; }
}

@media (max-width: 760px) {
  .workbench.system-scene { padding: 72px 0 44px; }
  .system-scene-heading { grid-template-columns: 1fr; gap: 23px; margin-bottom: 32px; }
  .system-scene-heading h2 { font-size: clamp(37px, 7.8vw, 55px); }
  .system-scene-heading > p { font-size: 13px; }
  .system-scene-heading > p strong { margin-top: 4px; }
  .system-demo-bar { display: block; padding: 23px 20px; }
  .system-demo-bar h3 { font-size: 20px; }
  .system-demo-bar p { font-size: 10px; max-width: 29em; }
  .system-demo-controls { margin-top: 18px; }
  .system-stage { height: auto; margin: 25px 20px 27px; padding-left: 21px; display: grid; gap: 25px; }
  .system-stage::before { content: ""; position: absolute; top: 24px; bottom: 24px; left: 0; width: 1px; background: var(--dark-line); }
  .system-stage-floor, .system-paths { display: none; }
  .system-station { position: relative; width: 100%; left: auto; right: auto; top: auto; bottom: auto; transform: none; padding: 20px; }
  .system-station-select { min-height: 0; }
  .system-station-title { font-size: 20px; }
  .system-station > p { font-size: 12px; }
  .system-project-links { margin-top: 13px; }
  .system-project-links a { font-size: 11px; }
  .system-station .system-anchor { top: 30px; left: -21px; width: 7px; height: 7px; }
  .system-input-stack { width: 70%; margin-top: 18px; }
  .system-source-lines { max-width: 27em; margin-top: 18px; }
  .system-source-lines > span { font-size: 11px; }
  .system-report { max-width: 245px; margin-top: 20px; }
  .system-human-line { margin-top: 18px; gap: 14px; }
  .system-human-line img { width: 69px; height: 69px; }
  .system-human-line p, .system-confirm-card p { font-size: 12px; }
  .system-confirm-card { margin-top: 20px; padding-top: 18px; }
  .system-confirm-card button { max-width: 300px; }
  .system-archive-link { font-size: 11px; }
  .system-task-packet { display: none; }
  .system-demo-state { display: block; padding: 21px 20px; }
  .system-demo-state > p { font-size: 11px; }
  .system-demo-state > span { display: block; margin-top: 8px; }
  .system-scene-footer { display: block; padding-top: 27px; }
  .system-scene-footer > a { margin-top: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .system-scene *, .system-scene *::before, .system-scene *::after { transition: none !important; }
  .system-stage-floor { transform: none; }
  .system-input, .system-knowledge, .system-artifact { transform: none; }
}
html.noanim .system-scene *, html.noanim .system-scene *::before, html.noanim .system-scene *::after { transition: none !important; }

@media print {
  .system-demo-controls, .system-task-packet, .system-paths, .system-stage-floor, .system-anchor, .system-confirm-card button { display: none !important; }
  .system-stage { height: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .system-station { position: relative; width: auto; inset: auto; transform: none; break-inside: avoid; }
}
