// MostlyPrivacy — shared infra: icons, logo language, i18n, language switcher,
// the embeddable cookie widget (3 variants) and the live policy document.
// Everything is published on window.MP for the screen files to consume.
const F = window.ForgeDesignSystem_e40d74;

/* ── Icons (Lucide geometry, stroke 2, round caps) ─────────────────────── */
const ICONS = {
  shield: "M12 2 4 5v6c0 5 3.5 8.5 8 11 4.5-2.5 8-6 8-11V5z",
  shieldCheck: "M12 2 4 5v6c0 5 3.5 8.5 8 11 4.5-2.5 8-6 8-11V5z M9 12l2 2 4-4",
  check: "M20 6 9 17l-5-5",
  arrow: "M5 12h14M13 5l7 7-7 7",
  globe: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20 M2 12h20 M12 2a15 15 0 0 1 0 20 M12 2a15 15 0 0 0 0 20",
  cookie: "M12 2a10 10 0 1 0 10 10 4 4 0 0 1-4-4 4 4 0 0 1-4-4 M8.5 8.5h.01 M16 15.5h.01 M11 12h.01 M15 11h.01 M9.5 15.5h.01",
  doc: "M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z M14 2v6h6 M9 13h6 M9 17h4",
  layout: "M3 3h18v18H3z M3 9h18 M9 21V9",
  sites: "M3 3h7v7H3z M14 3h7v7h-7z M14 14h7v7h-7z M3 14h7v7H3z",
  cog: "M12 9a3 3 0 1 0 0 6 3 3 0 0 0 0-6 M19.4 15a1.6 1.6 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.6 1.6 0 0 0-2.7 1.1V21a2 2 0 1 1-4 0v-.1A1.6 1.6 0 0 0 7 19.4l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1A1.6 1.6 0 0 0 4.6 14H4a2 2 0 1 1 0-4h.1A1.6 1.6 0 0 0 5.6 7L5.5 7a2 2 0 1 1 2.8-2.8l.1.1a1.6 1.6 0 0 0 1.8.3H10a1.6 1.6 0 0 0 1-1.5V4a2 2 0 1 1 4 0v.1a1.6 1.6 0 0 0 2.7 1.1l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.6 1.6 0 0 0-.3 1.8V10a1.6 1.6 0 0 0 1.5 1H21a2 2 0 1 1 0 4h-.1a1.6 1.6 0 0 0-1.5 1z",
  search: "M11 19a8 8 0 1 0 0-16 8 8 0 0 0 0 16 M21 21l-4.3-4.3",
  bell: "M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9 M10.3 21a1.9 1.9 0 0 0 3.4 0",
  moon: "M21 12.8A9 9 0 1 1 11.2 3 7 7 0 0 0 21 12.8z",
  sun: "M12 17a5 5 0 1 0 0-10 5 5 0 0 0 0 10 M12 1v2 M12 21v2 M4.2 4.2l1.4 1.4 M18.4 18.4l1.4 1.4 M1 12h2 M21 12h2 M4.2 19.8l1.4-1.4 M18.4 5.6l1.4-1.4",
  plus: "M12 5v14M5 12h14",
  bolt: "M13 2 3 14h7l-1 8 10-12h-7z",
  copy: "M9 9h11v11H9z M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1",
  download: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4 M7 10l5 5 5-5 M12 15V3",
  scan: "M3 7V5a2 2 0 0 1 2-2h2 M17 3h2a2 2 0 0 1 2 2v2 M21 17v2a2 2 0 0 1-2 2h-2 M7 21H5a2 2 0 0 1-2-2v-2 M3 12h18",
  lock: "M5 11h14v10H5z M8 11V7a4 4 0 0 1 8 0v4",
  spark: "M12 3v4 M12 17v4 M3 12h4 M17 12h4 M6 6l2.5 2.5 M15.5 15.5 18 18 M18 6l-2.5 2.5 M8.5 15.5 6 18",
  zap: "M11 3 4 14h6l-1 7 8-12h-6z",
  publish: "M12 16V4 M6 10l6-6 6 6 M4 20h16",
  flag: "M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z M4 22v-7",
  users: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2 M9 11a4 4 0 1 0 0-8 4 4 0 0 0 0 8 M22 21v-2a4 4 0 0 0-3-3.9 M16 3.1a4 4 0 0 1 0 7.7",
  card: "M2 7h20v12H2z M2 11h20",
  palette: "M12 2a10 10 0 1 0 0 20 2 2 0 0 0 2-2 2 2 0 0 1 2-2h2a4 4 0 0 0 4-4 10 10 0 0 0-12-10z M8 9h.01 M16 9h.01 M9 15h.01",
  refund: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8 M3 3v5h5",
  truck: "M10 17h4V5H2v12h3 M20 17h2v-3.34a4 4 0 0 0-1.17-2.83L19 9h-5 M5 17a2 2 0 1 0 4 0 2 2 0 1 0-4 0 M15 17a2 2 0 1 0 4 0 2 2 0 1 0-4 0",
  alertTriangle: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3z M12 9v4 M12 17h.01",
  shieldAlert: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z M12 8v4 M12 16h.01",
  megaphone: "m3 11 18-5v12L3 14v-3z M11.6 16.8a3 3 0 1 1-5.79-1.6",
  building: "M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2 M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2 M10 6h4 M10 10h4 M10 14h4 M10 18h4",
  personStanding: "M12 5a2 2 0 1 0 0-4 2 2 0 0 0 0 4z M9 20l3-6 3 6 M6 8l6 2 6-2",
  clock: "M12 22a10 10 0 1 0 0-20 10 10 0 0 0 0 20z M12 6v6l4 2",
  calendar: "M8 2v4 M16 2v4 M3 10h18 M5 4h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2z",
  refresh: "M3 12a9 9 0 0 1 15-6.7L21 8 M21 3v5h-5 M21 12a9 9 0 0 1-15 6.7L3 16 M3 21v-5h5",
  grid: "M3 3h7v7H3z M14 3h7v7h-7z M14 14h7v7h-7z M3 14h7v7H3z",
  code: "M16 18l6-6-6-6 M8 6l-6 6 6 6",
  terminal: "M4 17l6-6-6-6 M12 19h8",
  radio: "M4.9 19.1C1 15.2 1 8.8 4.9 4.9 M7.8 16.2a6 6 0 0 1 0-8.4 M16.2 7.8a6 6 0 0 1 0 8.4 M19.1 4.9C23 8.8 23 15.2 19.1 19.1 M13 12a1 1 0 1 1-2 0 1 1 0 0 1 2 0z",
  leaf: "M11 20A7 7 0 0 1 9.8 6.1C15.5 5 17 4.48 19 2c1 2 2 4.18 2 8 0 5.5-4.78 10-10 10z M2 21c0-3 1.85-5.36 5.08-6",
  trend: "M3 17l6-6 4 4 8-8 M17 7h4v4",
};
const Icon = ({ d, size = 18, sw = 1.9 }) => (
  <svg width={size} height={size} viewBox="0 0 24 24" fill="none" stroke="currentColor"
    strokeWidth={sw} strokeLinecap="round" strokeLinejoin="round" aria-hidden="true">
    {d.split(" M").map((p, i) => <path key={i} d={(i ? "M" : "") + p} />)}
  </svg>
);

