diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..9e89c76
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,68 @@
+name: CI
+
+on:
+ push:
+ branches: [main]
+ pull_request:
+
+permissions:
+ contents: read
+
+jobs:
+ web:
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: web
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: web/package-lock.json
+ - run: npm ci
+ - run: npm run lint
+ - run: npm run typecheck
+ - run: npm test
+ - run: npm run build
+ - run: npx playwright install --with-deps chromium
+ - run: npm run test:e2e
+ env:
+ CI: 'true'
+ - uses: actions/upload-artifact@v4
+ if: failure()
+ with:
+ name: playwright-report
+ path: web/test-results
+ retention-days: 7
+
+ site:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: |
+ web/package-lock.json
+ site/package-lock.json
+ - name: Build web app
+ working-directory: web
+ run: npm ci && npm run build
+ - name: Build and check documentation site
+ working-directory: site
+ run: |
+ npm ci
+ node build.mjs --out ../_site --app ../web/dist
+ node check.mjs --dir ../_site
+
+ gmail-addon:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ - run: node --test gmail-addon/detect.test.mjs
diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml
new file mode 100644
index 0000000..50fd8a2
--- /dev/null
+++ b/.github/workflows/pages.yml
@@ -0,0 +1,63 @@
+name: Deploy to GitHub Pages
+
+on:
+ push:
+ tags: ['v*']
+ workflow_dispatch:
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+concurrency:
+ group: pages
+ cancel-in-progress: false
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - uses: actions/setup-node@v4
+ with:
+ node-version: 22
+ cache: npm
+ cache-dependency-path: |
+ web/package-lock.json
+ site/package-lock.json
+ - name: Build web app
+ working-directory: web
+ run: |
+ npm ci
+ npm test
+ npm run build
+ env:
+ VITE_GOOGLE_CLIENT_ID: ${{ vars.GOOGLE_CLIENT_ID }}
+ VITE_GOOGLE_API_KEY: ${{ vars.GOOGLE_API_KEY }}
+ VITE_GOOGLE_APP_ID: ${{ vars.GOOGLE_APP_ID }}
+ - name: Build documentation site (app under /app/)
+ working-directory: site
+ run: |
+ npm ci
+ node build.mjs --out ../_site --app ../web/dist
+ node check.mjs --dir ../_site
+ - name: Checksums of every published file
+ run: node web/scripts/checksums.mjs _site
+ - uses: actions/upload-artifact@v4
+ with:
+ name: SHA256SUMS
+ path: _site/SHA256SUMS.txt
+ - uses: actions/upload-pages-artifact@v3
+ with:
+ path: _site
+
+ deploy:
+ needs: build
+ runs-on: ubuntu-latest
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+ steps:
+ - id: deployment
+ uses: actions/deploy-pages@v4
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..90dbb69
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+_site
+node_modules
diff --git a/README.md b/README.md
index 8ae3c03..17bb9f1 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,105 @@
# unpassword
-A Google Workspace app that removes passwords of Office, PDF files and compressed archives for archiving purposes.
+
+A Google Workspace app that removes the password protection of **Office (DOCX/XLSX/PPTX), PDF files and compressed archives (ZIP)** whose password you already know, for archiving purposes: you can archive them under your own protection (account security, encrypted storage, access policies) instead of a sender's file password.
+
+**Website and documentation:** . The web app runs at [`/app/`](https://nullthrone.github.io/unpassword/app/).
+
+**Zero-knowledge:** decryption and re-saving happen entirely in your browser. There is no backend. The provider of unpassword never receives your files, your passwords or the decrypted content.
+
+**Not a cracking tool:** unpassword requires the current password. It never guesses, enumerates or bypasses passwords, and it keeps protections that need a password you did not supply. See [Guardrails](#guardrails).
+
+## How it works
+
+```
+Browser (static web app) Google
+┌──────────────────────────────────────┐ ┌───────────────────────────┐
+│ UI ── Web Worker: qpdf (WASM), │ HTTPS │ Drive API (scope: │
+│ ECMA-376 Office crypto, zip.js │◄──────►│ drive.file), Picker, OAuth │
+│ – only place with password and │ └───────────────────────────┘
+│ plaintext │ ▲
+└──────────────────────────────────────┘ │ encrypted file only
+Gmail add-on (Apps Script) ── copies the still-encrypted ───────┘
+ attachment to Drive, opens the web app
+```
+
+- **Local mode:** pick or drop a file, enter the password, download the result. No Google sign-in, no Google scripts loaded.
+- **Drive mode:** "Open with → unpassword" in Drive, or "Choose from Google Drive". The result is saved next to the original as ` (unlocked).` (German UI: `(entsperrt)`). Optionally, the encrypted original goes to the trash.
+- **Gmail:** the add-on lists password-protected attachments. "Open in unpassword" stores the *encrypted* attachment in the Drive folder `unpassword – Eingang` and opens the web app on it.
+
+| Format | Supported protection | Result |
+|---|---|---|
+| PDF | Standard security handler: RC4 40/128, AES-128, AES-256 (R2–R6) | open password removed; see PDF permissions below |
+| DOCX/XLSX/PPTX (and macro variants) | ECMA-376 Agile and Standard encryption | unencrypted OOXML document |
+| ZIP | ZipCrypto, WinZip AES-128/192/256 | unencrypted ZIP with the same entries |
+
+Not supported: legacy binary Office (.doc/.xls/.ppt), 7z/RAR, certificate-based or DRM protection (Adobe LiveCycle, FileOpen, …), sheet/workbook protection, "read-only recommended".
+
+### PDF permissions
+
+PDFs have two passwords: the open (user) password and the permissions (owner) password.
+
+| You enter | File | Result |
+|---|---|---|
+| open password | no permission restrictions | fully decrypted |
+| open password | with restrictions (print, copy, …) | open password removed. The **restrictions are kept** (AES-256, empty open password, random owner password that is discarded) |
+| owner password | any | fully decrypted |
+| – | owner password only, no open password | refused: lifting restrictions requires the owner password |
+
+## Guardrails
+
+unpassword is built so that it is useless for attacking files you have no password for:
+
+- Exactly one typed password per attempt. There are no password lists, imports, generators or "common password" features. The static test `web/tests/guardrails.test.ts` fails if such code appears, including zip.js' password-candidate API.
+- Per-file rate limiting: two free failures, then 5 s, 10 s, 20 s … and a lock after ten failures for the session.
+- No export of hashes, verifiers or salts in any form.
+- Key-derivation parameters (e.g. Office spin counts) are used as stored in the file.
+- Only real encryption is removed with the password that controls it. Permission restrictions, DRM and structure protection are never bypassed.
+
+These limits run on your machine and are not a cryptographic boundary against a modified copy of the code. They make sure unpassword itself adds no attack capability: a determined attacker gains nothing from it they would not have without it. Details are in [docs/SECURITY.md](docs/SECURITY.md).
+
+## Repository layout
+
+```
+web/ static web app (Vite + TypeScript, no UI framework)
+ src/core/ format handlers, rate limiter – pure, DOM-free, unit tested
+ src/google/ OAuth (GIS), Picker, Drive REST client
+ tests/ Vitest unit tests + fixtures
+ e2e/ Playwright tests (local mode, Drive mode with mocked APIs, network assertions)
+gmail-addon/ Apps Script Gmail launcher (never decrypts)
+site/ documentation site for GitHub Pages: renders docs/ and the landing page, no JavaScript
+design/ Nullthrone Design System tokens and fonts (self-hosted), the unpassword mark and its PNG renderings
+scripts/ fixture generator, cross-check, brand asset renderer
+docs/ security model, privacy policy, terms, support, imprint, deployment setup
+```
+
+## Development
+
+```bash
+cd web
+npm ci
+npm run dev # local mode works without any Google configuration
+npm test # unit tests
+npm run test:e2e # Playwright (Chromium)
+npm run lint && npm run typecheck
+npm run build # dist/ + dist/SHA256SUMS.txt
+```
+
+Documentation site:
+
+```bash
+cd site && npm ci
+node build.mjs --app ../web/dist # writes ../_site (app under /app/)
+node check.mjs # CSP, no external resources, no broken links
+```
+
+Brand assets (icons, banner, Marketplace screenshots) are rendered by `node scripts/render-brand-assets.mjs` after `npm run build` in `web/`.
+
+Drive integration needs `VITE_GOOGLE_CLIENT_ID`, `VITE_GOOGLE_API_KEY` and `VITE_GOOGLE_APP_ID` (see [docs/SETUP.md](docs/SETUP.md)). Without them the app runs in local mode only.
+
+## Verifying a deployment
+
+The Pages workflow builds from a tagged commit and publishes `SHA256SUMS.txt` at the site root. Build the same tag locally with the same public Google identifiers and compare the checksums.
+
+## License
+
+MIT, see [LICENSE](LICENSE). Third-party components: [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
diff --git a/THIRD_PARTY_NOTICES.md b/THIRD_PARTY_NOTICES.md
new file mode 100644
index 0000000..0ce3bd8
--- /dev/null
+++ b/THIRD_PARTY_NOTICES.md
@@ -0,0 +1,30 @@
+# Third-party notices
+
+unpassword bundles the following components into the web app.
+
+| Component | License | Use |
+|---|---|---|
+| [qpdf](https://github.com/qpdf/qpdf) via [@neslinesli93/qpdf-wasm](https://github.com/neslinesli93/qpdf-wasm) | Apache-2.0 (qpdf), ISC (WASM packaging) | PDF decryption and re-encryption |
+| [@zip.js/zip.js](https://github.com/gildas-lormeau/zip.js) | BSD-3-Clause | ZIP reading and writing |
+| [cfb](https://github.com/SheetJS/js-cfb) | Apache-2.0 | Compound File Binary parsing (encrypted Office containers) |
+| [@noble/ciphers](https://github.com/paulmillr/noble-ciphers), [@noble/hashes](https://github.com/paulmillr/noble-hashes) | MIT | AES, SHA-1/SHA-2, HMAC for Office decryption |
+
+The web app and the documentation site additionally include:
+
+| Component | License | Use |
+|---|---|---|
+| [Jost](https://github.com/indestructible-type/Jost), [Public Sans](https://github.com/uswds/public-sans), [JetBrains Mono](https://github.com/JetBrains/JetBrainsMono) | SIL Open Font License 1.1 (texts in `design/nullthrone/fonts/`) | Typefaces, self-hosted (files taken from Fontsource) |
+| Nullthrone Design System | Nullthrone, used by its owner | Design tokens and brand marks in `design/` |
+| [marked](https://github.com/markedjs/marked) | MIT | Build-time Markdown rendering of the documentation site (not shipped) |
+
+The test suite additionally contains three sample documents from [msoffcrypto-tool](https://github.com/nolze/msoffcrypto-tool) (MIT): `web/tests/fixtures/office/standard.docx`, `office-agile.docx` and `office-agile.xlsx`.
+
+The full license texts are in each package's `LICENSE` file in `web/node_modules` after `npm ci`, and at the linked repositories.
+
+## Apache-2.0 notice (qpdf)
+
+qpdf is Copyright (c) 2005–2024 Jay Berkenbilt and contributors, licensed under the Apache License, Version 2.0. You may obtain a copy of the License at . Distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
+
+## Apache-2.0 notice (cfb)
+
+cfb is Copyright (C) 2013-present SheetJS LLC, licensed under the Apache License, Version 2.0.
diff --git a/design/nullthrone/README.md b/design/nullthrone/README.md
new file mode 100644
index 0000000..8af917b
--- /dev/null
+++ b/design/nullthrone/README.md
@@ -0,0 +1,21 @@
+# Nullthrone Design System (vendored)
+
+Tokens and brand assets from the Nullthrone Design System handoff (Claude Design export, 2026-10-04), used by the web app (`web/`) and the documentation site (`site/`).
+
+- `tokens/colors.css`, `typography.css`, `spacing.css`, `effects.css`, `motion.css` and `base.css` are copied unchanged.
+- `tokens/fonts.css` replaces the original Google Fonts import with self-hosted files in `fonts/` (Jost, Public Sans, JetBrains Mono, all SIL OFL 1.1). unpassword makes no third-party requests for fonts.
+- `assets/nullthrone-mark.svg` and `assets/nullthrone-lockup.svg` are the umbrella brand marks. They fill with `currentColor`.
+- `nullthrone.css` imports everything in the original order.
+
+## Rules that matter most
+
+These are summarised from the design system README.
+
+- Ink (`--ink-950`) on warm paper (`--paper`). Brass (`--brass-500`) is the single accent, used at most once per view for the primary call to action.
+- Corners are square. Structure comes from 1px hairlines. The double rule (two hairlines 3px apart) marks major section breaks.
+- Display type and uppercase labels use Jost with `--track-caps`. Body text uses Public Sans, code uses JetBrains Mono.
+- Shadows are near-flat. No gradients, no transparency, no blur, no emoji.
+- Dark mode inverts the primitives. It follows the OS preference, and `data-theme` overrides it.
+- Voice: declarative and precise. No hype, no hedging.
+
+Do not edit the copied token files. Override in the consuming stylesheet instead.
diff --git a/design/nullthrone/assets/nullthrone-lockup.svg b/design/nullthrone/assets/nullthrone-lockup.svg
new file mode 100644
index 0000000..a797932
--- /dev/null
+++ b/design/nullthrone/assets/nullthrone-lockup.svg
@@ -0,0 +1,24 @@
+
\ No newline at end of file
diff --git a/design/nullthrone/assets/nullthrone-mark.svg b/design/nullthrone/assets/nullthrone-mark.svg
new file mode 100644
index 0000000..010089e
--- /dev/null
+++ b/design/nullthrone/assets/nullthrone-mark.svg
@@ -0,0 +1,12 @@
+
\ No newline at end of file
diff --git a/design/nullthrone/fonts/LICENSE-jetbrains-mono.txt b/design/nullthrone/fonts/LICENSE-jetbrains-mono.txt
new file mode 100644
index 0000000..8f7ed67
--- /dev/null
+++ b/design/nullthrone/fonts/LICENSE-jetbrains-mono.txt
@@ -0,0 +1,93 @@
+Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono) JetBrainsMono-Italic[wght].ttf: Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/design/nullthrone/fonts/LICENSE-jost.txt b/design/nullthrone/fonts/LICENSE-jost.txt
new file mode 100644
index 0000000..2b531af
--- /dev/null
+++ b/design/nullthrone/fonts/LICENSE-jost.txt
@@ -0,0 +1,93 @@
+Copyright 2020 The Jost Project Authors (https://github.com/indestructible-type/Jost) Jost-Italic[wght].ttf: Copyright 2020 The Jost Project Authors (https://github.com/indestructible-type/Jost)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/design/nullthrone/fonts/LICENSE-public-sans.txt b/design/nullthrone/fonts/LICENSE-public-sans.txt
new file mode 100644
index 0000000..a6cb63a
--- /dev/null
+++ b/design/nullthrone/fonts/LICENSE-public-sans.txt
@@ -0,0 +1,93 @@
+Copyright 2015 The Public Sans Project Authors (https://github.com/uswds/public-sans) PublicSans-Italic[wght].ttf: Copyright 2015 The Public Sans Project Authors (https://github.com/uswds/public-sans)
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/design/nullthrone/fonts/jetbrains-mono-latin-400-normal.woff2 b/design/nullthrone/fonts/jetbrains-mono-latin-400-normal.woff2
new file mode 100644
index 0000000..5858873
Binary files /dev/null and b/design/nullthrone/fonts/jetbrains-mono-latin-400-normal.woff2 differ
diff --git a/design/nullthrone/fonts/jetbrains-mono-latin-500-normal.woff2 b/design/nullthrone/fonts/jetbrains-mono-latin-500-normal.woff2
new file mode 100644
index 0000000..be878e6
Binary files /dev/null and b/design/nullthrone/fonts/jetbrains-mono-latin-500-normal.woff2 differ
diff --git a/design/nullthrone/fonts/jost-latin-ext-wght-normal.woff2 b/design/nullthrone/fonts/jost-latin-ext-wght-normal.woff2
new file mode 100644
index 0000000..3c90baf
Binary files /dev/null and b/design/nullthrone/fonts/jost-latin-ext-wght-normal.woff2 differ
diff --git a/design/nullthrone/fonts/jost-latin-wght-normal.woff2 b/design/nullthrone/fonts/jost-latin-wght-normal.woff2
new file mode 100644
index 0000000..08a7b80
Binary files /dev/null and b/design/nullthrone/fonts/jost-latin-wght-normal.woff2 differ
diff --git a/design/nullthrone/fonts/public-sans-latin-ext-wght-italic.woff2 b/design/nullthrone/fonts/public-sans-latin-ext-wght-italic.woff2
new file mode 100644
index 0000000..9dcaba7
Binary files /dev/null and b/design/nullthrone/fonts/public-sans-latin-ext-wght-italic.woff2 differ
diff --git a/design/nullthrone/fonts/public-sans-latin-ext-wght-normal.woff2 b/design/nullthrone/fonts/public-sans-latin-ext-wght-normal.woff2
new file mode 100644
index 0000000..49ce111
Binary files /dev/null and b/design/nullthrone/fonts/public-sans-latin-ext-wght-normal.woff2 differ
diff --git a/design/nullthrone/fonts/public-sans-latin-wght-italic.woff2 b/design/nullthrone/fonts/public-sans-latin-wght-italic.woff2
new file mode 100644
index 0000000..068db26
Binary files /dev/null and b/design/nullthrone/fonts/public-sans-latin-wght-italic.woff2 differ
diff --git a/design/nullthrone/fonts/public-sans-latin-wght-normal.woff2 b/design/nullthrone/fonts/public-sans-latin-wght-normal.woff2
new file mode 100644
index 0000000..15b5f3d
Binary files /dev/null and b/design/nullthrone/fonts/public-sans-latin-wght-normal.woff2 differ
diff --git a/design/nullthrone/nullthrone.css b/design/nullthrone/nullthrone.css
new file mode 100644
index 0000000..4db26e2
--- /dev/null
+++ b/design/nullthrone/nullthrone.css
@@ -0,0 +1,8 @@
+/* Nullthrone Design System – entry point (order as in the original styles.css). */
+@import url('tokens/fonts.css');
+@import url('tokens/colors.css');
+@import url('tokens/typography.css');
+@import url('tokens/spacing.css');
+@import url('tokens/effects.css');
+@import url('tokens/motion.css');
+@import url('tokens/base.css');
diff --git a/design/nullthrone/tokens/base.css b/design/nullthrone/tokens/base.css
new file mode 100644
index 0000000..30f6f32
--- /dev/null
+++ b/design/nullthrone/tokens/base.css
@@ -0,0 +1,6 @@
+body{font-family:var(--font-body);font-size:var(--text-md);line-height:var(--leading-body);color:var(--text-body);background:var(--surface-page);margin:0;-webkit-font-smoothing:antialiased}
+h1,h2,h3,h4{font-family:var(--font-display);font-weight:var(--weight-display);line-height:var(--leading-tight);letter-spacing:var(--track-display);margin:0}
+code,pre{font-family:var(--font-mono)}
+a{color:var(--text-body);text-decoration:underline;text-decoration-color:var(--brass-500);text-underline-offset:3px;transition:color var(--dur-fast) var(--ease)}
+a:hover{color:var(--brass-600)}
+::selection{background:var(--brass-200)}
diff --git a/design/nullthrone/tokens/colors.css b/design/nullthrone/tokens/colors.css
new file mode 100644
index 0000000..7bcb2bf
--- /dev/null
+++ b/design/nullthrone/tokens/colors.css
@@ -0,0 +1,72 @@
+:root{
+color-scheme:light;
+/* Base — ink & paper */
+--ink-950:#141317;--ink-900:#1E1C21;--ink-700:#3A3740;--ink-500:#6E6B72;--ink-400:#928F96;--ink-300:#B6B3B8;--ink-200:#D9D6D3;--ink-100:#E9E6DF;
+--paper:#F4F2EC;--paper-raised:#FBFAF6;--paper-white:#FFFFFF;
+/* Brass — the single accent */
+--brass-700:#7A5A1F;--brass-600:#8F6B26;--brass-500:#A87E2F;--brass-400:#C09A4B;--brass-200:#E4D5AC;--brass-100:#EFE6CD;
+/* Signals — muted, architectural */
+--green-600:#2F6B4F;--green-100:#DFEAE3;
+--amber-600:#A05E14;--amber-100:#F3E5D2;
+--red-600:#8C2F2E;--red-100:#F0DDDC;
+/* Semantic aliases */
+--text-body:var(--ink-950);--text-muted:var(--ink-500);--text-faint:var(--ink-400);--text-inverse:var(--paper);--text-accent:var(--brass-600);
+--surface-page:var(--paper);--surface-card:var(--paper-raised);--surface-inset:var(--ink-100);--surface-inverse:var(--ink-950);
+--border-line:var(--ink-200);--border-strong:var(--ink-950);--border-mid:var(--ink-300);
+--accent:var(--brass-500);--accent-hover:var(--brass-600);--accent-active:var(--brass-700);
+--focus-ring:0 0 0 2px var(--paper),0 0 0 4px var(--brass-500);
+--ok:var(--green-600);--ok-bg:var(--green-100);--warn:var(--amber-600);--warn-bg:var(--amber-100);--danger:var(--red-600);--danger-bg:var(--red-100);
+--press-ink:#000000;--danger-hover:#7A2827;--danger-active:#682221;
+--overlay-scrim:rgba(20,19,23,.5);
+}
+
+/* Dark — the brand inverted at primitive level. ink and paper swap roles.
+ Ratios follow the kenny Fleet Console (t11z/kenny). Elevation is shadow, never a lighter plane. */
+[data-theme="dark"]{
+color-scheme:dark;
+--ink-950:#EFEDE7;--ink-900:#DEDBD4;--ink-700:#B4B0A9;--ink-500:#8A8781;--ink-400:#6E6B67;--ink-300:#4C4952;--ink-200:#33313A;--ink-100:#100F13;
+--paper:#17161A;--paper-raised:#1F1D22;--paper-white:#2B2930;
+--brass-700:#B98B36;--brass-600:#DCB768;--brass-500:#C89E4A;--brass-400:#8F6B26;--brass-200:#4A3A1B;--brass-100:#2A2110;
+--green-600:#6FA98C;--green-100:#1A2A23;
+--amber-600:#D9853C;--amber-100:#2C2117;
+--red-600:#CB6A62;--red-100:#2C1B1B;
+--press-ink:#8A8781;--danger-hover:#A9524E;--danger-active:#8E4341;
+--overlay-scrim:rgba(6,6,8,.66);
+}
+@media (prefers-color-scheme:dark){
+:root{
+color-scheme:dark;
+--ink-950:#EFEDE7;--ink-900:#DEDBD4;--ink-700:#B4B0A9;--ink-500:#8A8781;--ink-400:#6E6B67;--ink-300:#4C4952;--ink-200:#33313A;--ink-100:#100F13;
+--paper:#17161A;--paper-raised:#1F1D22;--paper-white:#2B2930;
+--brass-700:#B98B36;--brass-600:#DCB768;--brass-500:#C89E4A;--brass-400:#8F6B26;--brass-200:#4A3A1B;--brass-100:#2A2110;
+--green-600:#6FA98C;--green-100:#1A2A23;
+--amber-600:#D9853C;--amber-100:#2C2117;
+--red-600:#CB6A62;--red-100:#2C1B1B;
+--press-ink:#8A8781;--danger-hover:#A9524E;--danger-active:#8E4341;
+--overlay-scrim:rgba(6,6,8,.66);
+}
+}
+
+/* Light re-assertion — last in cascade so [data-theme="light"] wins over the OS-dark default,
+ letting a region turn back into the light inside a dark ground. */
+[data-theme="light"]{
+color-scheme:light;
+/* Base — ink & paper */
+--ink-950:#141317;--ink-900:#1E1C21;--ink-700:#3A3740;--ink-500:#6E6B72;--ink-400:#928F96;--ink-300:#B6B3B8;--ink-200:#D9D6D3;--ink-100:#E9E6DF;
+--paper:#F4F2EC;--paper-raised:#FBFAF6;--paper-white:#FFFFFF;
+/* Brass — the single accent */
+--brass-700:#7A5A1F;--brass-600:#8F6B26;--brass-500:#A87E2F;--brass-400:#C09A4B;--brass-200:#E4D5AC;--brass-100:#EFE6CD;
+/* Signals — muted, architectural */
+--green-600:#2F6B4F;--green-100:#DFEAE3;
+--amber-600:#A05E14;--amber-100:#F3E5D2;
+--red-600:#8C2F2E;--red-100:#F0DDDC;
+/* Semantic aliases */
+--text-body:var(--ink-950);--text-muted:var(--ink-500);--text-faint:var(--ink-400);--text-inverse:var(--paper);--text-accent:var(--brass-600);
+--surface-page:var(--paper);--surface-card:var(--paper-raised);--surface-inset:var(--ink-100);--surface-inverse:var(--ink-950);
+--border-line:var(--ink-200);--border-strong:var(--ink-950);--border-mid:var(--ink-300);
+--accent:var(--brass-500);--accent-hover:var(--brass-600);--accent-active:var(--brass-700);
+--focus-ring:0 0 0 2px var(--paper),0 0 0 4px var(--brass-500);
+--ok:var(--green-600);--ok-bg:var(--green-100);--warn:var(--amber-600);--warn-bg:var(--amber-100);--danger:var(--red-600);--danger-bg:var(--red-100);
+--press-ink:#000000;--danger-hover:#7A2827;--danger-active:#682221;
+--overlay-scrim:rgba(20,19,23,.5);
+}
diff --git a/design/nullthrone/tokens/effects.css b/design/nullthrone/tokens/effects.css
new file mode 100644
index 0000000..a81535f
--- /dev/null
+++ b/design/nullthrone/tokens/effects.css
@@ -0,0 +1,34 @@
+:root{
+/* Corners are square. --radius-1 exists only for tiny inner elements. */
+--radius-0:0px;--radius-1:2px;
+--line:1px solid var(--border-line);--line-strong:1px solid var(--border-strong);
+--shadow-1:0 1px 2px rgba(20,19,23,.07);--shadow-2:0 2px 8px rgba(20,19,23,.10);--shadow-3:0 12px 32px rgba(20,19,23,.16);
+--ease:cubic-bezier(.2,0,0,1);/* @kind other */
+--dur-fast:120ms;/* @kind other */
+--dur-med:200ms;/* @kind other */
+--dur-slow:320ms;/* @kind other */
+}
+
+[data-theme="dark"]{
+--shadow-1:0 1px 2px rgba(0,0,0,.45);
+--shadow-2:0 2px 10px rgba(0,0,0,.55);
+--shadow-3:0 14px 38px rgba(0,0,0,.66);
+}
+@media (prefers-color-scheme:dark){
+:root{
+--shadow-1:0 1px 2px rgba(0,0,0,.45);
+--shadow-2:0 2px 10px rgba(0,0,0,.55);
+--shadow-3:0 14px 38px rgba(0,0,0,.66);
+}
+}
+
+[data-theme="light"]{
+/* Corners are square. --radius-1 exists only for tiny inner elements. */
+--radius-0:0px;--radius-1:2px;
+--line:1px solid var(--border-line);--line-strong:1px solid var(--border-strong);
+--shadow-1:0 1px 2px rgba(20,19,23,.07);--shadow-2:0 2px 8px rgba(20,19,23,.10);--shadow-3:0 12px 32px rgba(20,19,23,.16);
+--ease:cubic-bezier(.2,0,0,1);/* @kind other */
+--dur-fast:120ms;/* @kind other */
+--dur-med:200ms;/* @kind other */
+--dur-slow:320ms;/* @kind other */
+}
diff --git a/design/nullthrone/tokens/fonts.css b/design/nullthrone/tokens/fonts.css
new file mode 100644
index 0000000..e98e16e
--- /dev/null
+++ b/design/nullthrone/tokens/fonts.css
@@ -0,0 +1,11 @@
+/* Self-hosted webfonts (SIL OFL 1.1, see ../fonts/LICENSE-*.txt).
+ Replaces the design system's Google Fonts import: no third-party request,
+ no IP address leaves for a font CDN. Family names match tokens/typography.css. */
+@font-face{font-family:'Jost';font-style:normal;font-weight:100 900;font-display:swap;src:url('../fonts/jost-latin-wght-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
+@font-face{font-family:'Public Sans';font-style:normal;font-weight:100 900;font-display:swap;src:url('../fonts/public-sans-latin-wght-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
+@font-face{font-family:'Public Sans';font-style:italic;font-weight:100 900;font-display:swap;src:url('../fonts/public-sans-latin-wght-italic.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
+@font-face{font-family:'Jost';font-style:normal;font-weight:100 900;font-display:swap;src:url('../fonts/jost-latin-ext-wght-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
+@font-face{font-family:'Public Sans';font-style:normal;font-weight:100 900;font-display:swap;src:url('../fonts/public-sans-latin-ext-wght-normal.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
+@font-face{font-family:'Public Sans';font-style:italic;font-weight:100 900;font-display:swap;src:url('../fonts/public-sans-latin-ext-wght-italic.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
+@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:400;font-display:swap;src:url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
+@font-face{font-family:'JetBrains Mono';font-style:normal;font-weight:500;font-display:swap;src:url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
diff --git a/design/nullthrone/tokens/motion.css b/design/nullthrone/tokens/motion.css
new file mode 100644
index 0000000..e8c33a7
--- /dev/null
+++ b/design/nullthrone/tokens/motion.css
@@ -0,0 +1,5 @@
+/* Motion primitives — fades and small translates only; no bounces. */
+@keyframes nt-fade-up{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
+@keyframes nt-fade-in{from{opacity:0}to{opacity:1}}
+@keyframes nt-bar-pulse{0%,100%{transform:scaleY(.35);opacity:.5}50%{transform:scaleY(1);opacity:1}}
+@keyframes nt-indeterminate{0%{left:-35%}100%{left:100%}}
diff --git a/design/nullthrone/tokens/spacing.css b/design/nullthrone/tokens/spacing.css
new file mode 100644
index 0000000..5cbe695
--- /dev/null
+++ b/design/nullthrone/tokens/spacing.css
@@ -0,0 +1,5 @@
+:root{
+--space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:24px;--space-6:32px;--space-7:48px;--space-8:64px;--space-9:96px;
+--control-h-sm:28px;--control-h-md:36px;--control-h-lg:44px;
+--container-max:1120px;--container-pad:var(--space-6);
+}
diff --git a/design/nullthrone/tokens/typography.css b/design/nullthrone/tokens/typography.css
new file mode 100644
index 0000000..f36deef
--- /dev/null
+++ b/design/nullthrone/tokens/typography.css
@@ -0,0 +1,12 @@
+:root{
+--font-display:'Jost',system-ui,sans-serif;
+--font-body:'Public Sans',system-ui,sans-serif;
+--font-mono:'JetBrains Mono',ui-monospace,monospace;
+/* Scale */
+--display-xl:56px;--display-lg:40px;--display-md:28px;--display-sm:20px;
+--text-lg:18px;--text-md:15px;--text-sm:13px;--text-xs:11px;
+/* Tracking — letterspaced caps are a core brand motif */
+--track-caps:0.14em;--track-caps-wide:0.22em;--track-display:0.01em;
+--leading-tight:1.15;--leading-body:1.55;
+--weight-display:500;--weight-body:400;--weight-strong:600;
+}
diff --git a/design/unpassword/README.md b/design/unpassword/README.md
new file mode 100644
index 0000000..534c20e
--- /dev/null
+++ b/design/unpassword/README.md
@@ -0,0 +1,15 @@
+# unpassword mark
+
+The mark is an open padlock drawn in the Nullthrone formal language:
+
+- The **shackle** has stepped Art Deco shoulders, like the stepped head of the Nullthrone monogram. Its right leg is lifted out of the body: the lock is open.
+- The **keyhole** is the monogram's arched "0" opening.
+- The **cap bar** above the body and the slanted **side columns** repeat the throne silhouette.
+
+| File | Use |
+|---|---|
+| `mark.svg` | Full mark, ≥ 48 px. Fills with `currentColor`. |
+| `mark-small.svg` | Reduced mark without cap bar and columns, for ≤ 32 px (favicons, toolbar). `currentColor`. |
+| `favicon.svg` | Small mark with built-in light/dark colours. |
+
+Colours: ink, paper or brass only (see `design/nullthrone`). Keep a clear space of a quarter of the mark's width. PNG renderings (Marketplace icons, banner, social card, add-on logo) are generated by `scripts/render-brand-assets.mjs`.
diff --git a/design/unpassword/favicon.svg b/design/unpassword/favicon.svg
new file mode 100644
index 0000000..1f5c269
--- /dev/null
+++ b/design/unpassword/favicon.svg
@@ -0,0 +1,5 @@
+
diff --git a/design/unpassword/mark-small.svg b/design/unpassword/mark-small.svg
new file mode 100644
index 0000000..cc21741
--- /dev/null
+++ b/design/unpassword/mark-small.svg
@@ -0,0 +1,5 @@
+
diff --git a/design/unpassword/mark.svg b/design/unpassword/mark.svg
new file mode 100644
index 0000000..1e02eb5
--- /dev/null
+++ b/design/unpassword/mark.svg
@@ -0,0 +1,10 @@
+
diff --git a/design/unpassword/png/banner-220x140.png b/design/unpassword/png/banner-220x140.png
new file mode 100644
index 0000000..8a273de
Binary files /dev/null and b/design/unpassword/png/banner-220x140.png differ
diff --git a/design/unpassword/png/icon-128.png b/design/unpassword/png/icon-128.png
new file mode 100644
index 0000000..047be52
Binary files /dev/null and b/design/unpassword/png/icon-128.png differ
diff --git a/design/unpassword/png/icon-16.png b/design/unpassword/png/icon-16.png
new file mode 100644
index 0000000..295fafc
Binary files /dev/null and b/design/unpassword/png/icon-16.png differ
diff --git a/design/unpassword/png/icon-32.png b/design/unpassword/png/icon-32.png
new file mode 100644
index 0000000..17d1466
Binary files /dev/null and b/design/unpassword/png/icon-32.png differ
diff --git a/design/unpassword/png/icon-48.png b/design/unpassword/png/icon-48.png
new file mode 100644
index 0000000..db24ab6
Binary files /dev/null and b/design/unpassword/png/icon-48.png differ
diff --git a/design/unpassword/png/icon-96.png b/design/unpassword/png/icon-96.png
new file mode 100644
index 0000000..480ccf7
Binary files /dev/null and b/design/unpassword/png/icon-96.png differ
diff --git a/design/unpassword/png/screenshot-1-pick.png b/design/unpassword/png/screenshot-1-pick.png
new file mode 100644
index 0000000..9098387
Binary files /dev/null and b/design/unpassword/png/screenshot-1-pick.png differ
diff --git a/design/unpassword/png/screenshot-2-password.png b/design/unpassword/png/screenshot-2-password.png
new file mode 100644
index 0000000..e4c0b0c
Binary files /dev/null and b/design/unpassword/png/screenshot-2-password.png differ
diff --git a/design/unpassword/png/screenshot-3-result.png b/design/unpassword/png/screenshot-3-result.png
new file mode 100644
index 0000000..8e0af97
Binary files /dev/null and b/design/unpassword/png/screenshot-3-result.png differ
diff --git a/design/unpassword/png/social-card.png b/design/unpassword/png/social-card.png
new file mode 100644
index 0000000..b848604
Binary files /dev/null and b/design/unpassword/png/social-card.png differ
diff --git a/docs/IMPRINT.md b/docs/IMPRINT.md
new file mode 100644
index 0000000..2acab48
--- /dev/null
+++ b/docs/IMPRINT.md
@@ -0,0 +1,20 @@
+# Imprint
+
+_Impressum – Angaben gemäß § 5 DDG_
+
+Thomas Sprock
+Am Kleikamp 26
+31319 Sehnde
+Germany
+
+**Contact / Kontakt**
+Email: [github@nullthrone.xyz](mailto:github@nullthrone.xyz)
+
+**Responsible for the content / Verantwortlich für den Inhalt nach § 18 Abs. 2 MStV**
+Thomas Sprock, address as above.
+
+unpassword is an open-source project published under the Nullthrone name. It is free of charge and not a commercial offering.
+
+## Liability for links
+
+This site links to external websites, such as GitHub and Google. We have no influence on their content, and their operators are responsible for it. At the time of linking, no infringements were apparent. If we become aware of an infringement, we remove the link.
diff --git a/docs/PRIVACY.md b/docs/PRIVACY.md
new file mode 100644
index 0000000..fe07387
--- /dev/null
+++ b/docs/PRIVACY.md
@@ -0,0 +1,52 @@
+# Privacy policy
+
+_Last updated: 2026-10-06_
+
+unpassword is designed so that its provider cannot access your data.
+
+## Controller
+
+Thomas Sprock, Am Kleikamp 26, 31319 Sehnde, Germany. Email: [github@nullthrone.xyz](mailto:github@nullthrone.xyz). See also the [imprint](IMPRINT.md).
+
+## What unpassword processes
+
+- **Files and passwords** you select or enter are processed **only in your browser**, in a web worker. They are never sent to the provider of unpassword. There is no unpassword server.
+- **Google Drive (optional):** if you choose Drive, your browser obtains an OAuth access token from Google with the scope `https://www.googleapis.com/auth/drive.file`. That scope only covers files you select in the Google Picker or open with unpassword, and files unpassword creates. Your browser downloads the selected (encrypted) file directly from Google and, on your request, uploads the decrypted copy directly to your Drive. The token is kept in memory and discarded when you close the page.
+- **Gmail add-on (optional):** when you open a message, the add-on reads the attachments of **that message only** (`gmail.addons.current.message.readonly`) to detect password protection. If you click "Open in unpassword", it copies the **still-encrypted** attachment into a Drive folder named "unpassword – Eingang" (`drive.file`) and opens the web app. The add-on never receives passwords or decrypted content.
+
+## What unpassword does not do
+
+- No analytics, telemetry, error reporting, cookies or tracking.
+- No third-party fonts or content delivery networks. Fonts are served from this site.
+- No storage of files, passwords or results in the browser (no localStorage/IndexedDB) or anywhere else.
+- No sharing or sale of data. The provider has none.
+
+## Google API Services User Data Policy
+
+unpassword's use of information received from Google APIs adheres to the [Google API Services User Data Policy](https://developers.google.com/terms/api-services-user-data-policy), including the Limited Use requirements. Data from Google APIs is used only to provide the user-facing features described above and is never transferred to the provider or any third party.
+
+## Hosting
+
+This website and the web app are static files served by GitHub Pages, operated by GitHub, Inc., USA. To deliver the pages, GitHub processes technical access data: IP address, time, requested file and browser identification. GitHub may store this data in server logs. The logs contain no file content and no passwords. The legal basis is Art. 6(1)(f) GDPR, our legitimate interest in delivering the site securely. Details are in the [GitHub General Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement).
+
+The documentation pages contain no scripts. The web app loads scripts only from this site, and from Google only when you choose to use Google Drive.
+
+## Legal basis
+
+- Processing in your browser is not processing by the provider, who receives no data.
+- Google Drive and Gmail access happens at your request, to provide the function you asked for: Art. 6(1)(b) GDPR. The access is between your browser or Google account and Google.
+- Hosting: Art. 6(1)(f) GDPR, see above.
+
+## Your rights
+
+Under the GDPR you have the right of access (Art. 15), rectification (Art. 16), erasure (Art. 17), restriction of processing (Art. 18), data portability (Art. 20) and objection (Art. 21). Because the provider stores no personal data about you, these rights will usually concern GitHub or Google directly. Contact us at the address above for any request.
+
+You also have the right to lodge a complaint with a supervisory authority. For the provider, this is the [Landesbeauftragte für den Datenschutz Niedersachsen](https://www.lfd.niedersachsen.de).
+
+## Revoking access
+
+Remove unpassword's access at . Files unpassword created remain in your Drive until you delete them.
+
+## Contact
+
+Email [github@nullthrone.xyz](mailto:github@nullthrone.xyz), or open an issue at .
diff --git a/docs/SECURITY.md b/docs/SECURITY.md
new file mode 100644
index 0000000..c32ef79
--- /dev/null
+++ b/docs/SECURITY.md
@@ -0,0 +1,54 @@
+# Security model
+
+## Goals
+
+1. **Confidentiality towards the provider (zero-knowledge).** Whoever builds and hosts unpassword never gets access to files, passwords or plaintext.
+2. **Legitimate use only.** unpassword removes protection only with the password that controls it, and it is useless as a password-guessing tool.
+3. **Integrity of results.** Output is verified before it is offered: re-encrypted PDFs are re-inspected, Office packages carry an HMAC check, ZIP entries are CRC/MAC-checked.
+
+## Trust boundaries
+
+| Component | Sees plaintext or password? | Notes |
+|---|---|---|
+| unpassword provider / hosting (GitHub Pages) | no | serves static files only; no backend, no logging endpoint, no analytics |
+| Browser, web worker | yes | the only place where decryption happens |
+| Google (Drive, GIS, Picker scripts) | Drive mode only: plaintext when **you** save to Drive | Google already stores your files; the password never goes to Google |
+| Gmail add-on (Apps Script, runs on Google servers) | no | handles only the encrypted attachment |
+
+### Enforcement
+
+- **Content Security Policy** (`web/vite.config.ts`, injected into the built `index.html`): `connect-src` allows only this origin and Google's API hosts. Even a compromised dependency cannot send data anywhere else from the page or the worker. `object-src 'none'`, `base-uri 'none'` and `form-action 'none'` close other channels. The CSP is delivered via `` because GitHub Pages cannot set headers, so `frame-ancestors` is not available. Host it behind a server that sets headers if you need it.
+- **Worker isolation.** Passwords and plaintext are processed in a dedicated worker (`web/src/worker.ts`). The main thread holds the password only between the input field and `postMessage`, and the field is cleared immediately.
+- **No persistence.** ESLint forbids `localStorage`, `sessionStorage` and `indexedDB` in `src/`. Nothing is cached. Buffers are overwritten after use as far as JavaScript allows. Garbage-collected copies cannot be wiped reliably.
+- **Local mode loads no third-party code.** Google scripts are loaded only when the user chooses Drive.
+- **Minimal OAuth scope.** `drive.file` grants access only to files the user picks or that unpassword creates. Tokens stay in memory.
+- **Static guardrail tests** (`web/tests/guardrails.test.ts`) fail the build if source code references non-Google endpoints, uses `fetch` outside the Drive client, or contains password-guessing features.
+- **E2E network assertions** (`web/e2e/`) check that in local mode every request stays on the app origin, and in Drive mode only Google API hosts are contacted. They also check that the password never appears in any URL or request body.
+
+### Residual risks
+
+- Google's GIS and Picker scripts run with page privileges in Drive mode. This is inherent to any Drive web app. Use local mode if you do not want any third-party script on the page.
+- A malicious browser extension or a compromised device can read anything the page can.
+- Supply chain: dependencies are few, pinned via `package-lock.json`, and bundled at build time. No code is loaded from CDNs at runtime except Google's scripts in Drive mode.
+
+## Anti-misuse design
+
+| Measure | Where |
+|---|---|
+| One password per call, no candidate lists | `Unlocker` type in `src/core/types.ts`; zip.js is used through its core API with a single `password` |
+| Rate limit: 2 free failures, then exponential delay from 5 s, lock after 10 | `src/core/guard.ts`, applied in `src/core/session.ts` inside the worker |
+| Wrong ZipCrypto passwords that pass the 1-byte check are still rejected | CRC verification, test with 600 wrong passwords in `tests/zip.test.ts` |
+| PDF restrictions preserved without the owner password | `src/core/pdf/policy.ts` (pure, table-tested), with verification after re-encryption |
+| No owner-password recovery, no "remove restrictions only" mode | policy refuses `owner-password-required` |
+| No hash or verifier export | guardrail test |
+| Unsupported protection is refused rather than worked around | DRM / certificate handlers → `unsupported` |
+
+The guard is client-side code. Someone can delete it from their own copy. That is accepted: the goal is that unpassword provides no attack capability, and the cryptographic work an attacker faces is identical with or without it.
+
+### Password encodings
+
+For PDF R2–R4 the password must be PDFDocEncoding bytes, for R5/R6 UTF-8. Producers are inconsistent, so the PDF handler passes the *same typed password* to qpdf in up to four byte encodings (UTF-8 NFC, PDFDocEncoding, UTF-8 NFKC, UTF-8 as typed). This is representation, not guessing. The set is fixed, derived only from the user's input, and counts as one attempt.
+
+## Reporting vulnerabilities
+
+Please open a private security advisory on GitHub rather than a public issue.
diff --git a/docs/SETUP.md b/docs/SETUP.md
new file mode 100644
index 0000000..cd37da5
--- /dev/null
+++ b/docs/SETUP.md
@@ -0,0 +1,87 @@
+# Deployment setup
+
+unpassword consists of a static web app and an optional Gmail add-on. Both must belong to the **same Google Cloud project**: `drive.file` grants are per project, and that is what lets the web app open the encrypted attachment the add-on stored.
+
+These steps need a Google account with access to the Cloud console and, for Marketplace publication, a Google Workspace Marketplace developer registration.
+
+## 1. Google Cloud project
+
+1. Create a project in the [Cloud console](https://console.cloud.google.com/) and note its **project number**. That number is `VITE_GOOGLE_APP_ID`.
+2. Enable the **Google Drive API**, **Google Picker API**, **Gmail API** (for the add-on) and **Google Workspace Marketplace SDK**.
+3. **OAuth consent screen:** set the app name to *unpassword*, add the privacy policy URL (`docs/PRIVACY.md` on GitHub or a published copy) and the scopes:
+ - `https://www.googleapis.com/auth/drive.file`
+ - `https://www.googleapis.com/auth/gmail.addons.execute`
+ - `https://www.googleapis.com/auth/gmail.addons.current.message.readonly`
+4. **OAuth client ID** of type *Web application*:
+ - Authorized JavaScript origin: `https://.github.io` (or your domain).
+ - This is `VITE_GOOGLE_CLIENT_ID`.
+5. **API key:** restrict it to *HTTP referrers* `https://.github.io/*` (the app sends only its origin as referrer, `strict-origin`) and to the *Google Picker API*. This is `VITE_GOOGLE_API_KEY`.
+
+None of these three values is secret. They end up in the public JavaScript bundle by design, and the restrictions above are what protect them.
+
+## 2. Web app (GitHub Pages)
+
+1. In the repository settings, go to *Pages* and set *Source* to **GitHub Actions**.
+2. In *Settings → Secrets and variables → Actions → Variables*, add `GOOGLE_CLIENT_ID`, `GOOGLE_API_KEY` and `GOOGLE_APP_ID`.
+3. Push a tag `v*` (e.g. `v0.1.0`), or run the workflow manually. `.github/workflows/pages.yml` builds the web app and the documentation site, then deploys both:
+ - `https://.github.io/unpassword/` – documentation site (`site/`, rendered from `docs/`)
+ - `https://.github.io/unpassword/app/` – the web app (`web/`)
+ - `https://.github.io/unpassword/SHA256SUMS.txt` – checksums of every published file, also attached to the workflow run
+
+To host elsewhere, build the same way (`site/build.mjs --app web/dist`) and serve `_site/` statically. If your server can set headers, also send the CSP from `web/vite.config.ts` as an HTTP header, plus `frame-ancestors 'none'`.
+
+## 3. Drive "Open with" integration
+
+In the Cloud console, open *Google Workspace Marketplace SDK* and then *App Configuration*:
+
+1. Enable **Drive app** integration.
+2. **Open URL:** `https://.github.io/unpassword/app/`. Drive appends `?state={"ids":[…],"action":"open",…}`, which the app reads (`web/src/google/drive.ts` → `launchFileId`).
+3. **Default MIME types:** `application/pdf`, `application/zip`
+ **Secondary MIME types:** `application/x-zip-compressed`, `application/octet-stream`, `application/x-ole-storage`, `application/vnd.ms-office`, `application/encrypted`, `application/vnd.openxmlformats-officedocument.wordprocessingml.document`, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/vnd.openxmlformats-officedocument.presentationml.presentation`
+ **File extensions:** `pdf`, `zip`, `docx`, `xlsx`, `pptx`, `docm`, `xlsm`, `pptm`
+4. Leave "Creating files" disabled. unpassword only opens existing files.
+
+## 4. Gmail add-on
+
+```bash
+npm install -g @google/clasp
+cd gmail-addon
+clasp login
+clasp create --type standalone --title unpassword # or copy .clasp.json.example and set scriptId
+clasp push
+```
+
+1. In the Apps Script editor, open *Project Settings* and set the **Google Cloud Platform project** to the project number from step 1 (same project as the web app).
+2. Optionally, in *Project Settings → Script properties*, set `UNPASSWORD_WEB_URL` if the web app is not at `https://nullthrone.github.io/unpassword/app/`. Update `openLinkUrlPrefixes` and `logoUrl` in `appsscript.json` to match.
+3. Choose *Deploy → Test deployments → Install* and open a message with a protected attachment in Gmail.
+4. For Marketplace publication, add the deployment ID under *Marketplace SDK → App Configuration → Gmail add-on*.
+
+## 5. Marketplace listing
+
+The documentation site is the listing's reference. Use these values in *Marketplace SDK → Store Listing* and on the OAuth consent screen:
+
+| Field | Value |
+|---|---|
+| Application name | unpassword |
+| Short description | Remove passwords you already know from PDF, Office and ZIP files – decrypted in your browser, zero-knowledge. |
+| Category | Productivity / Utilities |
+| Application homepage / Developer website | `https://nullthrone.github.io/unpassword/` |
+| Privacy policy URL | `https://nullthrone.github.io/unpassword/privacy/` |
+| Terms of service URL | `https://nullthrone.github.io/unpassword/terms/` |
+| Support URL | `https://nullthrone.github.io/unpassword/support/` |
+| Developer name / email | Nullthrone · Thomas Sprock, `github@nullthrone.xyz` (see `/imprint/`) |
+| Application icons 32/48/96/128 | `brand/icon-32.png`, `icon-48.png`, `icon-96.png`, `icon-128.png` |
+| Card banner 220 × 140 | `brand/banner-220x140.png` |
+| Screenshots 1280 × 800 | `brand/screenshot-1-pick.png`, `-2-password.png`, `-3-result.png` |
+| Authorized domain (OAuth consent) | `nullthrone.github.io` |
+
+All graphics are listed with previews on `/marketplace/`. They are generated from `design/unpassword/` by `scripts/render-brand-assets.mjs`; rerun it after changing the mark or the app's look.
+
+- In the description, state the legitimate purpose plainly: removing **known** passwords for personal archiving. The guardrails on the homepage are written to be quoted in the review.
+- Expect an OAuth verification for the Gmail scopes. `drive.file` is a non-sensitive scope.
+
+## 6. Check after deployment
+
+- Local mode: drop a protected file and unlock it. In the browser's network panel, verify that no request leaves the page's origin.
+- Drive: use "Open with → unpassword" on a protected PDF in Drive, then save. The new file should appear next to the original.
+- Gmail: open a message with a protected ZIP, choose *Open in unpassword*, and confirm that the encrypted copy lands in "unpassword – Eingang" and the web app opens it.
diff --git a/docs/SUPPORT.md b/docs/SUPPORT.md
new file mode 100644
index 0000000..d30c840
--- /dev/null
+++ b/docs/SUPPORT.md
@@ -0,0 +1,36 @@
+# Support
+
+unpassword is maintained as an open-source project. Support is provided on a best-effort basis; there is no guaranteed response time.
+
+## Where to ask
+
+| Topic | Channel |
+|---|---|
+| Bugs, questions, feature requests | [GitHub issues](https://github.com/nullthrone/unpassword/issues) |
+| Security vulnerabilities | [Private security advisory](https://github.com/nullthrone/unpassword/security/advisories/new). Please do not open a public issue. |
+| Privacy requests, everything else | [github@nullthrone.xyz](mailto:github@nullthrone.xyz) |
+
+Never send us an encrypted file together with its password, and never send us a decrypted file. We do not need either to help you, and we will not ask for them. Describe the file instead: its format, the program that created it, and the exact error message.
+
+## Common situations
+
+**"The password is incorrect."**
+unpassword checks the password exactly as typed. Check the keyboard layout and Caps Lock. For PDFs, both the open password and the owner password are accepted.
+
+**"Too many failed attempts."**
+After two failed attempts, unpassword waits before each further attempt. After ten failures the file is locked for the current session. Reload the page to start a new session. The limit exists so that unpassword cannot be used to guess passwords.
+
+**"Owner password required."**
+The PDF opens without a password and is only restricted, for example against printing or copying. Lifting these restrictions requires the owner password. unpassword does not bypass them.
+
+**"Format or protection scheme not supported."**
+The following are supported: PDF (standard security handler), encrypted DOCX/XLSX/PPTX, and ZIP (ZipCrypto, WinZip AES). The following are not: legacy .doc/.xls/.ppt, 7z/RAR, DRM and certificate-based protection.
+
+**The integrity-check warning (Office).**
+The password was correct and the content was decrypted. However, the file's integrity code does not match. Either the file was modified after encryption, or the program that wrote it is faulty. Compare the content with the original before deleting anything.
+
+**"Saved to My Drive" instead of next to the original.**
+unpassword only has access to files you open with it (`drive.file`). If it may not write into the original's folder, it saves to the root of My Drive.
+
+**Revoking access.**
+Open [Google Account → Third-party apps](https://myaccount.google.com/connections) and remove unpassword. Files unpassword created stay in your Drive.
diff --git a/docs/TERMS.md b/docs/TERMS.md
new file mode 100644
index 0000000..01dbdd3
--- /dev/null
+++ b/docs/TERMS.md
@@ -0,0 +1,47 @@
+# Terms of Service
+
+_Last updated: 2026-10-06_
+
+These terms apply to the use of unpassword, which consists of the web application at `https://nullthrone.github.io/unpassword/app/` and the unpassword Gmail add-on. unpassword is provided by Thomas Sprock (Nullthrone), see the [imprint](IMPRINT.md).
+
+## 1. The service
+
+unpassword removes the password protection of PDF, Office and ZIP files in your browser, using a password you supply. It is free of charge.
+
+The source code is published under the [MIT License](https://github.com/nullthrone/unpassword/blob/main/LICENSE). The license governs the code. These terms govern the hosted service.
+
+## 2. Permitted use
+
+You may use unpassword only for files that you are entitled to unlock, with a password you obtained lawfully. Typical examples are statements, payslips or reports addressed to you.
+
+You must not use unpassword to:
+
+- access files you are not authorised to open;
+- circumvent technical protection measures of third parties, for example under § 95a of the German Copyright Act (UrhG) or comparable laws;
+- determine, guess or test passwords you do not know.
+
+unpassword is designed to support only legitimate use. It accepts one typed password per attempt, limits failed attempts, and preserves PDF permission restrictions unless you supply the owner password.
+
+## 3. Your responsibility
+
+Removing a password removes a layer of protection. You are responsible for storing the unlocked file securely, for example in an account protected by two-factor authentication or in encrypted storage. You are also responsible for keeping a copy of the original until you have checked the result.
+
+## 4. No access to your data
+
+Decryption runs entirely in your browser. The provider does not receive your files, your passwords or the decrypted content. See the [privacy policy](PRIVACY.md) and the [security model](SECURITY.md).
+
+## 5. Google services
+
+If you use Google Drive or Gmail with unpassword, Google's terms of service and privacy policy also apply to those services.
+
+## 6. Availability and changes
+
+unpassword is provided as is, without any commitment to availability, features or support. We may change or discontinue the service at any time.
+
+## 7. Liability
+
+unpassword is provided free of charge. The provider is liable only for intent and gross negligence. This does not limit liability for injury to life, body or health, or liability under mandatory statutory provisions such as the German Product Liability Act.
+
+## 8. Final provisions
+
+German law applies, excluding the UN Convention on Contracts for the International Sale of Goods. If you are a consumer, this choice of law does not deprive you of the protection of mandatory provisions of the law of your country of habitual residence. If any provision is invalid, the remaining provisions stay in effect.
diff --git a/gmail-addon/.clasp.json.example b/gmail-addon/.clasp.json.example
new file mode 100644
index 0000000..8accdcd
--- /dev/null
+++ b/gmail-addon/.clasp.json.example
@@ -0,0 +1,4 @@
+{
+ "scriptId": "YOUR_SCRIPT_ID",
+ "rootDir": "."
+}
diff --git a/gmail-addon/.claspignore b/gmail-addon/.claspignore
new file mode 100644
index 0000000..71e5788
--- /dev/null
+++ b/gmail-addon/.claspignore
@@ -0,0 +1,3 @@
+**/**
+!appsscript.json
+!Code.js
diff --git a/gmail-addon/Code.js b/gmail-addon/Code.js
new file mode 100644
index 0000000..269a386
--- /dev/null
+++ b/gmail-addon/Code.js
@@ -0,0 +1,171 @@
+/**
+ * unpassword – Gmail launcher.
+ *
+ * This add-on never decrypts anything and never sees a password. It lists the
+ * attachments of the open message that look password-protected and, on
+ * request, copies the still-encrypted attachment into the user's Drive
+ * (folder "unpassword – Eingang") and opens the unpassword web app for it.
+ * Decryption happens in the user's browser only.
+ *
+ * Scopes: gmail.addons.current.message.readonly (only the open message),
+ * drive.file (only files this app creates), gmail.addons.execute.
+ */
+
+/** Base URL of the web app. Override with the script property UNPASSWORD_WEB_URL. */
+function webAppUrl_() {
+ var url = PropertiesService.getScriptProperties().getProperty('UNPASSWORD_WEB_URL');
+ return (url || 'https://nullthrone.github.io/unpassword/app/').replace(/\/?$/, '/');
+}
+
+var INBOX_FOLDER = 'unpassword – Eingang';
+var MAX_BYTES = 25 * 1024 * 1024; // Gmail attachment limit
+
+function isGerman_(e) {
+ var locale = (e && e.commonEventObject && e.commonEventObject.userLocale) || Session.getActiveUserLocale() || 'en';
+ return String(locale).toLowerCase().indexOf('de') === 0;
+}
+
+function strings_(e) {
+ return isGerman_(e)
+ ? {
+ header: 'Passwortgeschützte Anhänge',
+ intro:
+ 'unpassword entfernt den Passwortschutz in deinem Browser – mit dem Passwort, das du kennst. ' +
+ 'Dieses Add-on legt nur die verschlüsselte Datei in Drive ab und öffnet unpassword.',
+ none: 'In dieser Nachricht wurden keine passwortgeschützten PDF-, Office- oder ZIP-Anhänge gefunden.',
+ open: 'In unpassword öffnen',
+ protectedLabel: 'passwortgeschützt',
+ failed: 'Der Anhang konnte nicht nach Google Drive kopiert werden.',
+ }
+ : {
+ header: 'Password-protected attachments',
+ intro:
+ 'unpassword removes the password protection in your browser – with the password you know. ' +
+ 'This add-on only stores the encrypted file in Drive and opens unpassword.',
+ none: 'No password-protected PDF, Office or ZIP attachments found in this message.',
+ open: 'Open in unpassword',
+ protectedLabel: 'password protected',
+ failed: 'The attachment could not be copied to Google Drive.',
+ };
+}
+
+/**
+ * Cheap, local detection on the encrypted bytes – no decryption involved.
+ * Returns 'pdf' | 'ooxml' | 'zip' or null.
+ */
+function detectProtected_(bytes) {
+ var n = bytes.length;
+ function at(i) {
+ return bytes[i] & 0xff;
+ }
+ function ascii(from, to) {
+ var s = '';
+ for (var i = from; i < Math.min(to, n); i++) s += String.fromCharCode(at(i));
+ return s;
+ }
+ if (ascii(0, 1024).indexOf('%PDF-') !== -1) {
+ // the /Encrypt entry lives in the trailer or the cross-reference stream
+ return ascii(Math.max(0, n - 65536), n).indexOf('/Encrypt') !== -1 || ascii(0, 65536).indexOf('/Encrypt') !== -1
+ ? 'pdf'
+ : null;
+ }
+ var cfb = [0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1];
+ if (
+ n > 8 &&
+ cfb.every(function (b, i) {
+ return at(i) === b;
+ })
+ ) {
+ // encrypted OOXML stores its streams under these UTF-16 names
+ return ascii(0, Math.min(n, 1 << 20)).indexOf('E\u0000n\u0000c\u0000r\u0000y\u0000p\u0000t\u0000i\u0000o\u0000n\u0000I\u0000n\u0000f\u0000o') !== -1
+ ? 'ooxml'
+ : null;
+ }
+ if (n > 8 && at(0) === 0x50 && at(1) === 0x4b && at(2) === 0x03 && at(3) === 0x04) {
+ // any local file header with general purpose flag bit 0 (= encrypted)
+ for (var i = 0; i + 8 < n; i++) {
+ if (at(i) === 0x50 && at(i + 1) === 0x4b && at(i + 2) === 0x03 && at(i + 3) === 0x04 && (at(i + 6) & 1) === 1) {
+ return 'zip';
+ }
+ }
+ return null;
+ }
+ return null;
+}
+
+function onGmailMessageOpen(e) {
+ var s = strings_(e);
+ GmailApp.setCurrentMessageAccessToken(e.gmail.accessToken);
+ var message = GmailApp.getMessageById(e.gmail.messageId);
+ var attachments = message.getAttachments({ includeInlineImages: false });
+
+ var section = CardService.newCardSection().addWidget(CardService.newTextParagraph().setText(s.intro));
+ var found = 0;
+ attachments.forEach(function (att, index) {
+ if (att.getSize() > MAX_BYTES) return;
+ var kind = detectProtected_(att.getBytes());
+ if (!kind) return;
+ found++;
+ section.addWidget(
+ CardService.newDecoratedText()
+ .setText(att.getName())
+ .setBottomLabel(s.protectedLabel)
+ .setWrapText(true)
+ .setButton(
+ CardService.newTextButton()
+ .setText(s.open)
+ .setOnClickAction(
+ CardService.newAction()
+ .setFunctionName('openInUnpassword')
+ .setParameters({ messageId: e.gmail.messageId, index: String(index) }),
+ ),
+ ),
+ );
+ });
+ if (!found) section.addWidget(CardService.newTextParagraph().setText(s.none));
+
+ return CardService.newCardBuilder().setHeader(CardService.newCardHeader().setTitle(s.header)).addSection(section).build();
+}
+
+function inboxFolderId_() {
+ var q =
+ "mimeType = 'application/vnd.google-apps.folder' and name = '" +
+ INBOX_FOLDER.replace(/'/g, "\\'") +
+ "' and trashed = false";
+ // With drive.file this only sees folders unpassword created itself.
+ var res = Drive.Files.list({ q: q, fields: 'files(id)', pageSize: 1 });
+ if (res.files && res.files.length) return res.files[0].id;
+ return Drive.Files.create({ name: INBOX_FOLDER, mimeType: 'application/vnd.google-apps.folder' }, null, {
+ fields: 'id',
+ }).id;
+}
+
+function openInUnpassword(e) {
+ var s = strings_(e);
+ try {
+ GmailApp.setCurrentMessageAccessToken(e.gmail.accessToken);
+ var params = e.commonEventObject.parameters;
+ var message = GmailApp.getMessageById(params.messageId);
+ var att = message.getAttachments({ includeInlineImages: false })[Number(params.index)];
+ // The blob is the encrypted attachment exactly as received.
+ var file = Drive.Files.create(
+ { name: att.getName(), parents: [inboxFolderId_()], appProperties: { unpassword: 'inbox' } },
+ att.copyBlob(),
+ { fields: 'id' },
+ );
+ var url = webAppUrl_() + '#/drive?fileId=' + encodeURIComponent(file.id);
+ return CardService.newActionResponseBuilder()
+ .setOpenLink(
+ CardService.newOpenLink()
+ .setUrl(url)
+ .setOpenAs(CardService.OpenAs.FULL_SIZE)
+ .setOnClose(CardService.OnClose.NOTHING),
+ )
+ .build();
+ } catch (err) {
+ console.error('openInUnpassword failed: ' + (err && err.message));
+ return CardService.newActionResponseBuilder()
+ .setNotification(CardService.newNotification().setText(s.failed))
+ .build();
+ }
+}
diff --git a/gmail-addon/appsscript.json b/gmail-addon/appsscript.json
new file mode 100644
index 0000000..ddb8d1e
--- /dev/null
+++ b/gmail-addon/appsscript.json
@@ -0,0 +1,26 @@
+{
+ "timeZone": "Europe/Berlin",
+ "runtimeVersion": "V8",
+ "exceptionLogging": "NONE",
+ "oauthScopes": [
+ "https://www.googleapis.com/auth/gmail.addons.execute",
+ "https://www.googleapis.com/auth/gmail.addons.current.message.readonly",
+ "https://www.googleapis.com/auth/drive.file"
+ ],
+ "dependencies": {
+ "enabledAdvancedServices": [{ "userSymbol": "Drive", "serviceId": "drive", "version": "v3" }]
+ },
+ "urlFetchWhitelist": [],
+ "addOns": {
+ "common": {
+ "name": "unpassword",
+ "logoUrl": "https://nullthrone.github.io/unpassword/brand/icon-128.png",
+ "layoutProperties": { "primaryColor": "#141317", "secondaryColor": "#A87E2F" },
+ "openLinkUrlPrefixes": ["https://nullthrone.github.io/unpassword/app/"],
+ "useLocaleFromApp": true
+ },
+ "gmail": {
+ "contextualTriggers": [{ "unconditional": {}, "onTriggerFunction": "onGmailMessageOpen" }]
+ }
+ }
+}
diff --git a/gmail-addon/detect.test.mjs b/gmail-addon/detect.test.mjs
new file mode 100644
index 0000000..891bf51
--- /dev/null
+++ b/gmail-addon/detect.test.mjs
@@ -0,0 +1,28 @@
+// Runs the add-on's attachment detection against the shared fixtures (node --test).
+import { readFileSync } from 'node:fs';
+import { join } from 'node:path';
+import test from 'node:test';
+import assert from 'node:assert/strict';
+import vm from 'node:vm';
+
+const ctx = {};
+vm.runInNewContext(readFileSync(join(import.meta.dirname, 'Code.js'), 'utf8'), ctx);
+const fixtures = join(import.meta.dirname, '..', 'web', 'tests', 'fixtures');
+// Apps Script hands out bytes as signed Java bytes
+const bytes = (p) => Array.from(readFileSync(join(fixtures, p)), (b) => (b > 127 ? b - 256 : b));
+
+test('detects protected attachments', () => {
+ assert.equal(ctx.detectProtected_(bytes('pdf/restricted-aes256.pdf')), 'pdf');
+ assert.equal(ctx.detectProtected_(bytes('pdf/owner-only.pdf')), 'pdf');
+ assert.equal(ctx.detectProtected_(bytes('office/agile.docx')), 'ooxml');
+ assert.equal(ctx.detectProtected_(bytes('office/standard.docx')), 'ooxml');
+ assert.equal(ctx.detectProtected_(bytes('zip/zipcrypto.zip')), 'zip');
+ assert.equal(ctx.detectProtected_(bytes('zip/aes.zip')), 'zip');
+ assert.equal(ctx.detectProtected_(bytes('zip/partial.zip')), 'zip');
+});
+
+test('ignores unprotected attachments', () => {
+ assert.equal(ctx.detectProtected_(bytes('pdf/plain.pdf')), null);
+ assert.equal(ctx.detectProtected_(bytes('office/plain.docx')), null);
+ assert.equal(ctx.detectProtected_(bytes('zip/plain.zip')), null);
+});
diff --git a/scripts/crosscheck.py b/scripts/crosscheck.py
new file mode 100644
index 0000000..2b2b84e
--- /dev/null
+++ b/scripts/crosscheck.py
@@ -0,0 +1,76 @@
+#!/usr/bin/env python3
+"""Cross-check unpassword's outputs with independent implementations.
+
+ cd web && UNPASSWORD_DUMP=/tmp/up npx vitest run tests/dump.test.ts
+ python3 scripts/crosscheck.py /tmp/up
+
+Requires: pip install pikepdf msoffcrypto-tool
+"""
+import io
+import sys
+import zipfile
+from pathlib import Path
+
+import msoffcrypto
+import pikepdf
+
+ROOT = Path(__file__).resolve().parent.parent
+PLAIN_ZIP = ROOT / "web" / "tests" / "fixtures" / "zip" / "plain.zip"
+
+
+def check_pdf(path: Path, mode: str):
+ pdf = pikepdf.open(path) # no password
+ if mode == "decrypted":
+ assert not pdf.is_encrypted, "still encrypted"
+ else:
+ assert pdf.is_encrypted, "restrictions were dropped"
+ allow = pdf.allow
+ assert not allow.extract and not allow.print_highres, f"restrictions lost: {allow}"
+ assert len(pdf.pages) == 1
+
+
+def check_ooxml(path: Path):
+ data = path.read_bytes()
+ assert not msoffcrypto.OfficeFile(io.BytesIO(data)).is_encrypted(), "still encrypted"
+ with zipfile.ZipFile(io.BytesIO(data)) as z:
+ assert z.testzip() is None
+ assert "[Content_Types].xml" in z.namelist()
+
+
+def check_zip(path: Path, source: str):
+ with zipfile.ZipFile(path) as z:
+ assert z.testzip() is None
+ for info in z.infolist():
+ assert not info.flag_bits & 0x1, f"{info.filename} still encrypted"
+ if source in ("zipcrypto.zip", "aes.zip"):
+ with zipfile.ZipFile(PLAIN_ZIP) as ref:
+ for name in ref.namelist():
+ if not name.endswith("/"):
+ assert z.read(name) == ref.read(name), f"{name} differs"
+
+
+def main(directory: str):
+ files = sorted(Path(directory).iterdir())
+ if not files:
+ raise SystemExit("no outputs found")
+ failed = 0
+ for f in files:
+ # __..
+ kind, rest = f.name.split("__", 1)
+ source, _which, mode = rest.rsplit(".", 2)
+ try:
+ if kind == "pdf":
+ check_pdf(f, mode)
+ elif kind == "office":
+ check_ooxml(f)
+ else:
+ check_zip(f, source)
+ print(f"ok {f.name}")
+ except Exception as e: # noqa: BLE001
+ failed += 1
+ print(f"FAIL {f.name}: {e}")
+ sys.exit(1 if failed else 0)
+
+
+if __name__ == "__main__":
+ main(sys.argv[1])
diff --git a/scripts/gen-fixtures.py b/scripts/gen-fixtures.py
new file mode 100644
index 0000000..fac2543
--- /dev/null
+++ b/scripts/gen-fixtures.py
@@ -0,0 +1,200 @@
+#!/usr/bin/env python3
+"""Generate the encrypted test fixtures used by web/tests.
+
+Requirements: pip install pikepdf msoffcrypto-tool pyzipper, and the `zip` CLI
+(ZipCrypto archives). Run from the repository root:
+
+ python3 scripts/gen-fixtures.py
+
+Every password used here is listed in web/tests/fixtures/README.md. The files
+are small and committed so the JS test suite runs without Python; this script
+documents and reproduces how they were made. Encryption uses random salts, so
+regenerated files differ byte-wise while remaining equivalent.
+"""
+import io
+import shutil
+import subprocess
+import tempfile
+import zipfile
+from pathlib import Path
+
+import msoffcrypto
+from msoffcrypto.format.ooxml import OOXMLFile
+import pikepdf
+import pyzipper
+
+ROOT = Path(__file__).resolve().parent.parent
+OUT = ROOT / "web" / "tests" / "fixtures"
+
+USER_PW = "user-Pässwort1"
+OWNER_PW = "owner-Pässwort2"
+OFFICE_PW = "Büro-Geheim 42"
+ZIP_PW = "zip-Geheim3"
+ZIP_PW_OTHER = "something-else"
+
+FIXED_DATE = (2024, 1, 2, 3, 4, 6)
+
+
+def pdf_doc() -> pikepdf.Pdf:
+ pdf = pikepdf.new()
+ pdf.add_blank_page(page_size=(200, 200))
+ content = b"BT /F1 24 Tf 20 100 Td (unpassword test) Tj ET"
+ page = pdf.pages[0]
+ page.obj.Resources = pikepdf.Dictionary(
+ Font=pikepdf.Dictionary(
+ F1=pikepdf.Dictionary(Type=pikepdf.Name.Font, Subtype=pikepdf.Name.Type1, BaseFont=pikepdf.Name.Helvetica)
+ )
+ )
+ page.obj.Contents = pdf.make_stream(content)
+ pdf.docinfo["/Title"] = "unpassword fixture"
+ return pdf
+
+
+def save_pdf(name: str, **enc):
+ pdf = pdf_doc()
+ kwargs = {"static_id": True, "deterministic_id": False}
+ if enc:
+ kwargs["encryption"] = pikepdf.Encryption(**enc)
+ pdf.save(OUT / "pdf" / name, **kwargs)
+
+
+ALLOW_ALL = pikepdf.Permissions(
+ accessibility=True,
+ extract=True,
+ modify_annotation=True,
+ modify_assembly=True,
+ modify_form=True,
+ modify_other=True,
+ print_lowres=True,
+ print_highres=True,
+)
+RESTRICTED = pikepdf.Permissions(extract=False, print_highres=False, modify_other=False, modify_assembly=False)
+
+
+def gen_pdf():
+ (OUT / "pdf").mkdir(parents=True, exist_ok=True)
+ save_pdf("plain.pdf")
+ # open password, no restrictions
+ save_pdf("user-aes256.pdf", user=USER_PW, owner=OWNER_PW, R=6, allow=ALLOW_ALL)
+ # open password plus restrictions, three cipher generations
+ save_pdf("restricted-aes256.pdf", user=USER_PW, owner=OWNER_PW, R=6, allow=RESTRICTED)
+ save_pdf("restricted-aes128.pdf", user=USER_PW, owner=OWNER_PW, R=4, aes=True, allow=RESTRICTED)
+ save_pdf("restricted-rc4.pdf", user=USER_PW, owner=OWNER_PW, R=3, aes=False, metadata=False, allow=RESTRICTED)
+ # no open password, only owner restrictions
+ save_pdf("owner-only.pdf", user="", owner=OWNER_PW, R=6, allow=RESTRICTED)
+
+
+def minimal_docx() -> bytes:
+ files = {
+ "[Content_Types].xml": (
+ ''
+ ''
+ ''
+ ''
+ ''
+ ""
+ ),
+ "_rels/.rels": (
+ ''
+ ''
+ ''
+ ),
+ "word/document.xml": (
+ ''
+ ''
+ "unpassword test"
+ + "Lorem ipsum dolor sit amet." * 120
+ + ""
+ ),
+ }
+ buf = io.BytesIO()
+ # Stored, not deflated: msoffcrypto-tool's OLE writer corrupts streams that
+ # land in the mini stream (< 4096 bytes), so the package must be larger.
+ with zipfile.ZipFile(buf, "w", zipfile.ZIP_STORED) as z:
+ for name, text in files.items():
+ z.writestr(zipfile.ZipInfo(name, FIXED_DATE), text)
+ data = buf.getvalue()
+ assert len(data) > 4096
+ return data
+
+
+def gen_office():
+ (OUT / "office").mkdir(parents=True, exist_ok=True)
+ plain = minimal_docx()
+ (OUT / "office" / "plain.docx").write_bytes(plain)
+ out = io.BytesIO()
+ OOXMLFile(io.BytesIO(plain)).encrypt(OFFICE_PW, out)
+ (OUT / "office" / "agile.docx").write_bytes(out.getvalue())
+ check = msoffcrypto.OfficeFile(io.BytesIO(out.getvalue()))
+ check.load_key(password=OFFICE_PW)
+ decrypted = io.BytesIO()
+ check.decrypt(decrypted, verify_integrity=True)
+ assert decrypted.getvalue() == plain
+ # Files produced by Microsoft Office itself, and ECMA-376 Standard
+ # encryption (which msoffcrypto-tool cannot produce), come from the
+ # msoffcrypto-tool test suite (MIT licence, password "Password1234_"):
+ # office/standard.docx <- tests/inputs/ecma376standard_password.docx
+ # office/office-agile.docx <- tests/inputs/example_password.docx
+ # office/office-agile.xlsx <- tests/inputs/example_password.xlsx
+
+
+def aes_info(z, name):
+ info = z.zipinfo_cls(name, FIXED_DATE)
+ info.compress_type = pyzipper.ZIP_DEFLATED
+ return info
+
+
+def gen_zip():
+ d = OUT / "zip"
+ d.mkdir(parents=True, exist_ok=True)
+ payload = {
+ "readme.txt": b"unpassword test archive\n" * 20,
+ "docs/statement.txt": "Kontoauszug – Umlaute äöü\n".encode() * 50,
+ }
+ with tempfile.TemporaryDirectory() as tmp:
+ t = Path(tmp)
+ for name, data in payload.items():
+ p = t / name
+ p.parent.mkdir(parents=True, exist_ok=True)
+ p.write_bytes(data)
+ for f in ["zipcrypto.zip", "plain.zip"]:
+ (d / f).unlink(missing_ok=True)
+ subprocess.run(["zip", "-q", "-X", "-r", "-P", ZIP_PW, str(d / "zipcrypto.zip"), "readme.txt", "docs"], cwd=t, check=True)
+ subprocess.run(["zip", "-q", "-X", "-r", str(d / "plain.zip"), "readme.txt", "docs"], cwd=t, check=True)
+
+ with pyzipper.AESZipFile(d / "aes.zip", "w", compression=pyzipper.ZIP_DEFLATED, encryption=pyzipper.WZ_AES) as z:
+ z.setpassword(ZIP_PW.encode())
+ for name, data in payload.items():
+ z.writestr(aes_info(z, name), data)
+
+ # two entries encrypted with different passwords: must be rejected
+ with pyzipper.AESZipFile(d / "mixed.zip", "w", compression=pyzipper.ZIP_DEFLATED, encryption=pyzipper.WZ_AES) as z:
+ z.setpassword(ZIP_PW.encode())
+ z.writestr(aes_info(z, "a.txt"), b"first")
+ z.setpassword(ZIP_PW_OTHER.encode())
+ z.writestr(aes_info(z, "b.txt"), b"second")
+
+ # one encrypted entry next to an unencrypted one: allowed
+ buf = io.BytesIO()
+ with pyzipper.AESZipFile(buf, "w", compression=pyzipper.ZIP_DEFLATED) as z:
+ z.writestr(aes_info(z, "public.txt"), b"not secret")
+ with pyzipper.AESZipFile(buf, "a", compression=pyzipper.ZIP_DEFLATED, encryption=pyzipper.WZ_AES) as z:
+ z.setpassword(ZIP_PW.encode())
+ z.writestr(aes_info(z, "secret.txt"), b"secret")
+ (d / "partial.zip").write_bytes(buf.getvalue())
+
+
+def main():
+ if not shutil.which("zip"):
+ raise SystemExit("the `zip` CLI is required for ZipCrypto fixtures")
+ gen_pdf()
+ gen_office()
+ gen_zip()
+ print(f"fixtures written to {OUT}")
+
+
+if __name__ == "__main__":
+ main()
diff --git a/scripts/render-brand-assets.mjs b/scripts/render-brand-assets.mjs
new file mode 100644
index 0000000..1fcc4b9
--- /dev/null
+++ b/scripts/render-brand-assets.mjs
@@ -0,0 +1,130 @@
+// Renders unpassword's PNG brand assets and Marketplace screenshots into
+// design/unpassword/png/. Uses the Playwright Chromium from web/node_modules.
+//
+// cd web && npm run build && cd .. && node scripts/render-brand-assets.mjs
+//
+// Set PLAYWRIGHT_CHROMIUM_PATH to use a preinstalled Chromium binary.
+import { createServer } from 'node:http';
+import { mkdirSync, readFileSync, existsSync, statSync } from 'node:fs';
+import { createRequire } from 'node:module';
+import { extname, join, normalize } from 'node:path';
+
+const ROOT = join(import.meta.dirname, '..');
+const OUT = join(ROOT, 'design/unpassword/png');
+const require = createRequire(join(ROOT, 'web/package.json'));
+const { chromium } = require('@playwright/test');
+
+const INK = '#141317';
+const PAPER = '#F4F2EC';
+const BRASS = '#C09A4B';
+
+const svg = (file) => readFileSync(join(ROOT, 'design/unpassword', file), 'utf8');
+// Fonts inlined as data URIs: pages rendered via setContent may not load file:// URLs.
+const fontsCss = readFileSync(join(ROOT, 'design/nullthrone/tokens/fonts.css'), 'utf8').replace(
+ /url\('\.\.\/fonts\/([^']+)'\)/g,
+ (_, f) => `url('data:font/woff2;base64,${readFileSync(join(ROOT, 'design/nullthrone/fonts', f)).toString('base64')}')`,
+);
+
+function page(width, height, inner, bg = 'transparent') {
+ return `${inner}`;
+}
+
+const browser = await chromium.launch(
+ process.env.PLAYWRIGHT_CHROMIUM_PATH ? { executablePath: process.env.PLAYWRIGHT_CHROMIUM_PATH } : {},
+);
+mkdirSync(OUT, { recursive: true });
+
+async function shot(name, width, height, html) {
+ const p = await browser.newPage({ viewport: { width, height } });
+ await p.setContent(html, { waitUntil: 'load' });
+ await p.evaluate(() => document.fonts.ready);
+ await p.screenshot({ path: join(OUT, name), omitBackground: true });
+ await p.close();
+ console.log(` ${name}`);
+}
+
+// Icons: ink square with the paper mark – legible on light and dark Marketplace backgrounds.
+for (const size of [16, 32, 48, 96, 128]) {
+ const file = size <= 32 ? 'mark-small.svg' : 'mark.svg';
+ const pad = Math.round(size * (size <= 32 ? 0.14 : 0.18));
+ const inner = `
Graphics for the Marketplace listing, generated from design/unpassword by scripts/render-brand-assets.mjs. The URLs the listing references are in the setup guide.