# A generic criminal case as a timeline with owners (assumes a not-guilty plea and a jury trial;
# many cases end in a guilty plea or a bench trial, and stages vary by jurisdiction). Scaffold the stages with:
#   python3 scripts/scaffold_from_spec.py pool/court-case/spec.yaml -o /tmp/anim/court-case/court-case.html
# The shipped HTML is hand-built beyond the scaffold: labels alternate above and below the axis,
# the progress line is one path per owner (police and prosecution, court, jury, court) so its
# colour changes at each hand-off, and owner brackets with hand-off chevrons sit under the axis.
name: court-case
archetype: timeline
verb: reveal
domain: civics-law
size: [1680, 600]
control: once
cycle: 10
nodes:
  - { id: inv, label: Investigation, sub: "evidence and suspects",      kind: milestone, at: "police" }
  - { id: chg, label: Charge,        sub: "prosecutor files charges",   kind: milestone, at: "prosecution" }
  - { id: arr, label: Arraignment,   sub: "charges read, plea entered", kind: milestone, at: "court" }
  - { id: dis, label: Discovery,     sub: "both sides share evidence",  kind: milestone, at: "court" }
  - { id: tri, label: Trial,         sub: "evidence and witnesses",     kind: milestone, at: "court" }
  - { id: ver, label: Verdict,       sub: "jury decides guilt",         kind: milestone, at: "jury" }
  - { id: sen, label: Sentencing,    sub: "judge sets the penalty",     kind: milestone, at: "court" }
phases:
  - { t: 0,    label: setup,                                   note: "Police investigate and the prosecution decides on charges" }
  - { t: 0.8,  label: inv,  show: [inv], active: [inv] }
  - { t: 2,  label: chg,  show: [chg], active: [chg] }
  - { t: 3.2,  label: arr,  show: [arr], active: [arr],        note: "Hand-off 1: at arraignment the court takes charge of the case" }
  - { t: 4.4,  label: dis,  show: [dis], active: [dis] }
  - { t: 5.6,  label: tri,  show: [tri], active: [tri],        note: "Hand-off 2: once the evidence is heard, the jury deliberates" }
  - { t: 6.8,  label: ver,  show: [ver], active: [ver],        note: "Hand-off 3: the verdict returns the case to the judge" }
  - { t: 7.8, label: sen,  show: [sen], active: [sen] }
  - { t: 8.8, label: hold,              active: [sen],        note: "In a jury trial, each stage has one owner: prosecution, court, jury, court" }