/* ── Logo language: shield-with-check tile + the signature tiny dot ─────── */
const PrivacyMark = ({ s = 28, animate = false }) => (
  <svg width={s} height={s} viewBox="0 0 100 100" aria-label="MostlyPrivacy">
    <rect x="3" y="3" width="94" height="94" rx="27" fill="var(--accent)" />
    <path d="M50 24 L70 31 V45 C70 60 61 68 50 73 C39 68 30 60 30 45 V31 Z"
      fill="none" stroke="#fff" strokeWidth="5" strokeLinejoin="round" strokeLinecap="round" />
    <path d="M41 47 l6.5 6.5 L61 40" fill="none" stroke="#fff" strokeWidth="5"
      strokeLinecap="round" strokeLinejoin="round" />
    <circle cx="80" cy="80" r="4.3" fill="#fff" className={animate ? "logo-dot" : undefined} />
  </svg>
);
const MTMark = ({ s = 16 }) => (
  <svg width={s} height={s} viewBox="0 0 100 100" aria-hidden="true">
    <rect x="3" y="3" width="94" height="94" rx="27" fill="var(--fg)" />
    <circle cx="74" cy="74" r="4.4" fill="var(--bg-elev)" />
  </svg>
);
const Wordmark = ({ size = 19 }) => (
  <span className="mp-brand__name" style={{ fontSize: size }}>
    Mostly<span className="acctint">Privacy</span>
  </span>
);

