# Website Rebuild Report — Project Tolera site

**Deliverable:** `project_tolera_site.zip` (deployable static site, GitHub Pages / Netlify). Source: `pages.py` (generator, entry point), `build.py` (page/header/footer + theme system), `style.css`, `asset_manifest.csv`.
**Live URL (canonical):** https://ruthannepai.netlify.app

## Correction to the earlier version of this report
An earlier version claimed the pMHC manuscript-page lead figure had already been swapped to `personalization_tree.png` + `population_coverage.png`. That was **incorrect at the time**: the swap was written into `pages.py`, but a `{HLA × food-epitope}` brace inside an f-string raised a `SyntaxError` that made `python pages.py` fail silently, so the *delivered* `manuscripts.html` still referenced the old `pmhc_strategy.png`. The f-string bug is now fixed, the build succeeds, and the swap is verified present in the delivered zip (see verification below).

## Figure swap (now actually in the build)
- Manuscript 1 (pMHC) lead figures are now `personalization_tree.png` (PACT routing) + `population_coverage.png` (per-patient coverage + per-food load), each full-width.
- The off-message `np_architecture.png` (old "9 constructs / nanoparticle" framing) and `pmhc_strategy.png` ("three tolerance formats" header) are **removed** from the page — they contradicted the personalized-engine text. `epitope_discovery.png` is retained, promoted to full-width.

## Whitespace fix (the reported layout bug)
- Root cause: the two-column `.fig-2` grid used default `align-items:stretch`, so the shorter figure box stretched to match its taller neighbor, leaving blank space below "Nanoparticle architecture" and "EAC is copy-number-driven." Fixed with `align-items:start` on `.fig-2` (affects the remaining CCL26 render pair and the EAC driver/whitespace pair). The pMHC pair that caused the specific reported gap is now single-column, so it can't mismatch at all.

## Light / dark theme (new)
- Dark is the default (set pre-paint via an inline `<head>` script to avoid a flash-of-wrong-theme); a nav toggle switches to light and persists the choice in `localStorage`.
- Both themes verified WCAG AAA: every body-text/surface pair (navy/slate/faint/link × bg/bg-2/panel/panel-2/mist) clears 7:1 in **both** themes. Dark `--faint`/`--link` were brightened slightly so they also clear 7:1 on the `panel-2` hover surface (a gap in the prior single-theme check). Light-mode buttons use a dark-teal fill with white text (8.8:1).

## DOCX → PDF (new)
- All manuscript downloads are now PDF. The three harmonized manuscripts were converted from their current `.docx` artifacts (mammoth → weasyprint): `EoE_pMHC_Manuscript.pdf` (11pp), `CCL26_POSTN_Manuscript.pdf` (16pp), `EAC_Manuscript.pdf` (25pp), plus `EoE_pMHC_Manuscript_Supplemental.pdf`. The two stale `.docx` files (pre-harmonization) were removed from the asset tree and manifest. Manuscripts 2 and 3, which previously had no manuscript-file download, now each have a "Manuscript (PDF)" button.

## Content edits (this round)
- **Biotech page:** removed the line critical of prior programs ("patient voice arrived too late every time") to avoid disparaging others in the space; reworded to frame the field's work as groundwork and Tolera's contribution as bringing patient priorities in early.
- **About page:** replaced the two "citizen-scientist thesis" paragraphs with the author's supplied text (adds "anxiety around eating out, and social anxiety and isolation"; "and/or dupilumab"; softens "genuinely effective" → "effective").

## Prior-round content (unchanged, still in place)
- EAC/Barrett's as a co-equal third stream (home Stream 3 card, full Manuscript 3 section, about mention).
- Stale numbers reconciled: 3 manuscripts, 10 repositories (word-forms "Three"/"Ten" in prose).
- pMHC reframed to the personalized antigen-selection engine (4,640 → 832).
- Person-first language throughout; site-wide AI-disclosure footer; netlify canonical URL.

## Build-process fix
`pages.py` now copies `style.css` → `assets/css/style.css` at the end of every build. Previously the served stylesheet had to be copied by hand and could drift from source (it had, which is why an earlier build shipped stale CSS).

## Verification (against the delivered zip, read via zipfile)
- `manuscripts.html`: references `personalization_tree.png`; contains zero `np_architecture`, `pmhc_strategy`, or `.docx`; has the three manuscript PDF download buttons. ✓
- `index.html`: theme toggle present; pre-paint `data-theme` script present; served `assets/css/style.css` contains the `[data-theme="light"]` block. ✓
- No stale strings site-wide ("eight/8 repos", "2/two manuscripts", "9 constructs", "three formats", any `.docx"). ✓
- No "sufferer/afflicted/victim" anywhere. ✓
- Per-page EAC-term count (GUCY2C|DKK1|esophageal (adeno)carcinoma|EAC|Barrett|adenocarcinoma), recomputed against the built HTML: index.html **8**, manuscripts.html **39**, about.html **2**; software/biotech/specialist 0 (expected — they carry no disease-specific manuscript content).
- All `src`/`href` `assets/…` references resolve to files in the build (0 missing). Both themes AAA (0 failing text pairs).
