# Tiercraft Pricing Studio 1.0

An original responsive pricing-table editor and reusable HTML/CSS component. Edit plans, prices, feature comparisons and CTAs, preview the actual output, and take a standalone HTML file or scoped embed with you. No account, paid API, runtime package, CDN or build step.

**Status:** current-source local QA passed after the hosted-only export-signal repair. 38 automated tests and seven fresh real-browser cases pass: desktop/mobile visuals, plan editing/history, invalid-input preservation, byte-equal actual JSON roundtrip, delivered HTML/embed billing and isolation, and clean extracted ZIP edit/save/reopen. Copy embed reported success, but the fresh CUA clipboard read returned empty, so this pass does not establish new clipboard byte equality; exact-source-bound focused repair copy proof is retained separately. Prior fingerprint folders are historical. Independent final QC and live integration/persistence remain separate gates.

## Run

Unzip and keep `app/` together. Open `app/index.html` in a current JavaScript-enabled browser using your approved local access method. If local file restrictions prevent access, a product-rooted local development server works: `python3 -m http.server 8767 --bind 127.0.0.1 --directory /absolute/path/to/tiercraft`; visit `http://127.0.0.1:8767/app/index.html`. This does not publish the product or expose it on your network.

The initial Fieldnote pricing example is entirely synthetic. It represents no real company, checkout, customers, measured sales or claims. All initial CTA links are harmless page anchors. Replace the example content and destinations before using your output on a real site.

## Build your table

1. Edit **Content & style**: heading/subtitle, currency, Paper/Night/Lavender theme, accent outline, cards or table layout, initial billing period, comparison table and recommended plan. Accent affects the recommended plan's border; CTA contrast follows the chosen theme.
2. Under **Plans**, select the plan to edit. Set its name, description, monthly price, yearly **total**, button label and destination. Empty price means “Let’s talk”; zero means free. Currency formatting uses US English. There are no automatic discounts or inferred savings.
3. Add, duplicate, remove or move plans left. Between one and five plans are supported. Feature values follow their plan IDs even when reordered. Remove is reversible through Undo.
4. Expand **Comparison features**. Edit each feature name and every plan's value. `Included` / `Not included` display accessible words plus decorative icons; other values display as text. Add/remove up to twelve features; keep at least one.
5. Choose **Apply changes**. This validates the form and updates the iframe with the actual export. Switching plans, Save, Copy and Export apply pending form changes first. Invalid input leaves the last valid table unchanged. Check the status line for errors.
6. In the live preview, switch Monthly/Yearly. **Desktop/Mobile** adjusts only the preview width. Tables deliberately scroll horizontally inside a labeled, keyboard-focusable region; cards stack on small screens. The preview iframe can scroll for long tables. Set Default billing in the form to change the exported initial period.
7. Undo/Redo retain thirty applied edits. **Save JSON** downloads all editable values. Open JSON reopens that complete project. Replacing unsaved work asks first; cancel keeps your draft. Ctrl/Command S saves, including pending edits. Browser drafts are optional convenience: download JSON for reliable backup. Storage or clipboard restrictions produce visible feedback.
8. **Export HTML** downloads a complete working page. **Copy embed** copies the identical scoped fragment shown in Embed code. **Download embed** saves that fragment. Each includes scoped CSS and a tiny instance-local billing script. Multiple components on one page switch independently. JSON is editable source; HTML is presentation output, not an import format.

## Embed and customize

Paste the generated fragment into your page's custom HTML block, preserving its style, section and following script together. No external assets are loaded. Your CMS must allow inline style/script tags; some builders strip them. CSP sites must authorize the inline code using their own reviewed policy or move it into allowed local CSS/JS files. Do not weaken a production CSP just to paste a demo. This product does not install a native WordPress/CMS plugin.

`samples/fieldnote.html` is the complete original example. `samples/embed.html` is a real host with two independent components. `samples/fieldnote.tiercraft.json` is the fully populated editable project.

All links remain in the current tab. Supported destinations are http(s), root-relative `/path` and `#anchor`; credentials, protocol-relative and executable URL schemes are rejected. No checkout, payment or subscription processing is included. Text is escaped when rendered; imported projects cannot supply arbitrary HTML/CSS/JavaScript. CSS selectors use the `.tc-pricing` root; the host can still override them, so inspect your site's actual integration.

## Use terms and optional integration

`LICENSE.txt` contains the approved Nishvault Free Product Use Terms. Personal and commercial use of the free editor is permitted. You may export, share, embed or sell the outputs you create, including the viewer runtime embedded by Tiercraft. Rights in uploaded artwork remain with the relevant rights holders. Redistributing or reselling the editor itself, its complete source/package or a rebranded competing copy is not authorized. Included examples are synthetic demonstration content.

The free product offers no paid checkout, recurring charge, guaranteed support, service-level agreement or update schedule. Optional custom integration is a separate request and requires a separate agreed scope before any payment or work commitment. The $9 idea in `OFFER.md` is a planning hypothesis, not an active checkout or evidence of a sale.

## Privacy, limits and development

The app makes no application network requests. It stores an optional browser-local draft under `tiercraft-studio-v1`, and generates downloads in memory. A JSON file contains all pricing and link content. Use synthetic data for QA. Import limit: 150 KB. Text and amounts are bounded; prices are nonnegative up to 10,000,000, rounded to cents. Source IDs keep features aligned when plans move. A browser's Downloads folder determines the final filenames.

Runtime needs no install. Developer tools are Node 20+ and Python 3.10+: `node --test tests/core.test.cjs tests/hosted-metrics.test.cjs`; `python3 scripts/sample.py`; `python3 scripts/package.py`. Tests check validation, history, escaping, prices and actual generated markup; they are distinct from real browser observations. Original code is in `app/core.js`, UI behavior in `app/studio.js`, editor styling in `app/styles.css`.

Source-bound QA aggregate lives outside the ZIP in `evidence/qa/report.json`. Genuine browser receipts/screenshots, when present, live in `evidence/qa/browser/`. Package CRC and every source byte are verified. Physical touch devices, other browser engines, assistive-technology certification, a real CMS install, live billing, traffic and sales require separate evidence. Publication/deployment is a separate action.


## Hosted usage measurement

`app/hosted-metrics.js` is an optional first-party adapter for the exact HTTPS Nishvault product/editor routes. The publisher loads it only on hosted pages. Offline `app/index.html`, standalone HTML and scoped embed outputs never load it. The studio itself performs no application network requests. Its content-free `tiercraft:export-created` event follows successful HTML/embed download dispatch or resolved clipboard writing, with only the fixed format (`html`, `embed`, `embed-copy`). JSON backup and preview actions do not signal export completion.

The adapter sends fixed anonymous diagnostic `page_view`, `product_export` and `calculator_result` (the existing endpoint's completion event) payloads to `/api/metrics`. It sends no project, table text, prices, links, title, filename, URL query, visitor/session ID, referrer or cookies. DNT/GPC disable it. Per-document in-memory limits are one page view, one completion and at most 20 exports; transport failure has no retry and does not interrupt editing. Synthetic hosted QA uses `?nv_internal_test=1`. Counts do not prove unique people, signed canonical funnels, sales, or that a downloaded/copied output was retained. Actual live integration and persistence need separate release evidence.