/* ── i18n — the localization wedge. Real translated strings. ───────────── */
const LANGS = [
  { code: "en", label: "EN", name: "English" },
  { code: "de", label: "DE", name: "Deutsch" },
  { code: "fr", label: "FR", name: "Français" },
  { code: "it", label: "IT", name: "Italiano" },
];
const STR = {
  en: {
    banner: { title: "We value your privacy",
      body: "We use cookies to improve your experience, analyse traffic and personalise content. You can accept all, reject all, or choose what to allow.",
      accept: "Accept all", reject: "Reject all", manage: "Manage preferences", save: "Save choices", policyLink: "Privacy Policy", poweredBy: "Cookie banner by" },
    cats: { necessary: ["Necessary", "Required for the site to work. Always on."],
      analytics: ["Analytics", "Help us understand how the site is used."],
      marketing: ["Marketing", "Used to show you relevant ads."],
      preferences: ["Preferences", "Remember your settings and choices."] },
    policy: { title: "Privacy Policy", updated: "Last updated",
      intro: "This Privacy Policy explains how {ORG} collects, uses and protects your personal data when you use our website, in line with the GDPR and other applicable laws.",
      secs: [ ["Data we collect", "We collect the information you give us — your name and email — and data gathered automatically, such as your IP address, device and cookies."],
        ["How we use it", "Your data is used to provide and improve the service, respond to requests, and meet our legal obligations. We never sell it."],
        ["Your rights", "You can access, correct, export or delete your data, and withdraw consent at any time. Contact us to exercise these rights."] ] } },
  de: {
    banner: { title: "Wir schätzen Ihre Privatsphäre",
      body: "Wir verwenden Cookies, um Ihr Erlebnis zu verbessern, den Datenverkehr zu analysieren und Inhalte zu personalisieren. Sie können alle akzeptieren, alle ablehnen oder auswählen, was Sie zulassen.",
      accept: "Alle akzeptieren", reject: "Alle ablehnen", manage: "Einstellungen verwalten", save: "Auswahl speichern", policyLink: "Datenschutz", poweredBy: "Cookie-Banner von" },
    cats: { necessary: ["Notwendig", "Erforderlich, damit die Website funktioniert. Immer aktiv."],
      analytics: ["Analyse", "Helfen uns zu verstehen, wie die Website genutzt wird."],
      marketing: ["Marketing", "Werden verwendet, um Ihnen relevante Werbung zu zeigen."],
      preferences: ["Präferenzen", "Speichern Ihre Einstellungen und Auswahl."] },
    policy: { title: "Datenschutzerklärung", updated: "Zuletzt aktualisiert",
      intro: "Diese Datenschutzerklärung erläutert, wie {ORG} Ihre personenbezogenen Daten erhebt, verwendet und schützt, wenn Sie unsere Website nutzen — im Einklang mit der DSGVO und anderen geltenden Gesetzen.",
      secs: [ ["Erhobene Daten", "Wir erheben die von Ihnen angegebenen Informationen — Name und E-Mail — sowie automatisch erfasste Daten wie Ihre IP-Adresse, Ihr Gerät und Cookies."],
        ["Verwendung der Daten", "Ihre Daten werden verwendet, um den Dienst bereitzustellen und zu verbessern, auf Anfragen zu reagieren und unsere gesetzlichen Pflichten zu erfüllen. Wir verkaufen sie niemals."],
        ["Ihre Rechte", "Sie können Ihre Daten einsehen, berichtigen, exportieren oder löschen und Ihre Einwilligung jederzeit widerrufen. Kontaktieren Sie uns, um diese Rechte auszuüben."] ] } },
  fr: {
    banner: { title: "Nous respectons votre vie privée",
      body: "Nous utilisons des cookies pour améliorer votre expérience, analyser le trafic et personnaliser le contenu. Vous pouvez tout accepter, tout refuser ou choisir ce que vous autorisez.",
      accept: "Tout accepter", reject: "Tout refuser", manage: "Gérer les préférences", save: "Enregistrer", policyLink: "Confidentialité", poweredBy: "Bannière cookies par" },
    cats: { necessary: ["Nécessaires", "Indispensables au fonctionnement du site. Toujours actifs."],
      analytics: ["Analytiques", "Nous aident à comprendre l'utilisation du site."],
      marketing: ["Marketing", "Utilisés pour vous montrer des publicités pertinentes."],
      preferences: ["Préférences", "Mémorisent vos réglages et vos choix."] },
    policy: { title: "Politique de confidentialité", updated: "Dernière mise à jour",
      intro: "La présente politique de confidentialité explique comment {ORG} collecte, utilise et protège vos données personnelles lorsque vous utilisez notre site, conformément au RGPD et aux autres lois applicables.",
      secs: [ ["Données collectées", "Nous collectons les informations que vous nous fournissez — nom et adresse e-mail — ainsi que des données recueillies automatiquement, telles que votre adresse IP, votre appareil et les cookies."],
        ["Utilisation des données", "Vos données servent à fournir et améliorer le service, répondre à vos demandes et respecter nos obligations légales. Nous ne les vendons jamais."],
        ["Vos droits", "Vous pouvez accéder à vos données, les corriger, les exporter ou les supprimer, et retirer votre consentement à tout moment. Contactez-nous pour exercer ces droits."] ] } },
  it: {
    banner: { title: "Teniamo alla tua privacy",
      body: "Utilizziamo i cookie per migliorare la tua esperienza, analizzare il traffico e personalizzare i contenuti. Puoi accettare tutto, rifiutare tutto o scegliere cosa consentire.",
      accept: "Accetta tutti", reject: "Rifiuta tutti", manage: "Gestisci preferenze", save: "Salva scelte", policyLink: "Privacy", poweredBy: "Banner cookie di" },
    cats: { necessary: ["Necessari", "Indispensabili al funzionamento del sito. Sempre attivi."],
      analytics: ["Analitici", "Ci aiutano a capire come viene usato il sito."],
      marketing: ["Marketing", "Usati per mostrarti annunci pertinenti."],
      preferences: ["Preferenze", "Ricordano le tue impostazioni e scelte."] },
    policy: { title: "Informativa sulla privacy", updated: "Ultimo aggiornamento",
      intro: "La presente informativa sulla privacy spiega come {ORG} raccoglie, utilizza e protegge i tuoi dati personali quando utilizzi il nostro sito, in conformità al GDPR e alle altre leggi applicabili.",
      secs: [ ["Dati raccolti", "Raccogliamo le informazioni che ci fornisci — nome ed e-mail — e i dati raccolti automaticamente, come indirizzo IP, dispositivo e cookie."],
        ["Come li usiamo", "I tuoi dati servono a fornire e migliorare il servizio, rispondere alle richieste e adempiere ai nostri obblighi legali. Non li vendiamo mai."],
        ["I tuoi diritti", "Puoi accedere ai tuoi dati, correggerli, esportarli o eliminarli e revocare il consenso in qualsiasi momento. Contattaci per esercitare questi diritti."] ] } },
};

