# Plan: font-weight remediation (Canvas strips it from inline styles)

## Ground truth (verified live by reviewer — do not re-probe, never set ASUCB_LIVE_TEST)

canvas.asu.edu strips `font-weight` from inline `style=""` attributes on page-body
writes: every element (p, span, div, td, h3), every value (bold, 400, 600, 700).
Sibling declarations survive; `<strong>`/`<b>` survive. Pinned as
`tests/integration/test_live_html_roundtrip.py::test_font_weight_stripped_from_inline_style`.
Historic corroboration (read-only, 2026-07-10): a plugin-built course shows 46 pages,
35 with inline styles, 40 using `<strong>`, ZERO containing `font-weight`.

Scope rule: **only Canvas-sanitized surfaces matter** — HTML that becomes a Canvas
page/assignment/discussion/quiz/syllabus body. NOT affected (leave untouched):
local HTML reports (`templates/report-html/`, all `scripts/*_report*.py` /
`*_preview_html.py` output), the staging-server chrome (`templates/staging-html/`),
the local mockup preview shell (`templates/mockup-html/preview-base.html`,
`proposal-base.html`), and iframe-delivered interactives (served from Canvas Files,
not sanitized — font-weight is fine there).

## Changes

### 1. templates/page-html/ (Canvas page bodies — 11 occurrences, 6 files)

For each `font-weight` declaration:
- On elements that are bold by default (h1–h6, th, strong): delete just the
  declaration (it does nothing live today).
- Otherwise: wrap the affected text in `<strong>` and delete the declaration.
Minimal diff — do not touch neighboring declarations, whitespace, or structure.

### 2. templates/mockup-html/placeholder-card.html (13 occurrences)

First confirm the usage context (skills/course-mockup/SKILL.md ~line 125): these
cards are embedded into REAL Canvas mockup pages, so they are Canvas-bound. Apply
the same per-declaration treatment as §1. If your reading of SKILL.md contradicts
this (cards only ever rendered in the local preview shell), STOP and report
instead of guessing.

### 3. scripts/add_transcripts.py (~line 200)

The `<summary style="... font-weight: bold; ...">` lands in live Canvas page
bodies. Remove `font-weight: bold;` from the style and wrap the summary label in
`<strong>` (e.g. `<summary style="..."><strong>{label} (click to expand)</strong></summary>`).
Check the rest of the file for other Canvas-bound font-weight uses. Also sweep the
OTHER scripts that matched `grep -l "font-weight" scripts/*.py` and classify each:
fix only strings that end up in Canvas object bodies/descriptions; local report
HTML stays. List your classification in the PR body.

### 4. skills/course-mockup/SKILL.md and skills/notebooklm/SKILL.md

These contain example HTML that generation follows. Fix any example that
represents Canvas body HTML (same treatment); leave examples of local-preview or
iframe HTML alone. Classify in the PR body.

### 5. standards/page-design.md (12 occurrences)

- Add a short "Canvas sanitizer constraints" note (place near existing
  inline-style guidance): Canvas strips `font-weight` from inline styles
  (verified live 2026-07-10, pinned in the live suite) — use `<strong>`/`<b>`
  for bold in Canvas page bodies; iframe interactives are exempt.
- Update every component example that uses inline `font-weight` on Canvas body
  HTML to the `<strong>`-based form, same per-declaration treatment as §1.

### 6. Preflight guard (scripts/preflight_checks.py + test)

Add a Tier 1 check: staged page/assignment/discussion/quiz body containing
`font-weight` inside a `style="..."` attribute emits a WARNING-level finding
(non-blocking, severity floor consistent with other advisory checks), message
pointing at the quirk and the `<strong>` rule. Follow the file's existing check
structure/naming/criterion conventions (read 2–3 existing checks first). Regex
must only match within style attribute values, not e.g. prose or `<strong>`
mentions. Add tests in the existing preflight test file covering: match in style
attr → warning; `font-weight` outside a style attr → no finding; clean body → no
finding.

## Acceptance

- `.venv/bin/python3 -m pytest tests/ -q` fully green.
- `grep -rn "font-weight" templates/page-html/` returns nothing.
- No occurrences remain in Canvas-bound strings in scripts/skills (per your
  classification); local report/preview/iframe surfaces untouched.
- PR body includes the per-file classification table (Canvas-bound vs local).
- Only files touched: the ones named above + this plan doc + preflight test file.
- Do NOT bump VERSION/manifests/CHANGELOG.

## Process

Branch `fix/font-weight-canvas-strip`, single commit
`fix(pages): replace inline font-weight with <strong> (Canvas strips it) + preflight guard`,
Sonnet Co-Authored-By trailer, PR to main. Reviewer (parent session) re-reads the
diff, re-runs suites, runs the live suite, and merges via the gate script.
