#pf-research-motion { width: 100%; background: transparent; color: var(--foreground); letter-spacing: 0; }
#pf-research-motion .pf-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
#pf-research-motion h2 { margin: 0 0 4px; }
#pf-research-motion .pf-disclosure { text-align: right; flex-shrink: 0; }
#pf-mode { color: var(--viz-series-3); }
#pf-research-motion[data-origin="human"] #pf-mode { color: var(--viz-series-2); }
#pf-research-motion .pf-progress { width: 70px; height: 2px; margin-left: auto; background: var(--border); align-self:center; }
#pf-research-motion .pf-progress b { display: block; height: 100%; background: var(--viz-series-3); transition: width .3s ease; }
#pf-research-motion .pf-agent { transition: opacity .2s ease; }
#pf-research-motion .pf-agent-active { filter: drop-shadow(0 0 5px var(--viz-series-3)); }
#pf-research-motion .pf-node-enter { animation: pf-arrive .45s ease-out both; transform-box: fill-box; transform-origin:center; }
@keyframes pf-arrive { from { opacity:0; transform:scale(.65); } to { opacity:1; transform:scale(1); } }
@media(prefers-reduced-motion:reduce) { #pf-research-motion * { animation:none!important; transition:none!important; } }
#pf-research-motion .pf-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
#pf-research-motion .pf-toolbar > label { max-width: 60%; }
#pf-research-motion .pf-stage { display: flex; align-items: baseline; gap: 12px; margin-top: 10px; min-height: 34px; }
#pf-research-motion #pf-step-number { color: var(--muted-foreground); white-space: nowrap; }
#pf-research-motion #pf-step-title { font-weight: 500; }
#pf-research-motion #pf-diagram-wrap { width: 100%; }
#pf-research-motion #pf-diagram { display: block; width: 100%; overflow: visible; }
#pf-research-motion .pf-label { fill: var(--foreground); font-weight: 500; }
#pf-research-motion .pf-secondary { fill: var(--muted-foreground); }
#pf-research-motion [data-record] text { paint-order: stroke; stroke: var(--background); stroke-width: 4px; stroke-linejoin: round; }
#pf-research-motion .pf-relation { fill: var(--muted-foreground); paint-order: stroke; stroke: var(--background); stroke-width: 5px; stroke-linejoin: round; }
#pf-research-motion .pf-edge { fill: none; stroke: var(--border); stroke-width: 1.5; }
#pf-research-motion .pf-edge-negative { stroke: var(--viz-series-4); }
#pf-research-motion .pf-edge-positive { stroke: var(--viz-series-3); }
#pf-research-motion .pf-focus { fill: none; stroke: var(--viz-series-1); stroke-width: 1; }
#pf-research-motion .pf-celebration-title { font-size: 32px; font-weight: 500; fill: var(--foreground); }
#pf-research-motion[data-event="9"] #pf-step-title { color: var(--viz-series-2); }
#pf-research-motion[data-event="9"] [data-layer="references"] .pf-edge:not(.pf-edge-negative):not([data-source="alternative"]) { stroke: var(--viz-series-3); stroke-width: 2; }
#pf-research-motion .pf-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 10px 0; }
#pf-research-motion .pf-legend > span { display: inline-flex; align-items: center; gap: 8px; }
#pf-research-motion .pf-swatch { width: 9px; height: 9px; display: inline-block; background: var(--viz-series-1); }
#pf-research-motion .pf-record { transform: rotate(45deg); }
#pf-research-motion .pf-negative { background: var(--viz-series-4); }
#pf-research-motion .pf-packet { background: var(--foreground); border-radius: 50%; }
#pf-research-motion .pf-timeline { display: block; margin-top: 10px; }
#pf-research-motion .pf-detail { max-width: 440px; padding: 10px 0; overflow-wrap: anywhere; }
#pf-research-motion .pf-boundary { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; }
#pf-research-motion .pf-boundary { border-top:1px solid var(--border); padding-top:14px; color:var(--muted-foreground); align-items:baseline; }
#pf-research-motion .pf-boundary .pf-toolbar { margin-top:16px; }
#pf-research-motion #pf-intake-status { color: var(--viz-series-3); }
#pf-research-motion[data-event="9"] #pf-intake-status { color: var(--viz-series-2); }
#pf-research-motion .pf-boundary details { text-align: right; }
#pf-research-motion .pf-boundary details[open] { flex:1 0 100%; min-width:0; max-width:100%; text-align:left; }
#pf-research-motion .pf-boundary details[open] .pf-toolbar { flex-wrap:wrap; }
#pf-research-motion .pf-boundary details[open] .pf-detail { max-width:100%; }
#pf-research-motion .pf-boundary summary { cursor: pointer; color: var(--muted-foreground); }
#pf-research-motion .pf-boundary > span { display: flex; align-items: center; gap: 7px; }
#pf-research-motion strong { font-weight: 500; }
@media(max-width: 430px) {
  #pf-research-motion .pf-heading { gap: 10px; }
  #pf-research-motion .pf-toolbar { flex-wrap: wrap; }
  #pf-research-motion .pf-toolbar > label { max-width: 100%; }
  #pf-research-motion .pf-stage { min-height: 34px; }
  #pf-research-motion .pf-heading { align-items:start; flex-direction:column; gap:3px; }
  #pf-research-motion .pf-boundary { gap:10px; }
  #pf-research-motion .pf-boundary details { margin-left:auto; }
}

/* Scoped illustration styling; actual graph and evidence styles stay separate. */
#pf-research-motion {
  --background:#08090a; --foreground:#f7f8f8; --muted-foreground:#a4a8b0;
  --border:#34343a; --viz-series-1:#7170ff; --viz-series-2:#f0bf00;
  --viz-series-3:#45c5cf; --viz-series-4:#eb7373;
  font-size:13px; line-height:1.45; font-family:inherit; padding:12px 0;
}
#pf-research-motion h2 {font-size:20px;line-height:1.3;}
#pf-research-motion .text-small {font-size:12px;}
#pf-research-motion .pf-label {font-size:13px;}
#pf-research-motion .pf-celebration-title {font-size:32px;}
#pf-research-motion .pf-stage {margin-top:16px;}
#pf-research-motion .viz-row {display:flex;gap:8px;}
#pf-research-motion .btn {width:34px;height:34px;padding:7px;display:grid;place-items:center;}
#pf-research-motion [data-icon] svg {width:18px;height:18px;}
#pf-research-motion .form-select {max-width:100%;padding:7px;color:var(--foreground);background:#242529;border:1px solid var(--border);border-radius:5px;}
#pf-research-motion .form-range {width:100%;accent-color:var(--viz-series-3);}
#pf-research-motion button:focus-visible,
#pf-research-motion summary:focus-visible,
#pf-research-motion select:focus-visible,
#pf-research-motion input:focus-visible {outline:2px solid var(--viz-series-3);outline-offset:3px;}
#pf-research-motion [data-tooltip] {position:relative;}
#pf-research-motion [data-tooltip]:is(:hover,:focus-visible)::after {content:attr(data-tooltip);position:absolute;bottom:calc(100% + 8px);right:0;padding:4px 8px;white-space:nowrap;background:#242529;color:#f7f8f8;border-radius:4px;font-size:12px;z-index:1;}
.hero-graph.is-empty {height:auto;min-height:0;aspect-ratio:auto;padding-top:0;}
.hero-graph.is-empty .workflow-preview {position:relative;inset:auto;}
.hero-graph.is-empty .workflow-map {flex:none;margin:0;}
.hero-graph.is-empty .graph-scene-heading, .workflow-label {display:none;}
.graph-hero {padding-top:32px;}
.hero-copy h1 {font-size:44px;line-height:1.08;}
.hero-kicker {margin-bottom:12px;}
.hero-kicker #campaign-slug {display:none;}
.hero-lede .hero-summary {font-size:18px;line-height:1.45;}
.graph-hero.is-empty .hero-actions {display:none;}
@media(max-width:600px) {.hero-copy h1 {font-size:36px;}}