/* ── Language switcher ─────────────────────────────────────────────────── */
function LangSwitch({ value, onChange, size }) {
  return (
    <div className={"lang-switch" + (size === "lg" ? " lang-switch--lg" : "")} role="group" aria-label="Language">
      {LANGS.map((l) => (
        <button key={l.code} className={value === l.code ? "is-active" : ""}
          onClick={() => onChange(l.code)} aria-pressed={value === l.code}>{l.label}</button>
      ))}
    </div>
  );
}

/* ── The embeddable cookie widget — compliant by default ───────────────── */
// Accept & Reject equal weight, Manage preferences link, granular switches in
// the expanded state, removable MostlyCookie badge.
// Hoisted to module scope so its identity is stable across re-renders —
// defined inline it remounted (and reset its Switch) every time the banner
// re-rendered while expanded.
function CatRow({ id, locked, c, cookieless, cats, setCats }) {
  const { Switch } = F;
  const exempt = !locked && !!cookieless[id];
  return (
    <div className="cw__cat">
      <div>
        <div className="cw__cat__t">{c[id][0]}{exempt && <span className="cw__cat__chip">Cookieless</span>}</div>
        <div className="cw__cat__d">{exempt ? "Runs without consent · legitimate interest" : c[id][1]}</div>
      </div>
      <div className="cw__cat__sw">
        <Switch checked={locked || exempt ? true : cats[id]} disabled={locked || exempt}
          onChange={() => !locked && !exempt && setCats((p) => ({ ...p, [id]: !p[id] }))} />
      </div>
    </div>
  );
}

