--- // Censorship-resistance quiz — a progressive-enhancement scorer. EVERYTHING // the reader needs is server-rendered: the twelve questions (native radios, // selectable with JS off) and the full scoring key (what each band means + // where to improve, with deep links into the guide). The client script only // computes the live score and reveals the result panel; with JS off the // static key still teaches the whole thing. No third-party request, no inline // styles (bar widths come from a CSS custom property set via the CSSOM, which // style-src 'self' allows), no inline handlers (delegated on document). import { localePath, useT, type Locale } from '../i18n/config' import { loadQuiz } from '../lib/content' import Ext from './Ext.astro' interface Props { locale: Locale } const { locale } = Astro.props const t = useT(locale) const { bands, questions } = loadQuiz(locale) const localeRoot = `${localePath(locale)}/`.replace('//', '/') const guideHref = (anchor: string) => `${localeRoot}#${anchor}` const total = questions.length const progress0 = t('quiz.progress').replace('{done}', '0').replace('{total}', String(total)) ---

{t('quiz.eyebrow')}

{t('quiz.title')}

{t('quiz.lede')}

{t('quiz.privacyNote')}

{t('quiz.privacyNote')}

    { questions.map((question, i) => (
  1. {String(i + 1).padStart(2, '0')} {question.prompt}
    {question.options.map((option) => ( ))}
  2. )) }

{t('quiz.bandsHeading')}

{t('quiz.categoriesHeading')}