## Why Recent UX and content-quality updates still leave several user-facing regressions unresolved across policy access, hero readability, share/back-to-top controls, translation quality, and image refetch behavior. These issues directly affect trust and usability, so we need a focused stabilization change that tightens both frontend interactions and backend content-quality guardrails. ## What Changes - Convert Terms of Use and Attribution access from full-page navigation to in-page modal dialogs while preserving clear disclosure content and keyboard accessibility. - Remove hero-level permalink affordance from visible hero chrome. - Improve hero readability for non-English content (Tamil/Malayalam) across desktop and mobile. - Replace text-based copy/share and back-to-top controls with icon-based controls that remain accessible. - Add translation quality validation to reduce wrong-language or gibberish outputs before serving/storing translated content. - Upgrade `admin refetch-images` behavior so refreshed images are alternative (not same as current), subject-relevant, and filtered against unrelated animal/pet outcomes. - Extend admin image refetch operations to accept a permalink target and fetch a new relevant image for that article. - Keep deterministic AI-themed fallback behavior when confidence is low or relevance checks fail. ## Capabilities ### New Capabilities - `policy-disclosure-modals`: In-page modal experience for Terms of Use and Attribution content (focus trap, escape close, deep-link-safe modal state). - `translation-quality-validation-gates`: Post-translation validation gates (language/script sanity + gibberish rejection + deterministic fallback policy). - `permalink-targeted-image-refetch`: Admin command support for refetching summary images by permalink target. - `alternative-image-selection-and-dedupe`: Refetch pipeline guarantees alternative image selection, relevance scoring, repeat-image avoidance, and unsafe/unrelated-image filtering. ### Modified Capabilities - `footer-policy-links`: Footer policy access behavior changes from route navigation emphasis to modal activation flow. - `terms-of-use-risk-disclosure`: Terms content remains required, but delivery surface changes from standalone page-centric flow to modal-capable flow. - `attribution-disclaimer-page`: Attribution content remains required, but delivery surface changes from standalone page-centric flow to modal-capable flow. - `hero-display`: Hero chrome removes visible permalink affordance and preserves clean primary/secondary actions. - `hero-summary-entry-and-readability`: Strengthen multilingual hero readability requirements, especially for Tamil/Malayalam headline and summary rendering. - `responsive-device-agnostic-layout`: Ensure icon-based controls and modal policy surfaces remain usable and unclipped on mobile/tablet/desktop. - `wcag-2-2-aa-accessibility`: Icon-only controls and policy modals require explicit accessible labels, keyboard navigation, and focus behavior. - `article-translations-ml-tm`: Add quality validation outcomes for generated Tamil/Malayalam translations before persistence/serving. - `language-aware-content-delivery`: Define deterministic fallback behavior when requested translation fails quality validation. - `admin-maintenance-command-suite`: Extend admin command contract to include permalink-targeted image refetch execution path. - `queued-image-refetch-with-backoff`: Extend queue behavior to support targeted permalink jobs and non-repeat image outcomes. - `context-aware-image-selection-recovery`: Improve subject extraction and keyword recovery for alternative relevant image retrieval. - `news-image-relevance-and-fallbacks`: Tighten relevance/safety checks to reject unrelated animal/pet imagery and preserve AI-themed fallback when uncertain. ## Impact - **Frontend/UI**: `frontend/index.html` policy-link behavior, hero metadata/actions, icon controls, modal state handling, and locale-specific readability styles. - **Backend API/Routes**: `backend/main.py` policy content delivery strategy and compatibility with modal-first access. - **Admin CLI**: `backend/cli.py` image refetch command arguments and permalink-targeted workflow. - **Image pipeline**: `backend/news_service.py` subject extraction, alternative image candidate selection, dedupe/repeat prevention, relevance/safety filtering, and fallback selection. - **Translation pipeline**: `backend/news_service.py` translation response validation and fallback policy; potential metadata persistence updates in repository/model layers. - **Operational behavior**: Additional logging/audit fields for translation-quality failures and image-refetch decision path to support debugging and trust.