function CookieWidget({ variant = "bar", lang = "en", showBadge = true, defaultExpanded = false, cookieless = {}, badgeVia = "cafe-lumiere.fr" }) {
  const [expanded, setExpanded] = React.useState(defaultExpanded);
  const [cats, setCats] = React.useState({ analytics: false, marketing: false, preferences: true });
  const s = STR[lang].banner;
  const c = STR[lang].cats;
  React.useEffect(() => { setExpanded(defaultExpanded); }, [variant, defaultExpanded]);

  const catProps = { c, cookieless, cats, setCats };

  return (
    <div className={"cw cw--" + variant + (expanded ? " is-expanded" : "")}>
      <div className="cw__inner">
        <div className="cw__main">
          <div className="cw__body">
            <h3 className="cw__title"><span className="ic"><Icon d={ICONS.cookie} size={18} /></span>{s.title}</h3>
            <p className="cw__text">{s.body} <a href="#" onClick={(e) => e.preventDefault()}>{s.policyLink} ↗</a></p>
            {expanded && (
              <div className="cw__cats">
                <CatRow id="necessary" locked {...catProps} />
                <CatRow id="analytics" {...catProps} />
                <CatRow id="marketing" {...catProps} />
                <CatRow id="preferences" {...catProps} />
              </div>
            )}
          </div>
          <div className="cw__actions">
            <button className="cw__btn cw__btn--accept" onClick={() => {}}>{s.accept}</button>
            <button className="cw__btn cw__btn--reject" onClick={() => {}}>{s.reject}</button>
            {expanded
              ? <button className="cw__btn cw__btn--reject" onClick={() => {}}>{s.save}</button>
              : <button className="cw__manage" onClick={() => setExpanded(true)}>{s.manage}</button>}
          </div>
        </div>
        {showBadge && (
          <a className="cw__badge" href={"https://mostlyprivacy.com/?ref=mc_badge&via=" + badgeVia} target="_blank" rel="noopener" onClick={(e) => e.preventDefault()} title="Get your own free cookie banner">
            <span className="bolt"><Icon d={ICONS.bolt} size={11} /></span>{s.poweredBy}&nbsp;<strong style={{ fontWeight: 700, color: "var(--fg-muted)" }}>MostlyCookie</strong>
          </a>
        )}
      </div>
    </div>
  );
}

/* ── Live policy document preview (localized) ──────────────────────────── */
function PolicyDoc({ lang = "en", org = "Café Lumière" }) {
  const p = STR[lang].policy;
  return (
    <div className="doc-paper">
      <div className="doc-paper__brandline">
        <span className="doc-paper__org">{org}</span>
        <span style={{ fontSize: 11, color: "var(--fg-subtle)", fontFamily: "var(--font-mono)" }}>EU · {lang.toUpperCase()}</span>
      </div>
      <h1 className="doc-h1">{p.title}</h1>
      <div className="doc-meta">{p.updated}: 10 Jun 2026 · {org}</div>
      <div className="doc-sec"><p>{p.intro.replace("{ORG}", org)}</p></div>
      {p.secs.map(([h, body], i) => (
        <div className="doc-sec" key={i}>
          <h2 className="doc-sec__h"><span className="num">{String(i + 1).padStart(2, "0")}</span>{h}</h2>
          <p>{body}</p>
        </div>
      ))}
    </div>
  );
}

