/* Hallmark · theme: Sapphire engineering (requested) · shape: linked technical scenes · signature: live graph transformation and exploded integration stack · genre: modern-minimal */
/* Hallmark · pre-emit critique: P4 H4 E5 S4 R4 V4 · preserve readable labels while the internal geometry explains the selected workflow. */
:root {
  --ws-surface: #f6f9ff;
  --ws-panel: #4c82ff;
  --ws-panel-deep: #f0f5ff;
  --ws-panel-front: #3268ed;
  --ws-panel-side: #1645b8;
  --ws-grid: #b9d0ff;
  --ws-edge: #2862e8;
  --ws-sapphire: #215bef;
  --ws-blue: #1645b8;
  --ws-text: #123ea8;
  --ws-silver: #2150c6;
  --ws-quiet: #2862e8;
  --ws-paper: #fbfdff;
  --ws-ink: #123ea8;
  --ws-focus: #215bef;
  --ws-clear: transparent;
  --ws-font: var(--font-body, sans-serif);
  --ws-radius: 12px;
}
.ws-scene { position: relative; margin: 44px 0 0; padding: 32px; border: 1px solid var(--ws-grid); border-radius: var(--ws-radius); background: var(--ws-surface); color: var(--ws-text); font-family: var(--ws-font); isolation: isolate; }
.ws-scene * { box-sizing: border-box; }
.ws-heading { display: flex; align-items: start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.ws-heading > div { min-width: 0; }
.ws-heading h3 { margin: 0; color: var(--ws-text); font-size: clamp(22px,2.3vw,30px); line-height: 1.4; font-weight: 600; letter-spacing: -.025em; overflow-wrap: break-word; min-width: 0; }
.ws-heading p { margin: 12px 0 0; color: var(--ws-silver); font-size: 14px; line-height: 1.8; max-width: 45em; }
.ws-compiler-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 28px; }
.ws-pane { min-width: 0; }
.ws-pane + .ws-pane { border-left: 1px solid var(--ws-grid); padding-left: 28px; }
.ws-pane h4 { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 0 0 8px; color: var(--ws-text); font-size: 16px; font-weight: 500; line-height: 1.6; }
.ws-pane h4 span { color: var(--ws-silver); font-size: 12px; font-weight: 400; }
.ws-svg { display: block; width: 100%; height: auto; overflow: visible; }
.ws-webgl { position: relative; min-width: 0; aspect-ratio:3 / 2; border-radius: 8px; background: var(--ws-paper); outline-offset: 5px; touch-action: pan-y; }
.ws-assembly-scene .ws-webgl { aspect-ratio:31 / 22; }
.ws-webgl:focus-visible { outline: 3px solid var(--ws-focus); }
.ws-webgl > .ws-fallback { opacity: 1; }
.ws-webgl.ws-three-ready > .ws-fallback { opacity: 0; }
.ws-three-canvas, .ws-three-labels { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.ws-three-canvas { border-radius: inherit; pointer-events: none; }
.ws-three-labels { pointer-events: none; overflow: clip; }
.ws-three-label { position: absolute; left: 0; top: 0; padding: 4px 8px; border: 1px solid var(--ws-grid); border-radius: 4px; background: var(--ws-paper); color: var(--ws-ink); white-space: nowrap; font-size: 12px; line-height: 1.4; will-change: transform; }
.ws-three-label[data-active="true"] { border-color: var(--ws-sapphire); color: var(--ws-blue); }
.ws-three-label[data-role="oem"] { border-style: dashed; color: var(--ws-silver); background: var(--ws-surface); }
.ws-view-hint { margin: 8px 0 0; color: var(--ws-silver); font-size: 12px; line-height: 1.7; }
.ws-svg text { fill: var(--ws-text); font-family: var(--ws-font); font-size: 20px; font-weight: 500; text-anchor: middle; dominant-baseline: middle; }
.ws-svg .ws-svg-small { font-size: 16px; font-weight: 400; fill: var(--ws-silver); }
.ws-svg .ws-svg-label { font-size: 18px; text-anchor: start; fill: var(--ws-silver); }
.ws-svg .ws-node-surface { fill: var(--ws-sapphire); stroke: var(--ws-edge); stroke-width: 1.5; }
.ws-svg .ws-node-accent { fill: var(--ws-blue); stroke: var(--ws-sapphire); stroke-width: 1.5; }
.ws-svg .ws-node-surface + text, .ws-svg .ws-node-accent + text { fill: var(--ws-paper); }
.ws-svg .ws-node-outline { fill: var(--ws-clear); stroke: var(--ws-sapphire); stroke-width: 1; stroke-dasharray: 5 7; opacity: .6; }
.ws-svg .ws-route { fill: none; stroke: var(--ws-edge); stroke-width: 2; }
.ws-svg .ws-route-return { fill: none; stroke: var(--ws-quiet); stroke-width: 1.5; stroke-dasharray: 5 6; }
.ws-svg .ws-packet { fill: var(--ws-sapphire); stroke: var(--ws-surface); stroke-width: 2; }
.ws-svg .ws-packet-blue { fill: var(--ws-blue); }
.ws-svg .ws-schedule-track { fill: var(--ws-panel-deep); stroke: var(--ws-grid); stroke-width: 1; }
.ws-svg .ws-instruction { fill: var(--ws-sapphire); stroke: var(--ws-edge); stroke-width: 1; }
.ws-svg .ws-instruction-secondary { fill: var(--ws-blue); }
.ws-svg .ws-instruction-muted { fill: var(--ws-edge); }
.ws-svg .ws-instruction-detail { stroke: var(--ws-surface); stroke-width: 2; opacity: .7; }
.ws-svg .ws-schedule-cursor { fill: var(--ws-clear); stroke: var(--ws-sapphire); stroke-width: 1.5; opacity: .75; }
.ws-status { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--ws-grid); }
.ws-status strong { color: var(--ws-sapphire); font-size: 14px; font-weight: 500; }
.ws-status p { margin: 0; color: var(--ws-silver); font-size: 13px; line-height: 1.8; }
.ws-scene figcaption { margin-top: 20px; color: var(--ws-silver); font-size: 12px; line-height: 1.8; max-width: 76em; }
.ws-assembly-grid { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(0,.75fr); align-items: center; gap: 36px; }
.ws-assembly-copy { border-left: 1px solid var(--ws-grid); padding-left: 28px; min-width: 0; }
.ws-assembly-copy h4 { margin: 0 0 12px; color: var(--ws-sapphire); font-size: 21px; line-height: 1.5; font-weight: 600; }
.ws-assembly-copy > p { margin: 0 0 24px; color: var(--ws-silver); font-size: 14px; line-height: 1.85; }
.ws-layer-key { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.ws-layer-key li { display: grid; grid-template-columns: 32px minmax(0,1fr); gap: 12px; align-items: baseline; padding-top: 16px; border-top: 1px solid var(--ws-grid); }
.ws-layer-key li > span { color: var(--ws-quiet); font-size: 13px; }
.ws-layer-key strong { display: block; color: var(--ws-text); font-size: 15px; font-weight: 500; }
.ws-layer-key small { display: block; margin-top: 4px; color: var(--ws-silver); font-size: 12px; line-height: 1.7; }
.ws-layer-key li[data-current="true"] > span, .ws-layer-key li[data-current="true"] strong { color: var(--ws-sapphire); }
.ws-svg .ws-layer-top { fill: var(--ws-panel); stroke: var(--ws-edge); stroke-width: 1.5; }
.ws-svg .ws-layer-front { fill: var(--ws-panel-front); stroke: var(--ws-edge); stroke-width: 1; }
.ws-svg .ws-layer-side { fill: var(--ws-panel-side); stroke: var(--ws-edge); stroke-width: 1; }
.ws-svg .ws-layer-lines { fill: none; stroke: var(--ws-grid); stroke-width: 1; }
.ws-svg .ws-layer-die { fill: var(--ws-panel-front); stroke: var(--ws-sapphire); stroke-width: 1.5; }
.ws-svg .ws-die-tile { fill: var(--ws-sapphire); opacity: .38; }
.ws-svg .ws-die-tile-blue { fill: var(--ws-blue); opacity: .42; }
.ws-svg .ws-layer-contact { fill: var(--ws-blue); opacity: .8; }
.ws-svg .ws-module-chip { fill: var(--ws-panel-deep); stroke: var(--ws-edge); stroke-width: 1; }
.ws-svg .ws-integration-route { fill: none; stroke: var(--ws-sapphire); stroke-width: 1.5; stroke-dasharray: 5 7; opacity: .6; }
.ws-svg .ws-system-port { fill: var(--ws-surface); stroke: var(--ws-edge); stroke-width: 1; }
.ws-svg .ws-layer-annotation { fill: var(--ws-sapphire); font-size: 22px; }
.ws-svg .ws-oem-boundary { fill: none; stroke: var(--ws-edge); stroke-width: 1.5; stroke-dasharray: 7 6; }
.ws-svg .ws-d100-pe { fill: var(--ws-paper); stroke: var(--ws-sapphire); stroke-width: .7; }
.ws-svg .ws-d100-memory { fill: var(--ws-panel-side); stroke: var(--ws-blue); stroke-width: .9; }
.eng-gates .eng-gate-static { border-bottom: 1px solid var(--studio-line); }
.eng-gates .eng-gate-header { display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: baseline; gap: var(--space-md); padding-block: var(--space-lg); }
.eng-gates .eng-gate-header > span { color: var(--ws-sapphire); font-size: 13px; }
.eng-gates .eng-gate-header h3 { font-size: 21px; }
@media (max-width: 800px) {
  .ws-scene { padding: 24px; }
  .ws-compiler-grid, .ws-assembly-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .ws-pane + .ws-pane { border-left: 0; border-top: 1px solid var(--ws-grid); padding-left: 0; padding-top: 24px; }
  .ws-assembly-copy { border-left: 0; border-top: 1px solid var(--ws-grid); padding-left: 0; padding-top: 24px; }
  .ws-assembly-grid > .ws-svg { max-width: 600px; margin-inline: auto; }
}
@media (max-width: 560px) {
  .ws-scene { margin-top: 32px; padding: 20px 16px; }
  .ws-heading { flex-direction: column; gap: 16px; margin-bottom: 20px; }
  .ws-heading p { font-size: 14px; }
  .ws-pane h4 { font-size: 15px; }
  .ws-pane h4 span { font-size: 12px; }
  .ws-status { gap: 8px; }
  .ws-assembly-copy h4 { font-size: 20px; }
  .eng-gates .eng-gate-header { grid-template-columns: 28px minmax(0,1fr); gap: var(--space-sm); padding-block: var(--space-20); }
  .eng-gates .eng-gate-header h3 { font-size: 19px; }
}
@media (prefers-reduced-motion: reduce) {
  .ws-three-label { will-change: auto; }
}
