:root{--wf-bg:#ffffff;--wf-ink:#111a30;--wf-muted:#566077;--wf-line:#cdd5e5;--wf-soft:#f4f6fb;--wf-accent:#7e6119;--wf-accent-soft:#f7f1e1;--wf-flag:#a4570a;--wf-flag-soft:#fdf0dd;--wf-end:#111a30;--wf-endtext:#ffffff;--wf-lane:#ffffff;--wf-lane2:#f7f9fd}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){--wf-bg:#0e1424;--wf-ink:#e8ecf6;--wf-muted:#9ba6bf;--wf-line:#2d3957;--wf-soft:#161e35;--wf-accent:#e0b457;--wf-accent-soft:#2e2614;--wf-flag:#f2ab5c;--wf-flag-soft:#2d2314;--wf-end:#e8ecf6;--wf-endtext:#0e1424;--wf-lane:#0e1424;--wf-lane2:#121a2f;color-scheme:dark}}
:root[data-theme="dark"]{--wf-bg:#0e1424;--wf-ink:#e8ecf6;--wf-muted:#9ba6bf;--wf-line:#2d3957;--wf-soft:#161e35;--wf-accent:#e0b457;--wf-accent-soft:#2e2614;--wf-flag:#f2ab5c;--wf-flag-soft:#2d2314;--wf-end:#e8ecf6;--wf-endtext:#0e1424;--wf-lane:#0e1424;--wf-lane2:#121a2f;color-scheme:dark}
*{box-sizing:border-box}
html{-webkit-print-color-adjust:exact;print-color-adjust:exact}
body{margin:0;background:var(--wf-bg);color:var(--wf-ink);font-family:"Inter",system-ui,-apple-system,"Segoe UI",sans-serif;font-size:15px;line-height:1.5;font-feature-settings:"tnum" 1,"cv11" 1;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.pg{max-width:1180px;margin:0 auto;padding:28px 0 20px;border-bottom:1px solid var(--wf-line);position:relative}
.run{display:flex;justify-content:space-between;color:var(--wf-muted);font-size:12px;border-bottom:1px solid var(--wf-line);padding-bottom:8px;margin-bottom:22px}
h1{font-size:clamp(28px,4.4vw,46px);line-height:1.08;font-weight:600;letter-spacing:-.02em;margin:34px 0 12px;max-width:20ch;text-wrap:balance}
h2{font-size:clamp(22px,3vw,30px);line-height:1.15;font-weight:600;letter-spacing:-.015em;margin:0 0 8px;text-wrap:balance}
h3{font-size:15px;font-weight:600;margin:0 0 4px}
h4{font-size:13.5px;font-weight:600;margin:0 0 3px}
p{margin:0}
.sub{font-size:clamp(15px,1.6vw,18px);color:var(--wf-muted);max-width:60ch;margin-bottom:28px}
.lead{color:var(--wf-muted);max-width:80ch;margin-bottom:16px}
.stages{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:24px}
.stage{border-top:2px solid var(--wf-accent);padding-top:10px;min-width:0}
.stage .freq{display:inline-block;font-size:12px;color:var(--wf-accent);font-weight:600;margin-bottom:6px}
.stage h3{font-size:17px;margin-bottom:8px}
.stage ul{margin:0;padding:0;list-style:none;display:grid;gap:8px}
.stage li{font-size:13.5px;color:var(--wf-muted);line-height:1.4;padding-left:12px;position:relative}
.stage li::before{content:"";position:absolute;left:0;top:.62em;width:5px;height:1.5px;background:var(--wf-line)}
.base{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;border-top:1px solid var(--wf-line);padding-top:16px}
.base p,.cards p,.ctl p{font-size:13px;color:var(--wf-muted);line-height:1.45}
.hint{display:none;font-size:12px;color:var(--wf-muted);margin-bottom:6px}
.dia{overflow-x:auto;border:1px solid var(--wf-line);border-radius:6px}
.diain{min-width:1000px}
svg.wf{display:block;width:100%;height:auto}
.lane{fill:var(--wf-lane)}.lane.alt{fill:var(--wf-lane2)}
.gutline{stroke:var(--wf-line);stroke-width:1}
.lanelabel{font-size:14px;font-weight:600;fill:var(--wf-ink)}
.node rect{stroke-width:1.4}
.node text{font-size:15px;fill:var(--wf-ink)}
.node.person rect{fill:var(--wf-bg);stroke:var(--wf-ink)}
.node.sys rect{fill:var(--wf-accent-soft);stroke:var(--wf-accent)}
.node.flag rect{fill:var(--wf-flag-soft);stroke:var(--wf-flag)}
.node.end rect{fill:var(--wf-end);stroke:var(--wf-end)}.node.end text{fill:var(--wf-endtext)}
.node.ext rect{fill:none;stroke:var(--wf-muted);stroke-dasharray:4 3}
.edge{fill:none;stroke:var(--wf-muted);stroke-width:1.6;stroke-linejoin:round}.edge.dash{stroke-dasharray:5 4}
.ahead{fill:var(--wf-muted)}
.elabel{font-size:14px;fill:var(--wf-muted);font-weight:500}
.legend{display:flex;flex-wrap:wrap;gap:6px 18px;list-style:none;margin:10px 0 0;padding:0;font-size:12px;color:var(--wf-muted)}
.legend li{display:flex;align-items:center;gap:6px}
.k{display:inline-block;width:14px;height:10px;border-radius:2px;border:1.3px solid}
.k.person{background:var(--wf-bg);border-color:var(--wf-ink)}.k.sys{background:var(--wf-accent-soft);border-color:var(--wf-accent)}.k.flag{background:var(--wf-flag-soft);border-color:var(--wf-flag)}.k.end{background:var(--wf-end);border-color:var(--wf-end)}.k.ext{border-style:dashed;border-color:var(--wf-muted)}
.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:14px}
.cards.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.cards>div{border-top:1px solid var(--wf-line);padding-top:8px}
.ctl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 28px;margin-bottom:30px}
.ctl>div{border-top:2px solid var(--wf-accent);padding-top:10px}
.ctl h4{font-size:15px;margin-bottom:5px}.ctl p{font-size:14px}
.close{border-top:2px solid var(--wf-ink);padding-top:12px;max-width:760px}
.close h3{font-size:18px;margin-bottom:4px}.close p{color:var(--wf-muted)}.close .who{color:var(--wf-ink);margin-top:8px}
.pn{display:flex;justify-content:space-between;color:var(--wf-muted);font-size:11.5px;margin-top:18px}
@media (max-width:1040px){.hint{display:block}}
@media (max-width:760px){.stages,.base,.cards,.cards.three,.ctl{grid-template-columns:1fr 1fr}}
@media (max-width:480px){.stages,.base,.cards,.cards.three,.ctl{grid-template-columns:1fr}}
@media print{
  @page{size:A4 landscape;margin:0}
  body{padding:0;font-size:10pt}
  .pg{width:297mm;height:210mm;max-width:none;margin:0;padding:10mm 13mm 0;overflow:hidden;break-after:page;page-break-after:always;border:0}
  .pg:last-child{break-after:auto;page-break-after:auto}
  .run{margin-bottom:6mm;padding-bottom:2mm;font-size:8pt}
  h2{font-size:20pt;margin-bottom:2mm}.lead{font-size:10pt;margin-bottom:5mm;max-width:215mm}
  h3{font-size:10.5pt}h4{font-size:9.6pt}
  .hint{display:none!important}
  .dia{overflow:visible}.diain{min-width:0}
  .legend{font-size:8.2pt;margin-top:3.5mm}
  .cards{margin-top:5mm;gap:6mm}.cards p{font-size:8.8pt}
  .pn{position:absolute;left:13mm;right:13mm;bottom:8mm;margin:0;font-size:7.8pt;border-top:1px solid var(--wf-line);padding-top:2mm}
  .cover{display:flex;flex-direction:column}
  .cover h1{font-size:38pt;margin:12mm 0 4mm;max-width:24ch}.cover .sub{font-size:14pt;margin-bottom:12mm;max-width:190mm}
  .stages{gap:6mm;margin-bottom:0}.stage .freq{font-size:9pt}.stage h3{font-size:15pt;margin-bottom:3mm}.stage ul{gap:3mm}.stage li{font-size:10pt}
  .base{margin-top:auto;margin-bottom:22mm;gap:8mm;padding-top:5mm}.base h4{font-size:10.5pt}.base p{font-size:9.6pt}
  .ctl{gap:11mm 10mm;margin-bottom:16mm;margin-top:8mm}.ctl h4{font-size:13.5pt;margin-bottom:2mm}.ctl p{font-size:11pt}
  .close h3{font-size:16pt}.close p{font-size:11.5pt}
}
@media screen{body{padding-left:0;padding-right:0}.pg>.run,.pg>.pn{display:none}}