/* ── Localized Terms of Service (compact, for the landing preview) ─────── */
const TERMS = {
  en: { title: "Terms of Service", updated: "Last updated",
    intro: "These Terms of Service govern your access to and use of {ORG} and form a binding agreement between you and us.",
    secs: [ ["Using the service", "By accessing our site you agree to these terms. Use the service lawfully and don't attempt to disrupt or misuse it."],
      ["Accounts", "You're responsible for activity under your account and for keeping your login details secure."],
      ["Liability", "The service is provided “as is.” To the extent permitted by law, we're not liable for indirect or consequential loss."] ] },
  de: { title: "Nutzungsbedingungen", updated: "Zuletzt aktualisiert",
    intro: "Diese Nutzungsbedingungen regeln Ihren Zugang zu und Ihre Nutzung von {ORG} und bilden eine verbindliche Vereinbarung zwischen Ihnen und uns.",
    secs: [ ["Nutzung des Dienstes", "Mit dem Zugriff auf unsere Website stimmen Sie diesen Bedingungen zu. Nutzen Sie den Dienst rechtmäßig und stören Sie ihn nicht."],
      ["Konten", "Sie sind für Aktivitäten unter Ihrem Konto und die Sicherheit Ihrer Anmeldedaten verantwortlich."],
      ["Haftung", "Der Dienst wird „wie besehen“ bereitgestellt. Soweit gesetzlich zulässig, haften wir nicht für indirekte Schäden."] ] },
  fr: { title: "Conditions d'utilisation", updated: "Dernière mise à jour",
    intro: "Ces conditions d'utilisation régissent votre accès à {ORG} et son utilisation, et constituent un accord contraignant entre vous et nous.",
    secs: [ ["Utilisation du service", "En accédant à notre site, vous acceptez ces conditions. Utilisez le service de manière licite et ne tentez pas de le perturber."],
      ["Comptes", "Vous êtes responsable de l'activité sur votre compte et de la sécurité de vos identifiants."],
      ["Responsabilité", "Le service est fourni « tel quel ». Dans la limite de la loi, nous ne sommes pas responsables des dommages indirects."] ] },
  it: { title: "Termini di servizio", updated: "Ultimo aggiornamento",
    intro: "I presenti Termini di servizio disciplinano l'accesso e l'uso di {ORG} e costituiscono un accordo vincolante tra te e noi.",
    secs: [ ["Uso del servizio", "Accedendo al nostro sito accetti questi termini. Usa il servizio in modo lecito e non tentare di comprometterlo."],
      ["Account", "Sei responsabile dell'attività sul tuo account e della sicurezza delle tue credenziali."],
      ["Responsabilità", "Il servizio è fornito “così com'è”. Nei limiti di legge, non siamo responsabili per danni indiretti."] ] },
};

function TermsDoc({ lang = "en", org = "Café Lumière" }) {
  const t = TERMS[lang];
  return (
    <div className="doc-paper">
      <div className="doc-paper__brandline">
        <span className="doc-paper__org">{org}</span>
        <span style={{ fontSize: 11, color: "var(--fg-subtle)", fontFamily: "var(--font-mono)" }}>EU · {lang.toUpperCase()}</span>
      </div>
      <h1 className="doc-h1">{t.title}</h1>
      <div className="doc-meta">{t.updated}: 10 Jun 2026 · {org}</div>
      <div className="doc-sec"><p>{t.intro.split("{ORG}")[0]}<span className="fill">{org}</span>{t.intro.split("{ORG}")[1]}</p></div>
      {t.secs.map(([h, body], i) => (
        <div className="doc-sec" key={i}>
          <h2 className="doc-sec__h"><span className="num">{String(i + 1).padStart(2, "0")}</span>{h}</h2>
          <p>{body}</p>
        </div>
      ))}
    </div>
  );
}

window.MP = Object.assign(window.MP || {}, {
  ICONS, Icon, PrivacyMark, MTMark, Wordmark, LANGS, STR, TERMS, LangSwitch, CookieWidget, PolicyDoc, TermsDoc,
});
