digraph extraction_station {
  bgcolor="#1a1a2e"
  rankdir=TB
  node [fontname="Helvetica" fontsize=10 style=filled shape=box]
  edge [color="#888888" fontname="Helvetica" fontsize=9 fontcolor="#aaaaaa"]

  label=<<B><FONT COLOR="#cccccc" POINT-SIZE="14">station 2: extraction (two paths)</FONT></B>>
  labelloc=t

  fiber_in [label="PREPARED FIBER\nfrom Station 1" fillcolor="#66BB6A" fontcolor="white"]

  subgraph cluster_naoh {
    label="PATH A: NaOH EXTRACTION" fontcolor="#2196F3" fontsize=11 fontname="Helvetica Bold"
    color="#2196F3" style=dashed

    naoh_dissolve [label="dissolve NaOH\n5-12% solution" fillcolor="#1565C0" fontcolor="white"]
    naoh_soak [label="soak fiber\n80C for 2-3 hours\nor room temp 4 hours" fillcolor="#1976D2" fontcolor="white"]
    naoh_filter [label="filter &amp; wash\nuntil pH neutral" fillcolor="#1E88E5" fontcolor="white"]
    naoh_dissolve -> naoh_soak -> naoh_filter
  }

  subgraph cluster_citric {
    label="PATH B: CITRIC ACID CROSSLINK" fontcolor="#FF9800" fontsize=11 fontname="Helvetica Bold"
    color="#FF9800" style=dashed

    citric_paper [label="spread fiber\npress into sheets" fillcolor="#E65100" fontcolor="white"]
    citric_soak [label="soak in\ncitric acid + glycerol" fillcolor="#F57C00" fontcolor="white"]
    citric_cure [label="cure at 140C\nunder pressure" fillcolor="#FF9800" fontcolor="white"]
    citric_paper -> citric_soak -> citric_cure
  }

  fiber_in -> naoh_dissolve [label="higher purity\nmore waste"]
  fiber_in -> citric_paper [label="less waste\nsimpler setup"]

  cellulose_out [label="RAW CELLULOSE\nto Station 3" fillcolor="#64B5F6" fontcolor="#1a1a2e" shape=doubleoctagon]
  naoh_filter -> cellulose_out
  citric_cure -> cellulose_out

  waste_a [label="NaOH waste liquor\nneutralize before disposal" fillcolor="#37474F" fontcolor="#aaaaaa" shape=ellipse]
  naoh_soak -> waste_a [style=dashed color="#555555"]

  note_citric [label="citric acid path\nproduces less waste\n&amp; avoids NaOH hazards" fillcolor="#263238" fontcolor="#CDDC39" shape=note fontsize=9]

  rotation [label="continuous operation:\n3-4 reaction vessels\nrotating through stages" fillcolor="#263238" fontcolor="#CDDC39" shape=note fontsize=9]
}
