You are auditing the S5 wave of a survey for reproducibility. I have uploaded two files:

- rthg-s5-dataset.jsonl: the raw data, one survey response per line as JSON.
  Each row has "payload.pages" (the answers, keyed by page name then question
  name) and "payload.timings" (milliseconds spent on each page).
- rthg-s5.json: the published results. It contains the expected dataset hash at
  "dataset.sha256" and the published support figures (overall and by party).

Use code (a data/code tool) and show your work. Do all of the following:

1. Compute the SHA-256 hash of rthg-s5-dataset.jsonl exactly as uploaded.
   Compare it to "dataset.sha256" in rthg-s5.json. State MATCH or MISMATCH.
   A mismatch means the data file was edited after it was frozen.

2. Count the rows in the dataset.

3. Apply these pre-registered S5 exclusion rules and report how many rows EACH one
   removes:
   - attention check: section-b-principles.B-att must equal 4
   - ballot comprehension: s5-ballot.smoke4-comprehension-check must equal "Two years"
   - open-page comprehension (S5 only): smoke4-open.smoke4-comprehension-check must equal "Two years"
   - final check: section-g-demographics.final-attention-check must equal
     "Principles for how government should explain major decisions"
   - method checks: section-c-a-ballot.ballot-method-check and
     section-d-arm.ballot-method-check must equal 2 when present
   - speed (payload.timings is in milliseconds): remove rows where
     timings['section-b-principles'] < 45000, or timings['s5-mechanism'] < 45000,
     or timings['section-d-arm'] < 30000
   - reverse-coded contradiction (S5 rule): remove a row if B-rev >= 3
   - eligibility (S5 headline cohort): drop respondents who report they were not
     eligible to vote in 2024

4. On the surviving rows, compute the percent who "support" (final ballot vote of
   5, 6, or 7 on the 1-to-7 scale), with a Wilson 95% confidence interval.

5. Break that support percentage down by section-g-demographics.party.

6. Compare your computed numbers to the published figures in rthg-s5.json and say
   whether they match within rounding.

Finish with a plain-English verdict in two or three sentences:
- Did the data file appear intact (hash match) or edited (mismatch)?
- Does the published headline (about 90% support, and support above 88% in every
  party bloc) reproduce from the raw data?

For S6 or s6-short data, use AI_AUDIT_PROMPT_S6.txt instead (different cohort and exclusion rules).
