.hflow-section { padding:28px 0 20px; color:var(--ink); background:var(--paper); }
.hflow-container { max-width:1200px; margin:0 auto; padding:0 clamp(18px,4vw,48px); }
.flow-heading { display:flex; justify-content:space-between; align-items:end; gap:18px; margin-bottom:26px; }
.flow-section-label { margin:0 0 9px; color:var(--muted); font-size:14px; }
.flow-heading h2 { margin:0; font-size:clamp(27px,3.2vw,40px); line-height:1.2; font-weight:500; letter-spacing:-.025em; }
.flow-play { flex:none; min-width:70px; min-height:44px; padding:8px 16px; border:1px solid var(--hair); border-radius:24px; font-size:13px; }
.flow-play:hover { border-color:var(--cobalt); color:var(--cobalt); }
.flow-brief { margin:0; padding:18px 0; border-top:1px solid var(--hair); font-size:17px; }
.flow-brief span { color:var(--cobalt); padding-right:8px; }
.flow-steps { display:flex; gap:24px; margin-bottom:18px; }
.flow-steps button { min-height:44px; border-bottom:2px solid transparent; color:var(--muted); font-size:14px; }
.flow-steps button span { margin-right:8px; font-size:11px; }
.flow-steps button[aria-pressed=true] { color:var(--cobalt); border-color:var(--cobalt); }
.flow-lanes { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid var(--hair); border-radius:10px; overflow:hidden; }
.flow-lane { padding:24px 28px; min-width:0; }
.flow-lane h3 { margin:0 0 18px; font-weight:500; font-size:18px; line-height:1.5; }
.flow-harness { background:#edf1ff; border-left:1px solid var(--hair); }
.flow-harness h3 { color:var(--cobalt); }
.flow-chat-legend,.flow-plan-label { display:flex; align-items:center; gap:8px; min-height:24px; margin-bottom:12px; font-size:11px; color:var(--muted); }
.flow-chat-legend svg { width:26px; height:16px; fill:none; stroke:currentColor; stroke-width:1.2; }
.flow-plan-label svg { width:14px; height:14px; fill:none; stroke:currentColor; stroke-width:1.2; }
.flow-thread { position:relative; height:294px; }
.flow-chat-stage { position:absolute; inset:0; display:flex; flex-direction:column; align-items:start; gap:12px; }
.flow-chat-stage[hidden],.flow-bubble[hidden] { display:none!important; }
.flow-bubble { position:relative; max-width:88%; border:1px solid #dedbd3; border-radius:9px 9px 9px 2px; padding:10px 13px; font-size:14px; line-height:1.5; background:white; }
.flow-bubble[data-speaker=you] { align-self:end; border-radius:9px 9px 2px 9px; background:#eeece6; }
.flow-rework-loop { position:absolute; left:-25px; top:-12px; width:22px; height:40px; overflow:visible; fill:none; stroke:#9b7438; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.flow-outcome { min-height:44px; margin:12px 0 0; padding-top:12px; border-top:1px solid #dad9dd; font-size:12px; line-height:1.5; color:var(--muted); }
.flow-workflow { position:relative; }
.flow-tasks { margin:0; padding:0; list-style:none; display:grid; gap:12px; }
.flow-tasks li { position:relative; display:flex; align-items:center; gap:12px; height:64px; color:var(--muted); font-size:14px; }
.flow-mark { position:relative; z-index:1; flex:none; display:grid; place-items:center; width:24px; height:24px; border:1px solid #c6cde4; border-radius:50%; font-size:11px; background:#edf1ff; }
.flow-task-card { display:flex; justify-content:space-between; align-items:center; gap:8px; min-width:0; flex:1; min-height:52px; padding:10px 14px; border:1px solid #d9dfee; border-radius:6px; background:#f5f7ff; line-height:1.4; }
.flow-task-card svg { flex:none; width:16px; height:16px; fill:none; stroke:var(--cobalt); stroke-width:1.5; opacity:0; }
.flow-tasks li[data-state=active] .flow-task-card { border-color:#819cf0; color:var(--cobalt); background:white; }
.flow-tasks li[data-state=done] { color:var(--ink); }
[data-state=done] .flow-mark { background:var(--cobalt); border-color:var(--cobalt); color:white; }
[data-state=done] .flow-task-card svg { opacity:1; }
.flow-route { position:absolute; left:11px; top:32px; width:2px; height:152px; background:#cbd3eb; }
.flow-route-fill { position:absolute; inset:0; background:var(--cobalt); transform:scaleY(var(--flow-route-progress,0)); transform-origin:top; }
.flow-packet { position:absolute; z-index:2; top:-4px; left:-3px; width:8px; height:8px; border-radius:50%; background:var(--cobalt); box-shadow:0 0 0 4px #dce5ff; transform:translateY(calc(var(--flow-route-progress,0)*152px)); }
.flow-result-preview { margin:12px 0 0 36px; height:66px; border:1px solid #d3d9e9; border-radius:5px; overflow:hidden; background:white; }
.flow-mini-bar { height:13px; display:flex; align-items:center; gap:3px; padding-left:6px; border-bottom:1px solid #e9ebf2; }
.flow-mini-bar i { width:3px; height:3px; border-radius:50%; background:#d4d8e5; }
.flow-mini-page { position:relative; height:52px; padding:8px; display:grid; grid-template-columns:1fr .6fr; gap:5px; }
.flow-piece { opacity:1; transform:translateY(0); }
.flow-piece[data-visible=false] { opacity:0; transform:translateY(6px); }
.flow-piece-design { grid-area:1/1; border-radius:2px; background:#bed0ff; }
.flow-piece-modules { grid-area:1/2; display:flex; flex-direction:column; gap:3px; }
.flow-piece-modules i { flex:1; border-radius:1px; background:#e4e9f5; }
.flow-piece-verified { position:absolute; bottom:4px; right:5px; width:18px; height:18px; background:var(--cobalt); border:2px solid white; border-radius:50%; }
.flow-piece-verified svg { display:block; fill:none; stroke:white; stroke-width:1.6; }
[data-flow-state=playing][data-flow-visible=true] .flow-route-fill,[data-flow-state=playing][data-flow-visible=true] .flow-packet { transition:transform 400ms ease-in-out; }
[data-flow-state=playing][data-flow-visible=true] .flow-piece { transition:opacity 300ms,transform 300ms; }
[data-flow-state=playing][data-flow-visible=true] .flow-rework-loop { animation:flow-return 800ms ease-in-out infinite; }
.flow-foot { display:flex; justify-content:space-between; gap:12px; margin-top:14px; font-size:12px; color:var(--muted); }
.flow-foot a { text-decoration:underline; text-underline-offset:3px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@keyframes flow-return { 50% { transform:translateY(-4px); } }
@media(max-width:600px) {
 .flow-lane { padding:16px 10px; }
 .flow-lane h3 { min-height:42px; margin-bottom:10px; font-size:14px; line-height:1.5; }
 .flow-heading { align-items:center; }
 .flow-foot { flex-wrap:wrap; }
 .flow-heading h2 { max-width:14ch; }
 .flow-chat-legend,.flow-plan-label { font-size:10px; gap:4px; }
 .flow-thread { height:294px; }
 .flow-bubble { max-width:calc(100% - 10px); padding:8px; font-size:12px; }
 .flow-chat-stage { gap:12px; }
 .flow-rework-loop { left:-15px; width:14px; }
 .flow-tasks li { gap:6px; font-size:12px; }
 .flow-mark { width:20px; height:20px; font-size:10px; }
 .flow-route { left:9px; }
 .flow-task-card { padding:8px 6px; gap:3px; }
 .flow-task-card svg { display:none; }
 .flow-result-preview { margin-left:26px; }
 .flow-outcome { min-height:62px; font-size:11px; }
}
@media(prefers-reduced-motion:reduce) { .hflow-section * { animation:none!important; transition:none!important; } }
.flow-piece-design { position:relative; }
.flow-piece-design::before,.flow-piece-design::after { content:''; position:absolute; left:6px; top:10px; width:60%; height:3px; border-radius:1px; background:white; }
.flow-piece-design::after { top:17px; width:42%; height:2px; opacity:.75; }
[data-flow-state=complete] .flow-packet { opacity:0; }
.flow-harness[data-flow-ready=true] .flow-packet { opacity:0; }
.flow-harness[data-flow-ready=true] .flow-result-preview { border-color:var(--cobalt); }
.flow-harness[data-flow-ready=true] .flow-outcome { color:var(--cobalt); font-weight:600; }
.flow-harness[data-flow-ready=true] .flow-outcome::before { content:'✓'; margin-right:6px; }
.flow-heading h2 { font-size:clamp(24px,2.3vw,30px); }
.hflow-section:focus-visible { outline:2px solid var(--cobalt); outline-offset:-3px; }
@media(max-width:520px){.flow-steps{gap:16px;justify-content:space-between}.flow-steps button{flex:1;min-width:0;font-size:12px;line-height:1.4;white-space:normal}.flow-steps button span{margin-right:4px;font-size:10px}}
.flow-tasks li{min-width:0}.flow-task-card,.flow-bubble{overflow-wrap:anywhere;hyphens:auto}
.flow-steps button{overflow-wrap:anywhere;hyphens:auto}

/* Manual lane checklist: fills the lane so it never reads as unfinished, and mirrors the saved-path tasks. */
.flow-thread { height:222px; }
.flow-todo { margin-top:14px; padding:14px 14px 4px; border:1px dashed #d6d1c4; border-radius:6px; background:#fbfaf7; }
.flow-todo-label { margin:0 0 8px; font-size:11px; color:var(--muted); }
.flow-todo-list { margin:0; padding:0; list-style:none; display:grid; }
.flow-todo-list li { display:flex; align-items:center; gap:10px; min-height:30px; font-size:13px; color:var(--muted); }
.flow-todo-box { flex:none; width:14px; height:14px; border:1px solid #c9c3b4; border-radius:3px; background:white; }
.flow-todo-list li[data-state=active] { color:var(--ink); }
.flow-todo-list li[data-state=active] .flow-todo-box { border-color:#9b7438; box-shadow:inset 0 0 0 3px white; background:#c69a52; }
.flow-todo-list li[data-state=passed] .flow-todo-box { border-style:dashed; }
[data-flow-state=playing][data-flow-visible=true] .flow-todo-list li { transition:color 300ms; }
@media(max-width:600px){
 .flow-thread { height:262px; }
 .flow-todo { padding:10px 8px 2px; }
 .flow-todo-list li { gap:6px; font-size:11.5px; line-height:1.35; min-height:28px; }
 .flow-todo-box { width:12px; height:12px; }
}
/* Equal-height lanes: status lines share one baseline and the site preview takes the remaining room. */
.flow-lane { display:flex; flex-direction:column; }
.flow-lane .flow-outcome { margin-top:auto; }
.flow-harness .flow-result-preview { flex:1; min-height:66px; max-height:150px; margin-bottom:12px; display:flex; flex-direction:column; }
.flow-harness .flow-mini-page { flex:1; height:auto; grid-template-rows:1fr; }
.flow-manual .flow-todo { margin-bottom:12px; }
