=== KrafterPRO ===
Contributors:      mak
Tags:              divi, divi 5, global variables, design system, design tokens, spacing, responsive
Requires at least: 6.0
Tested up to:      6.8
Requires PHP:      8.0
Stable tag:        5.0.0
License:           GPL-2.0+
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

KrafterPRO is a comprehensive design system and workflow framework built for Divi 5, designed to speed up website creation, improve responsiveness, and enforce design consistency.

== Description ==

KrafterPRO is a comprehensive design system and workflow framework built for Divi 5, designed to speed up website creation, improve responsiveness, and enforce design consistency. It replaces manual, element-by-element styling with fluid variables, preset spacing tokens, and a structured import/export workflow, so teams can share a single design system across sites.

**Requires Divi 5 (version 5.0.0+) as your active theme.**

Shipped documentation: see **MANUAL.md** in the plugin folder for the user manual and an **implementation snapshot** (May 2026) explaining how Divi 5 maps brand global colors and Heading/Body fonts to theme options during import.

= Features =

* **Import** — Drag-and-drop design-system JSON (variables and/or presets). Full **preview** before write; optional **named snapshot**.
* **Brand Studio** — **Brand Apply** rewrites Primary / Secondary / Heading / Body (+ fonts) without a full JSON import; saved kits; in-card preview (**More preview** for UI proof and shade ramps) before apply. Brand Apply and brand kits require a licence.
* **Import modes** — **Replace** (atomic wipe + import for the selected scope) or **Merge** (match by name, update in place when content differs, skip identical; no duplicates on re-import).
* **Export** — Download current Divi 5 global variables (and related design-system data) as a portable JSON file. Requires a licence (same gate as Knowledge Graph JSON and the AI Context ZIP). Optional **file name** on the Export tab before download; default name matches the server pattern if you leave the field empty.
* **Backup** — On **Export**, **Download full backup JSON** saves everything in one file (licence required, same as Export); on **Import**, **Restore a backup** re-imports a prior backup using the same preview/confirm safety as a normal import.
* **Rollback** — Automatic snapshots before imports, Brand Apply, and destructive resets; restore any previous state from the **Rollback** tab (restore stays free). Changing snapshot retention requires a KrafterPRO licence; **Rename** and **Download** a snapshot as JSON also require a licence.
* **Activity log** — Who imported, applied brand, or rolled back — and when — under **Protect → Activity**. Import entries still include the variable diff (added / modified / removed). Adjust how many entries to keep (10–100, default 25); older entries roll off as new activity is logged.
* **Cleanup** — Protect prefixes, find & delete by name pattern (with **Where is this used?** chips, expandable locations, and a show-unused-only filter), and delete-all tools for global variables/colors or module presets (with snapshot-first safety where applicable).
* **Design Health** — Whole-site scan and full diagnosis without a licence; **Preview** before/after on eligible findings; licence required to apply fixes, to use Design Guard, and for plugin updates / REST-MCP tools.
* **Stats** — Live counts in the admin header (variables, colors, fonts, spacing, presets).
* **Connect AI** — Submenu with readiness checks, AI write-access modes (Full / Content only / Drafts only / Read only), and copy-paste helpers to connect Claude Desktop / MCP clients via Application Passwords (companion `mcp-server` package). The password itself is never stored. On WordPress 6.9+, two read-only abilities (audit one layout; read the last Design Health score) are discoverable with no extra KrafterPRO setup. KrafterPRO does not turn on another plugin’s AI master switch. Fixes stay licensed. Not every finding is auto-fixable — headings inside Text modules are structural.
* **Bundled design systems** — On **Import**, **Start from a KrafterPRO design system** imports or downloads the bundled Design System / Theme Builder JSON (Install layout for Theme Builder) through the same preview/confirm flow as a file upload. Adjacent **Design System Completeness** checklist is informational only.
* **Dashboard** — Orientation home with the five-stage journey, quick-start video, guides, and support links.
* **About / System** — Plugin version, Divi version, and stored variable/color counts.
* Works with Divi child themes.

= Free and paid =

The following list matches the plugin feature map. Same comparison: `docs/pricing-table.md`.

<!-- kpro-gate-table:start -->
| Feature | Tier |
| --- | --- |
| Import a design system | Free |
| Cleanup reset (delete-all) | Free |
| Restore a Rollback snapshot | Free |
| Full Design Health scan | Free |
| Design Health findings list | Free |
| Preview a finding | Free |
| Guided Preview path | Free |
| Cleanup usage lookup | Free |
| Health Digest emails | Free |
| Read-only abilities (audit one layout, last score) | Free |
| Insert the free Hero Frame | Free |
| Fix one finding | Paid |
| Fix all findings | Paid |
| Layout modernisation | Paid |
| Delete unused presets | Paid |
| Scale-gap fixes | Paid |
| Design Guard | Paid |
| Client Health Report | Paid |
| Brand Apply | Paid |
| Brand kits | Paid |
| Export the design system | Paid |
| REST API and Connect AI | Paid |
| Keep more than two snapshots | Paid |
| Download a snapshot | Paid |
| Insert paid Frames | Paid |
| Install the bundled Theme Builder template | Paid |
<!-- kpro-gate-table:end -->

= Admin interface =

The plugin settings screen uses a tabbed layout grouped as **Workflow** (**Import**, **Brand Studio**, **Export**, **Rollback**, **Cleanup**) and **Delivery** (**Hand Off**). **Dashboard**, **System**, **Connect AI**, and **Licensing** are available from the **KrafterPRO** WordPress admin submenu. A single **guidance strip** under the nav may point to the next step (install a design system, then scan). Import uses a design-system upload zone, bundled starter systems, completeness checklist, **Import target** scope, merge/replace choice, and preview/confirm. Brand Apply lives on **Brand Studio**. Success and error feedback appears inline and via centered notices.

== Installation ==

1. Ensure **Divi 5** (5.0.0 or newer) is your active theme.
2. Upload the plugin folder to `/wp-content/plugins/` (or install the zip via **Plugins → Add New → Upload**).
3. Activate the plugin under **Plugins → Installed Plugins**.
4. Open **KrafterPRO** from the WordPress admin menu.
5. On **Import**, add your `.json` file(s), click **Preview Variables**, review the preview, then **Confirm & Import**.

== Frequently Asked Questions ==

= Why don’t I see changes in the Visual Builder right away? =

Divi may cache builder state. After a successful import, **close the Visual Builder completely** (not only the modal), then reopen it so Divi reloads global data.

= Why did brand colors or Heading/Body fonts not update after import (older builds)? =

Divi 5’s Variable Manager reads certain “brand” color slots and Heading/Body fonts from **theme options** (for example `accent_color`, `header_color`, `heading_font`, `body_font`) as well as from global data. KrafterPRO **2.0+** import syncs those options when your JSON includes the matching global color IDs or font rows so Replace/Merge results match the file. Details and the option mapping table are in **MANUAL.md** under *Implementation snapshot — Divi 5 “brand” rows and theme options*.

= What is the difference between Replace and Merge? =

**Replace** overwrites the relevant global data for the scope you are importing (per the on-screen scope and mode). **Merge** matches items by name within each type: identical rows are unchanged, different content updates in place (same IDs), and new names are added. Site-only items stay. Re-importing the same file does not create duplicates.

= Where can I get help? =

Use **KrafterPRO → Dashboard** for the quick-start video and support links, or your KrafterPRO / Divi University account resources.

== Changelog ==

= 5.0.0 =
* Brand Studio opens on Colour kits. The sentence about the preview updating, and the Saved kits button beside it, are gone.
* Save brand copy is a blue button. The company name in the preview updates as you type and is stored when you save.
* Image buttons say Change image when a file is already chosen. A small check appears only after you add an image.
* The Brand Studio preview heading is a little heavier.
* Section panels use an 8px corner.
* The language control and the light/dark switch are rounded rectangles without a border.
* Design System is Up To Date shows a check on a green button, so it no longer looks like an error.

= 4.2.31 =
* Brand Studio industry colour kits are more distinct. Professional Services, Real Estate, Home Services, Construction, Fitness, Automotive, SaaS, and Technology have new palettes. SaaS and Technology no longer share the same colours, heading, or fonts. Creative Agency uses its own neutral. Fewer kits share the same grey.
* Legal, Finance, Education, and Hospitality now list the colours Brand Studio already applied. Those kits look the same.
* Four new colour kits: Interior & Architecture, Creators & Media, Climate & Sustainability, and Mental Wellbeing.

= 4.2.30 =
* A display preset on a heading, such as k-display-s on an H1, is no longer flagged as the wrong heading size. A real mismatch still is, and the card says which level it is and which preset that level uses.
* An unlicensed site that can see a newer version, but cannot download it, gets an Upgrade to get new features link on the Plugins screen. A licensed site, a marketplace install, and a site that already has the update do not.

= 4.2.29 =
* Design Assist Why opens the reason on the card. Clicking Why no longer selects or highlights the module. Enter and Space on Why still open and close the reason in place. Clicking the rest of the card still selects the module.
* Each place in a grouped stack has its own Why.

= 4.2.28 =
* Delete All Module Presets shows how many presets that button will remove. Protected presets are not included. It no longer shows the number of database rows that store them.
* The Cleanup prefix card is titled Do not delete these presets. The intro sentence, Keep these names, and Matching items survive Replace and resets are gone, and the prefix field sits under the title.
* Admin titles use Manrope. Body text and labels use Inter.
* Drop shadows are gone from the admin screens. Keyboard focus still shows a ring.
* The selected workflow tab is a light blue chip with no border. Focus rings are a 2px solid blue outline, the same as the selected Import card.
* The version number sits next to the logo. The header sentence, the Learning Centre button, and the Fonts count are gone.
* Cards use an 8px corner. Small controls use 4px.

= 4.2.27 =
* Review kept items no longer lists KrafterPRO's own presets, variables, and colours as "Not recognized as KrafterPRO's." An item in the shipped design system counts as KrafterPRO's even when this site's ledger does not. Preset names that start with k- count too, including an older name such as k-text xsmall. A variable or colour whose name matches the current kit counts too, including space s for space-s and a primary-color row whose id changed. A name the current kit does not use, such as Heading h1 or gray 100, still appears.
* Review kept items no longer offers colours that cannot be deleted. Brand and Customizer colours, and colours Divi has already removed from its own list, were shown with a checkbox, counted as deleted, and came back after a refresh.
* Delete All and Replace no longer keep those shipped items back as if they belonged to the site.

= 4.2.26 =
* Delete All Variables & Colors works on Divi 5.15. Divi keeps every variable id and deletes by marking a variable archived, so a save that left ids out was rejected and nothing was removed. KrafterPRO now sends those ids back as archived. Protected names stay. Colours are still removed the same way as before.
* Delete by pattern and delete selected variables use that same save.
* If Divi still rejects the save, the error includes Divi's full reply, including the list of missing ids.
* Archived variables are not counted as live. Importing the same token name again can bring that archived variable back.

= 4.2.25 =
* Update Design System finishes presets that were stuck on a missing spacing or radius token. If the site already has a numbers token with the same name, the preset uses that token. If it has neither the id nor the name, that token is added. Tokens already on the site are left as they are. Colours and fonts are not changed. Uploading your own file still works the same way.
* The Update Design System preview names the spacing tokens it will add.
* The bundled AI skill now describes design system 3.1.7.
* The result says how many presets were updated, how many tokens were added, and how many presets were skipped. Each skipped preset is named once, grouped by the missing token, and a skip is not counted as an update.
* If that update would change nothing while presets are still waiting, it says nothing was applied, instead of reporting success.
* A marketplace download shows the blue licensed header.

= 4.2.24 =
* A new Divi 5 site that already has Divi's own colours now gets the design system the first time an administrator opens wp-admin. Those stock colours are kept. A site that was skipped for this reason can still install on the next visit if it has no design system of its own.
* A site with no design system shows None installed, instead of a file name that was never imported.
* When the dashboard is mostly missing and nothing has been imported, Needs attention includes an Install Design System button.
* The dashboard script no longer contains a literal end-of-document tag, so the rest of the page script is not cut off and Brand Studio can load.
* The bundled design system is now 3.1.7. Grid layout presets space their columns apart. A site that already chose a different alignment keeps it.
* Update Design System applies the kit's preset names, including an older label such as Border xsmall, so the button can reach Design System is Up To Date. Uploading your own file still keeps a name you chose.

= 4.2.23 =
* On a new empty Divi 5 site, the first time an administrator opens wp-admin, KrafterPRO installs the bundled design system once. If that install fails, a notice explains why and links to Install Design System.
* That install does not run again over a design system you already have, and Cleanup does not bring the kit back.
* Design Assist shows Apply KrafterPRO design system only when that pass would change the page, or when presets on the page are missing from the site. It clears instance styles a live preset already covers, and it leaves preset ids it cannot resolve in place.
* If the site has no presets, Apply tells you to install the design system first.
* Design Assist has a separate Bind presets button. It shows how many presets it would add, and it writes them only when you click it.

= 4.2.22 =
* Update Design System updates presets and group presets only. Colours, fonts, and other variables stay as they are. Install Design System still brings the full kit.
* When every preset already matches the kit, the button reads Design System is Up To Date and does not run.
* The update preview lists only the new and changed presets, in three columns.
* The green Design system updated notice no longer appears after an import. A rollback snapshot is still saved.
* A design-system update no longer shows the review heading, Replace plan, or import summary. A file upload still shows the full review.

= 4.2.21 =
* After Reset, Brand Apply keeps Primary, Secondary, Heading, Body, and Link on their original colour ids, so presets that use those colours keep them.
* The plugin download no longer includes a Theme Builder template. Those layouts will be added as Frames.

= 4.2.20 =
* Reset warns which presets will lose their colour before you confirm.
* Design Audit and Design Assist flag a grid preset that is missing display:grid on the module, and can add it for you.
* Inserted Frames keep their spacing and background group presets, and the Visual Builder registers those presets so their styles can load after insert.
* Frames that use a grid or flex layout keep their display, column count and wrap after insert. A display already set on the module is left alone.
* After Reset, Brand Apply recreates missing brand colours under their original ids, so presets that point at those ids keep their colour.
* KrafterPRO fills in required preset details when it writes presets, so fewer Divi preset saves are rejected.
* Inserting some Frames no longer fails with an error in the Visual Builder.
* Theme Builder Quick install now uses template 1.1, and its layouts only use presets the design system ships.
* Save as Frame names the nested module that has a problem, and a missing preset is described as a preset that is not on this site.

= 4.2.19 =
* If the Licensing page chrome fails, the licence key field still shows so you can activate the site.
* On Import, an already-installed design system leaves existing colours and fonts out unless you select them. A fresh install still gets the full kit.
* Cleanup lists what Delete All would keep, and you can delete selected protected items.
* Import notes when Divi's tablet or phone breakpoints are off, so responsive presets cannot collapse.
* Rolling back a snapshot also restores which colours, variables, and presets KrafterPRO imported, so Cleanup matches the snapshot.
* Fullwidth and specialty copies of section presets count as KrafterPRO's, so they are not listed as unknown.
* A same-version design-system update no longer says a new version is available.
* A section with no tokens, colours, or presets cannot be saved as a Frame.
* Design Audit finding location is a single line, with the path in the tooltip.
* Updating the design system with Merge applies a preset rename from the kit when the current name is still a KrafterPRO name. A name you set yourself is kept.
* Rollback keeps the snapshot from your last design-system update, and the success notice has Undo this update.
* Divi Marketplace builds unlock paid features through Elegant Themes and use only bundled Frames, not Frames Cloud.

= 4.2.18 =
* Build now has a Getting Started tab next to AI, with a walkthrough video.

= 4.2.17 =
* Promo Center now promotes the Divi 5 Accelerator: BUILD MORE THAN A PRETTY WEBSITE, two live sessions a week, ONLY 25 spaces, founding price $197, and JOIN THE DIVI 5 ACCELERATOR (https://diviuniversity.com/advanced-divi-5-accelerator/).
* The promo banner is burnt orange, with a stronger body line, underlined spaces, and a bold founding price so the offer is easier to read.

= 4.2.16 =
* Admin pages no longer crash with a PHP memory exhaustion when Divi's generated CSS cache has grown large. External CSS class detection still runs; the stylesheet scan is capped at 5 MB.
* Import preview no longer lists Font & Color Kit protected roles as changed when Merge or Replace will skip them. They show as skipped. Heading and body fonts stay unchanged.
* Cleanup no longer rewrites a customer preset just because the name contains "heading". KrafterPRO heading types (k-h1–k-h6, k-title-*, k-display-*) share one name check.

= 4.2.15 =
* Saving global presets in the Divi Builder no longer fails after KrafterPRO copies section spacing presets onto fullwidth and specialty sections. Those buckets now include a required default, and sites that already had the broken data are repaired on the next admin load.

= 4.2.14 =
* KrafterPRO's admin screen no longer crashes on hosts that do not have PHP's mbstring extension. Long changelog and export values still shorten with an ellipsis.

= 4.2.13 =
* Design Audit findings now name the exact module (Heading module #2) and a Section → Row → Column path so you can walk straight to it.
* Open page in VB no longer 404s on Theme Builder or Divi Library layouts. Those open Theme Builder or Edit layout instead.
* Heading-style chips on a Text module no longer use the word Text, which looked like the Text module.

= 4.2.12 =
* Frame insert now requires the named presets to exist on the site. If any are missing, insert is refused — update the design system to the current version before adding Frames.
* Bundled paid Frames (Hero 01 Light, Features 01 Light, Pricing 01 Light, Call to Action 01 Light) again carry preset names so inserted modules stay bound to the live kit.
* Fullwidth and specialty sections now use the same k-section-* module presets as regular sections.
* Inserted Frames attach their presets in the Visual Builder, including the default button style.
* Reloading the Visual Builder no longer strips a heading's size.
* Divi AI tab: Always-On rules sit first, with reusable commands collapsed underneath.

= 4.2.11 =
* Connect AI now includes Rules for Divi AI (Always-On) and Commands for Divi AI. Both name the live kit; if a family is missing, the text BLOCKs instead of inventing names.
* The governed-build command is a BUILD RULE with a numbered Procedure and a Definition of done checklist. Preset names still come from the live kit.
* Design Assist can apply a whole-page Apply KrafterPRO design system pass on leftover Divi AI layouts (resolve fabricated preset keys, then strip instance styles the presets already control).
* Design Assist flags a missing heading/body type preset, and hardcoded gaps on rows, columns, and groups.
* Type group presets (k-h1, k-text-body, and so on) set size, weight, and line-height — not font family. Family inherits from the kit; leave it unset.
* Frame insert no longer fails the whole insert when a named preset is missing on the destination site; tokens and colours still have to resolve.

= 4.2.10 =
* Bundled Theme Builder Quick-install now needs a licence. Unlicensed sites get a video and a Buy the Theme Builder here button (https://diviuniversity.com/divi-theme-builder/). Uploading your own Theme Builder JSON stays free.
* Theme Builder overwrite warning only shows when the site already has Theme Builder mappings, and can be dismissed for the rest of the browser tab.
* License Settings: the gap above the promo banner matches the gap below it.

= 4.2.9 =
* Audit scan and the wp-admin Colors stat now ignore palette rows that Divi has soft-deleted, matching the Variable Manager and Design System Completeness.

= 4.2.8 =
* Theme Builder Quick install now ships the current starter layout as v1.0, with a version chip like the Design System card.
* Installing a Theme Builder template onto a site that already has one now warns first — both Merge and Replace, including file upload. Replace names how many mappings it will delete; Merge names the Default Website Template and global header/footer.
* The bundled Theme Builder file is layout-only. It no longer includes presets, variables, or colours, so leaving Import Presets ticked cannot duplicate the design-system kit.

= 4.2.7 =
* Frames picker in Visual Builder: click a card (or press Enter/Space) to open the large preview. Hover no longer opens a preview, and the eye Preview button is gone. Add section sits in the overlay footer; after a successful insert the overlay stays open and the button briefly reads Added ✓.
* Locked Frames open the same preview with an Unlock to add link. Frames with no thumbnail still open the overlay (placeholder) and can be added.
* Previous/next controls and the left/right arrow keys page through the current category or search list at full size, without wrapping.

= 4.2.6 =
* Unlicensed sites now get Design Assist in the Visual Builder. Scan and preview stay unlimited. Each site can apply 5 single fixes for life; after that, Apply becomes an upgrade notice. Undoing a trial fix (administrators only) restores a credit. Batch / Modernise all, layout modernisation, and Design Guard stay licence-only.

= 4.2.5 =
* Save as Frame now inlines heading and body type from selected or default group presets, not only from a preset id stored on the module. A Frame inserted on a site without those presets still keeps size, weight, and line-height.
* Capture also walks body/text group-preset slots (designText) and string or id-only group-preset rows.

= 4.2.4 =
* Bundled design system is now 3.1.5. Quick install prefers that file (3.1.4 and earlier stay as fallback). Completeness families are back: 260 presets, 56 variables, 98 colours.
* Merge no longer leaves two palette rows with the same name (for example color-neutral-600). Extra same-name rows fold into the matched colour; presets that pointed at the extras are relinked.
* Save as Frame captures the live Visual Builder canvas, including unsaved work, not only the last saved page.
* Applying a Design Health or Assist fix no longer publishes a draft or changes a scheduled post's date.

= 4.2.3 =
* Heading group presets (k-h1 through k-h6) now change the heading size in the Visual Builder. A leftover local size was keeping the old size after you picked a different preset.
* Completeness no longer writes a local heading size on top of an attached heading group preset.
* Frame insert bakes heading type inline and drops empty colour values so baked sizes are not wiped. Paid Frames on disk are re-baked; the free hero Frame is unchanged.

= 4.2.2 =
* Frame thumbnails: 900px grid tile and 1800px hover preview (never the original upload). Click a tile or the enlarged preview to place the green check on that one Frame. The Preview control is an eye icon. Grid padding is even on all four sides.
* Save as Frame captures a 2000px master; the server derives the two catalog sizes. Dark sections keep their background instead of compositing onto white.
* On the authoring site the picker lists published library Frames only. Bundled seeds stay on disk for consumer fallback and insert-by-id.

= 4.2.1 =
* Frames picker: collapsible category sidebar, search, chips, and Check for new Frames.
* Save as Frame: readiness panel, draft vs publish, thumbnail preview/recapture/upload, and metadata edits without recapturing the section.
* Admin notice when the bundled design system is newer than the one on the site. Lists new preset names; Ignore or add them from Import.
* Unlicensed admin header uses a desaturated banner and the Krafter lockup. A valid licence restores the Pro lockup and colour.
* New vector KrafterPRO and Krafter logos (admin, client report, menu icon). Design Assist in Visual Builder uses a DA wordmark. Learning Guides uses a YouTube-outline icon.
* Admin notices stay until dismissed. The Frames picker design-system note only appears when the site's kit is older than the Frames catalog.
* Divi switcher sits on the workflow bar, immediately left of Audit.
* Bundled design system 3.1.4: k-layout-grid-auto now includes Divi 5 renderAttrs display:grid so auto-grid actually compiles as grid. Sites that already imported it get a one-shot patch.

= 4.2.0 =
* Frames Cloud — author Frames on a central site and have them appear in every licence holder's Divi Visual Builder Frames picker with no plugin update.
* Authoring (define KPRO_FRAMES_AUTHORING_SITE): "Save as Frame" in the Visual Builder captures the selected section, auto-generates a 600px thumbnail, and publishes it via a public REST catalog (krafterpro/v1/frames/cloud/version, catalog, and frame/{id}). New kpro_frame CPT with the editor locked to the Save-as-Frame flow; ids that collide with a bundled Frame are rejected.
* Consumer: the Frames picker pulls the remote catalog (15-minute TTL, version-gated twicedaily cron plus a one-off first-run pull), verifies each Frame's checksum, and remaps its design-token names to the local design system on insert. Falls back to a last-good cache, then the bundled seed, if the authoring site is unreachable.
* Paid Frames are licence-gated at the catalog boundary (FluentCart check_license); the body cache re-checks the local licence before serving.
* Pre-ship hardening: paid-Frame insert after licence activation, draft-Frame endpoint status, kpro_frame capability lockdown, uninstall cleanup.
* Thumbnails clamped to 600px. Optional Cloudflare purge on catalog change (KPRO_FRAMES_CF_ZONE_ID / KPRO_FRAMES_CF_API_TOKEN).

= 4.1.28 =
* Bundled design system is now 3.1.4. Quick install prefers that file (3.1.3 and earlier stay as fallback).
* Heading and body colour on this kit live on k-heading-* and k-body-* module presets. Type group presets set size, weight, and family only — not colour.
* The bundled AI skill (1.0.8) and Connect AI construction rules follow that split, or stop if those colour-role names are missing from the site.

= Unreleased =

These surfaces now require an active KrafterPRO licence. They stay visible. A lock opens the upgrade dialog. Existing site data is not deleted if a licence lapses.

* Export (Variables Manager) — the full design-system JSON.
* Knowledge Graph JSON (AI tab) — every token id and complete value.
* AI Context ZIP (AI tab) — the live-system handoff zip, not the static skill download.
* Brand Apply — writing brand colours/fonts to the live site, including custom font upload.
* Brand kits — save, load, delete, and kit Export/Import JSON. Stored kits remain on the site.
* Design Guard — status and findings (re-scan was already paid). Open Design Audit stays free.
* Client Health Report — generate, preview, and re-download. Agency branding stays stored and shows disabled, not empty. Report retention count stays free.
* Snapshot download — downloading a rollback snapshot as JSON.
* Snapshot rename.
* Snapshots to keep — Changing snapshot retention requires a KrafterPRO licence. Existing snapshots stay listed and restorable.

= 4.1.27 =
* Merge now blocks with a mandatory list when it would overwrite a variable currently in use (active on this site) — the review screen and the confirm step both show the exact variables and their old and new values. There is no checkbox to skip this; the server refuses the import until you confirm.
* This check is re-verified on the server at confirm time, so it cannot be bypassed by skipping the review screen.

= 4.1.26 =
* Frames picker in Visual Builder (native bar icon, catalog tiles, insert without replacing the page).
* Selected Frame tiles show a focus ring. Names sit below the thumbnail with a clear gap.
* Locked paid Frames explain the real licence problem — expired, unverifiable, this site not registered, revoked, or licence server unreachable.
* Every licence reason has a copy row so a new reason cannot silently reuse the unverifiable shell.
* After orphan-preset heal, an admin notice appears only when something changed or the scan hit the 8,000-post cap. A capped scan is stored as capped, not done.
* Delete All Variables & Colors no longer fails with "Divi REST reset did not complete" (HTTP 404) on admin-ajax requests. Divi's Visual Builder REST routes are queued before the reset call, with an in-process fallback when Divi's REST init already ran without them.
* Font-token-migrate no longer writes to live posts. The in-memory helper remains.

= 4.1.25 =
* Frames picker in Visual Builder: native bar icon, catalog tiles, and insert that adds a section without replacing the page.
* Locked paid Frames explain the real licence problem — expired, unverifiable, this site not registered, revoked, or licence server unreachable — instead of a generic confirm failure.
* Every licence reason has a copy row so a new reason cannot silently reuse the unverifiable shell.
* After orphan-preset heal, an admin notice appears only when something changed or the scan hit the 8,000-post cap. A capped scan is stored as capped, not done.
* Font-token-migrate no longer writes to live posts. The in-memory helper remains; Apply still refuses a font-family token on a non-family leaf.

= 4.1.24 =
* Bundled design system is now 3.1.2. Quick install uses that file.
* Design System Status no longer reports gap variables as missing when the kit uses space-* tokens for Divi 5 gaps.
* Import Replace and Merge cards describe what each mode actually does, in normal sentence case.

= 4.1.23 =
* Compact get_design_system_context states when its preset list is a subset (N of M, buttons and defaults only) and names detail:"standard" / list_presets for the full Inventory. It does not invent names to fill the gap.

= 4.1.22 =
* Skill packaging regenerates core, index, and known-defects from the bundled design-system JSON on every build — derived files are no longer copy-only.
* The bundled skill core no longer ships a static rules slice; construction rules and live defects come from design.md or MCP.
* Packaging fails if the skill still contains a static rules slice or a value literal such as pad-xs is 4px.
* Construction-rule family lists omit deprecated, legacy, and never-select names. If every name in a family is blocked, the family prefix is omitted.
* The layout construction rule now covers rows with side-by-side children, not only columns and groups.
* Spacing construction rule binds in order: module spacing preset, then spacing group preset, then token — never both module and group on the same module.

= 4.1.21 =
* Novamira design.md and the AI Context ZIP design.md now come from one serializer (names only, live inventory).
* Construction rules derive layout and spacing names from the live site, or emit an explicit BLOCKED notice — they no longer hardcode kit preset names or spacing values.
* Known defects are tagged never-select, out-of-scope, inert, or informational so the AI does not treat working out-of-scope presets as broken.

= 4.1.20 =
* Font-family tokens stored on heading level are repaired by writing a mapped h1–h6. Clearing that field is refused, because Divi then defaults to h1.
* Plugin packaging fails if the shipped repair still clears heading level instead of writing a mapped tag.

= 4.1.19 =
* Font-family tokens can no longer be written to a non-family leaf (for example heading level or capitalization). Apply refuses those writes.
* Corrected the bundled design-system export: four preset references pointed at variables that were not present in the kit.

= 4.1.18 =
* Bundled design system file is now 3.1.1. Quick install prefers that filename; the payload is the same cleaned 3.1.0 system.
* Replace no longer says “full baseline reset”. The confirm screen lists which presets stay because of a protect prefix or because they are still used on pages or Theme Builder. An optional checkbox (off by default) drops the live-reference keeps; prefix keeps still apply.
* The header preset count no longer treats Divi’s preset-history meta as extra presets.
* Compact MCP design-system context always includes construction rules (layout presets, no spacing literals).
* Bundled AI skill 1.0.6: two-column markup examples bind k-layout-split on the row.
* Contrast matrix lists approved foregrounds on inverse, primary, and secondary backgrounds (text-inverse, text-on-primary, text-on-secondary).
* Fixed contrast matrix so named text-* tokens count as foregrounds on inverse and brand surfaces.

= 4.1.17 =
* Fixed image presets so they no longer stamp a stock Unsplash filename into the title on every customer image. Already-imported sites drop it on this update; new Quick installs get the cleaned presets.
* Fixed Visual Builder preset saves after installing or importing the design system. Import, Quick install, and plugin writes strip extra fields Divi does not allow on presets.
* Fixed Design Health so five retired layout and spacing presets stay flagged even after they are renamed.

= 4.1.16 =
* Changed Design Audit and Client Health Report so CTAs, charts, and print accents use KrafterPRO brand blue again.
* Changed Import so the space between Preview import and Quick install is tighter.
* Fixed Client Health Report Hand Off: clearer generate flow, quieter empty work section, and white-label cover name falls back to the site name when agency name is empty.

= 4.1.15 =
* Fixed Design Audit upgrade cards so they no longer show an inflated “+N score” per group. Biggest-wins ordering still uses the estimate; the hero score projection stays the honest batch rescore.
* Fixed the Design Audit batch score-projection request so it requires a valid licence, matching Fix apply (HTTP 402 when unlicensed).

= 4.1.14 =
* Added detection for sections still on Divi's default top/bottom padding (4%) with a one-click fix to k-section-m in Design Audit and Design Assist. Apply one section at a time — these are not included in Fix All.
* Changed the layout audit WordPress ability so coverage separates one-click fixes from Fix All eligibility. When auto fixes cannot batch, the ability tells agents to apply them individually in Design Audit.

= 4.1.13 =
* Fixed body text so the whole site follows your design-system size, including cart, checkout, and shop pages that had no extra styling. Those pages were stuck at 20 pixels from Divi’s theme settings. Update the plugin to get this. Reinstalling the design system does not fix it.

= 4.1.12 =
* Added two read-only WordPress abilities on 6.9+ (audit one layout; read the last Design Health score). Layout audits always include a Design Audit link, even when nothing is auto-fixable. Not every finding is a token swap — headings inside Text modules are structural.
* Changed the bundled Claude / Novamira skill to 1.0.2: find what’s wrong, fix what’s safely fixable, and say plainly about the rest. Five token/preset abilities stay parked.

= 4.1.11 =
* Added Client Health Report on Hand Off: a print-ready HTML file from the last Design Health scan (never recrawls). Preview, generate, and re-download. Browser Save as PDF. Agency branding needs a licence; without one the report still generates with KrafterPRO on the cover.
* Changed Brand Apply so Color Brand / secondary / neutral shade ramps are written as Brand Studio OKLCH hex (including on rebrand), not Divi relative colours that washed pastel primaries to grey.
* Changed the bundled Claude / Novamira skill to version 1.0.1, built from the same source as the public Divi 5 Design System Skill, so both packages share the same coverage proof.
* Fixed paid features so a licence with a past expires date is invalid. Lifetime seats still pass. Empty or unreadable expiry dates still follow status only.

= 4.1.10 =
* Fixed the bundled Claude / Novamira skill so it no longer says REST reads work without a licence. Every KrafterPRO REST call needs a licence; HTTP 402 is a normal outcome. Without a licence, use a pasted export or the free admin scan.

= 4.1.9 =
* Fixed Read only and other restrictive AI modes so they block all WordPress REST writes (media, settings, menus, custom post types), not only pages and posts.
* Fixed the same modes so they also block Divi Visual Builder REST writes (`/divi/v1/`), after a live check showed an Application Password could change breakpoints without a cookie or nonce.
* Changed Content only and Drafts only so image uploads via WordPress media REST are allowed; Read only still blocks them.

= 4.1.8 =
* Added an Activity log under Protect (next to Design Guard and Snapshots) that records who imported, applied brand, or rolled back — you, AI (MCP), API, WP-CLI, or scheduled. Filter to AI (MCP) only. System still links here.
* Added Connect AI write-access modes: Full, Content only, Drafts only, and Read only. Restrictive modes lock the design system and are enforced on the server. Bind the MCP Application Password (UUID only) so the same credential cannot skip the limit. Refused AI writes appear in the activity log.
* Changed the Activity log toolbar to span the page; helper text is easier to read.

= 4.1.7 =
* Added Design Assist Accessibility cards for Heading, Text, Blurb, and Call To Action (WCAG AA). Blurb/CTA are contrast-only; buttons stay out; contrast is never Apply-all.
* Fixed contrast so a section background from a Divi background group preset (for example k-bg-inverse) is used when there is no local colour; a local colour still wins.
* Fixed contrast so nested H1–H6 colours inside a Text module are checked when that heading is actually in the HTML.
* Fixed the Design Assist (and KrafterPRO update) builder-bar dots so they paint via an html class instead of Divi’s animate badge.
* Fixed the Assist score so it can move after Apply instead of waiting for Reload canvas; opening Assist after a canvas edit no longer rescans only the saved page.

= 4.1.6 =
* Fixed Design Health so Text/Heading modules with a module preset at the top are not pushed onto k-text-body; Accept keeps that preset and its colours.
* Fixed contrast so White on mid-grey can auto-fix via Black/White instead of staying unfixable (white-on-white still does not invert).
* Fixed Modernise all so exact Safe fixes run in the batch, the hero button stays hidden when idle, and clicks actually apply.

= 4.1.5 =
* Fixed Design Health colour scan so hand-typed neutrals (#FFFFFF, black, greys) suggest White / Black / Neutral variables, not Heading or Body Text Color; brand hues are ignored.
* Fixed Design Health after Fix to re-read the saved pages that were just changed before rescoring.
* Fixed Site Audit so unused Divi Theme Design factory sizes are not flagged as static values, and contrast no longer invents #333 text; Heading/Body colour is used, with White/Black when that slot fails on a dark surface.
* Changed finding-card chrome (1px borders, right-aligned actions, stacked-card offset, rectangular filter chips).
* Changed EXPECTED spacing dropdowns to on-brand names (Margin Bottom 2XS) in the matching family only.

= 4.1.4 =
* Added Design Assist stacked cards for identical fixes (Apply all) and identical heading-in-Text guidance (expand places).
* Changed Design Assist content scan back to Heading + Text only (plus layout spacing); Image, Blurb, and Icon stay out for now.
* Fixed heading-in-Text detection so plain paragraph/body Text is not flagged; only real non-empty H1–H6 markup counts.
* Fixed Design Assist group expand so the + control toggles places reliably.
* Fixed Fix contrast for inherited text (writable leaf + preset detach) and neutral fallback when role colours fail AA on coloured surfaces.
* Fixed Design Health score/counts after Fix so refresh matches the live session (MCP could already show 100 while the dashboard looked stale).

= 4.1.3 =
* Fixed Design Assist Headings to show only Heading modules and HTML headings inside Text (not Blurb/module titles).
* Fixed Design Assist and Design Health to skip typography-size findings when a Heading already has a role-matching clamp group preset.
* Added Design Assist and Design Health findings for default Heading/Text with no local size, suggesting k-text-body / k-hN group presets.
* Added Design Assist panel resize for width and height (edges + corner; session persistence).

= 4.1.2 =
* Added Design Health / Design Assist notice for HTML headings inside Text modules, with Mark as intentional; Design Health cards use white surface + severity borders.
* Added Design Assist spacing on section/row/column/group; static spacing presets; Headings vs Text categories; Spacing by layout level; click-to-select; score notification dot; production-ready empty state (buttons stay out of Assist).
* Added Brand Apply Technology kit differentiation and colour-strip hover zoom.
* Changed Import Quick install to Install design system; removed Download JSON links from starter cards.
* Changed heading/text colours to role variables; prefer KrafterPRO group presets for imported type; Modernise all keeps Safe confidence.
* Fixed Heading-in-Text unicode detection and moderate scoring; Design Assist Undo admin-only; dismiss index/re-scan source; mutation locks; score bounce after Fix; rescans after 100/100; font upload hardening; uninstall cleanup; PluginUpdater soft-fail.

= 4.1.1 =
* Fixed Design Assist Visual Builder bar icon: restored the frame icon (sun icon was confusing) and matched Divi’s active blue (#326BFF) while the panel is open.

= 4.1.0 =
* First public release of the 4.x line (minor bump from the 4.0.x pre-launch series).
* Hand Off prefills empty fields from live site data (URLs, versions, environment, theme, plugins, roles, editor, forms/SEO/cache plugins, fonts, colours, DB prefix, and more). Saved values always win; Fill from this site fills anything still blank.
* Launch Date on Hand Off uses a native calendar that opens as soon as you click the field.
* Learning Guide walkthrough videos added for Design Health, Upgrades/Modernise (same video as Design Health), Cleanup, Brand Studio, Export, Hand Off, and Snapshots.

= 4.0.13 =
* Added contextual Learning Guides: Guide control on the tools row, right-hand drawer with per-tool placeholder help, and Learning Centre in the header.
* Guide progress (watched / don’t highlight) is saved per user; no autoplay or auto-open.
* Guide and Learning Centre use the student icon.

= 4.0.12 =
* Workflow stage nav uses Gallery Wayfinding plaques; Language moved to the title-wall header.
* Active stage connects to a matching blue divider so it reads as a tab into the tools row.
* Build → AI More downloads actions use the same brand download CTA as Download design.md.

= 4.0.11 =
* Design Assist: Apply can update the Visual Builder canvas when possible; Apply all like this for identical safe fixes; This module / Whole page scope; session progress chip.
* Design Assist warns when variables or presets are missing and requires a design system before analysing.
* Design Assist panel is width-resizable; Open Design Health opens correctly from the Visual Builder.
* Design Assist and KrafterPRO builder-bar icons match Divi’s 28×28 icon size; Design Assist uses a frame icon.

= 4.0.10 =
* KrafterPRO header Divi icon opens the last Visual Builder page you were editing (Pages list if none yet).
* Header Divi and dark-mode controls, plus the Modernise Match mode summary, no longer show borders.

= 4.0.9 =
* Divi 5 Visual Builder left bar includes a KrafterPRO icon that opens the KrafterPRO admin UI in a new tab.

= 4.0.8 =
* Build → AI tab next to Brand Studio with Novamira design.md, Claude/Novamira skill ZIP, AI Context ZIP, and Knowledge Graph downloads.
* design.md is generated from the live Design System (Knowledge Graph scan + readiness gate) for Novamira/Claude website builds.

= 4.0.7 =
* Brand Studio colour kits auto-adjust primary/secondary (and text) so Contrast (WCAG AA) passes by default when a palette is selected.

= 4.0.6 =
* Brand Apply colour kits: wider tiles, Current Brand in its own band spanning two cards, readable hints.
* Brand Apply step titles quieter (no step dots); Create custom color kit without dashed tint box.
* Admin little titles (section labels with en-dash) use 1px letter-spacing that beats heading defaults.

= 4.0.5 =
* Design Health Score breakdown: live category progress bars; quieter chrome (no weight %, header icon, or post-fix category delta strip).
* Modernise session score track fill color follows the live score bands (good / ok / warn / bad).
* Design Health admin UX distill: quieter Import completeness, collapsible Modernise plan and intentional exceptions, notice stack below the workflow menu, and always-dark Modernise session bay.

= 4.0.4 =
* Design Health Fix for Default text size now attaches the displayed group preset (e.g. k-text-body) instead of only the linked number variable.

= 4.0.0-beta.2 =
* Visual Builder settings chrome no longer inherits fluid body/heading sizes.
* Page-level Modernise all applies layout-mod upgrades; failures surface in the toast.
* Design Health feedback updates to Congratulations at 100% after fixes.
* Pure #ffffff maps to the white palette token; white and black tokens in the design system.
* Production packaging excludes .impeccable design tooling.

= 4.0.0-beta.1 =
* Design System Completeness checklist on Import with Gallery success / warning / error tones from how much is missing.
* Completeness card and chip use Gallery Wayfinding radii (4px / 2px).
* Finding Preview on Design Health upgrades; Final cleanup for unused presets at 100% health.
* Heading foundations OK when either a heading preset or Variable Manager text-size exists for that level.

= 3.1.1 =
* Design Health scan scratch files under uploads are denied from the web and old orphan files are cleaned up.
* License status refresh no longer demotes a valid activation when the server returns an incomplete or unexplained status.
* Theme Builder Replace requires confirmation, saves a rollback snapshot first, and Rollback restores Theme Builder mapping.
* Design System Completeness Check is read-only during scan; heal aborts if a rollback snapshot cannot be created.
* Delete presets by pattern aborts if a rollback snapshot cannot be created.
* Design Health scan runs without a licence; Fix and paid write actions stay licence-gated.

= 3.1.0 =
* Connect AI submenu: readiness checks and copy-paste helpers to wire Claude Desktop or remote MCP clients to this site via Application Passwords (no secrets stored in WordPress).
* Companion MCP server package (mcp-server): stdio and Streamable HTTP access to KrafterPRO REST for design tokens, presets, brand kits, and dry-run-safe writes.

= 2.0.76 =
* Import: normalize **color variable** `value` when JSON uses nested Divi objects (preserves `$variable(...)$` / hex / rgb shapes; avoids broken `Array` strings).
* Import: palette **label → id** map is built once for the import pass and passed into variable sanitization for label-based color refs.
* Import: optional sort-by-`order` per variable type — filter `kpro_var_import_reorder_variables_by_order_field` (default **off**; enable when you want explicit order fields to drive storage order).

= 2.0.75 =
* Documentation: recorded a structural diff between **KrafterPRO_Design_System_v1.0.json** and **v1.1.json** (see **CHANGELOG.md** in the plugin folder for the full bullet list: file size, `global_colors`, `global_variables`, preset counts, and `_kpro_presets_raw` growth).

= 2.0.74 =
* Style guide: full-width layout when the Style guide tab is active; removed **Semantic color variables**, **Other color tokens**, and **Font variables** sections (fonts in use + typography remain).

= 2.0.73 =
* Style guide: remove light-logo upload; single logo column beside narrative fields; report width **1280px**; new **ribbon** swatches for brand/palette tiles and **round chip + value** for color token tables; section panels on soft slate for clearer PDF layout.

= 2.0.72 =
* Style guide: full visual redesign for a client-ready PDF — cover block, numbered sections, refined tables and brand/palette rows, print margins and hiding admin chrome (card header, footnote) when saving as PDF.

= 2.0.71 =
* Style guide: token tables and palette never use raw opaque `gvid-*` / `gcid-*` strings when Divi duplicates them as the label; typography blocks and “fonts in use” cards span full width; palette groups get distinct accents (primary, secondary, greyscale, semantic); PDF print keeps new cards readable.

= 2.0.70 =
* Style guide: full palette splits into **Color shades** (primary/secondary ramps) and **Palette colors** (other swatches); brand slots stay under Brand colors only.
* Style guide: omit Divi plumbing tokens from lists — `--et_global_heading_font`, `--et_global_body_font`, and `gvid-iqrzvzpvzm` (typography preview still uses theme heading/body fonts).

= 2.0.69 =
* Style guide: hide internal `gcid-*` palette and variable ids from the live view and PDF; show human-readable names and hex values only.
* Style guide: refreshed layout — card-based brand and palette grids, section intros, and contained tables for a cleaner design-system presentation.

= 2.0.68 =
* Admin: Import, Export, Handoff, and Style guide tabs use filled Phosphor-style icons (document import/export, handoff document, palette).
* Admin: bundled downloads, backup JSON download, and PDF export use a filled cloud-with-arrow-down icon; tray upload/download SVG paths corrected for the restore control.

= 2.0.67 =
* Fix: plugin updates are only hidden when a **saved** licence key exists and status is not active (fresh installs without a key can still see update notices).
* Admin: licence banner copy now says **Licence inactive** for non-active states.

= 2.0.44 =
* Admin: **Links** and **Changelog** are again **tabs** on the main KrafterPRO screen; WordPress submenus for those pages were removed.

= 2.0.43 =
* Admin: **Links** and **Changelog** removed from the in-plugin tab bar; they appear as **WordPress submenus** under **KrafterPRO** (same styling via shared admin CSS).

= 2.0.42 =
* New: **Style guide** tab — dynamic visual overview of the site design tokens (brand colors, palette, color variables, fonts, typography samples, spacing). Refresh reloads from Divi globals; **Save as PDF** opens print so you can save as PDF.

= 2.0.41 =
* Admin: the browser AJAX timeout for preview/import (and other admin requests using the same helper) now scales with PHP `max_execution_time` instead of a fixed 90 seconds, so it matches what the System tab reports. Timeout error text explains browser vs PHP vs possible proxy limits.

= 2.0.40 =
* Fix: palette-only color exports (files with `global_colors` but an empty `global_variables` array) import again even when exclusions are sent from the UI.

= 2.0.39 =
* Fix: excluding brand palette colors during import now prevents those brand slots from syncing into Divi’s theme options (so excluded colors no longer override).

= 2.0.38 =
* Import: removed the import profile selector and “My profile” save control; other import UI prefs (mode, exclusions, export checkboxes, layout prefs) are unchanged.

= 2.0.37 =
* Removed unused upgrade-banner and locked-tab admin styles, legacy no-op “pro feature” AJAX stubs, and outdated documentation that described a separate limited-tier UI.

= 2.0.36 =
* Admin: extra top padding on the main KrafterPRO header card; outer padding is top-only (0 on the sides and bottom) so layout stays aligned with existing inner padding.

= 2.0.35 =
* Admin: brought back the KrafterPRO confirmation modal for import, rollback, and reset flows; it is attached to `document.body` on load with the loader and toasts so tabs stay clickable.

= 2.0.34 =
* Admin: removed the in-app confirmation modal for import, rollback, and reset actions; the browser confirm dialog is used again with the same explanatory text.

= 2.0.33 =
* Admin: tab bar clicks blocked by invisible full-screen layers — the confirmation modal, busy overlay, and toast host are now attached to `document.body` on load so WordPress admin transforms cannot pin those layers over the tabs.

= 2.0.32 =
* Admin: fixed tab switching when overlays used `position: fixed` inside the KrafterPRO shell — overlays are output after `.kpro-wrap`, and hidden modal/loader states disable pointer events for extra safety.

= 2.0.31 =
* Import: **Confirm & Import** opens the same confirmation modal as other risky actions, but with the **primary confirm** button (same indigo style as the in-page Confirm & Import CTA) and a matching dialog accent instead of the red destructive variant.

= 2.0.30 =
* Admin: destructive actions (rollback, reset variables/colors, reset presets) use a KrafterPRO modal with backdrop, Escape to dismiss, and a clear danger-styled confirm button instead of `window.confirm`.

= 2.0.29 =
* System: separate “Max content width” setting (compact through extra wide, or full padded column) stored with your UI prefs; works with full-bleed so the shell can span the column while the UI stays capped.

= 2.0.28 =
* System: optional full-bleed KrafterPRO background aligned to the WordPress admin content area (per-user preference with import/export UI prefs).

= 2.0.27 =
* Admin: indeterminate progress bar on the global busy overlay during long AJAX (import, export, preview, rollback, reset).
* Import preview: skeleton placeholder and dimmed previous content while the server builds the diff; summary line shows “Building preview…” until the response returns.

= 2.0.26 =
* Import: per-user UI preferences (mode, exclusions, export checkboxes) with AJAX load/save and debounced updates.
* Import: inline pre-flight warnings from health data, and a sticky preview summary bar (mode/scope/counts).
* Export: template shortcuts for common export shapes; Space/Enter toggles the row checkbox when an export row is focused.
* System: “Copy diagnostics” copies a JSON snapshot for support tickets.
* Fix: removed an extra wp_unslash when writing Divi theme color options so values are not corrupted on import.

= 2.0.19 =
* Import preview: preset summary now compares each preset entry in the file to this site (by id or list index) and shows how many are new, will update, or unchanged — same style as variables.
* Import preview: merge footer hint clarifies that “unchanged” covers those preset rows too.

= 2.0.18 =
* Import preview: clearer “what will change vs stay the same” copy for Merge mode (new / will update / unchanged = not written), plus preset merge note and footer hint.

= 2.0.17 =
* Import: Shade swatches labeled like `pri 100` / `sec 200` are re-linked to Primary/Secondary via `$variable(...)` (Divi lightness), so changing the brand color updates the whole shade ramp after import.

= 2.0.16 =
* Export: Optional filter `kpro_var_export_exclude_inactive_palette_rows` to exclude inactive global palette swatches from the downloaded JSON (helps avoid exporting duplicate/historical shades that aren’t part of your active palette).

= 2.0.15 =
* Fixed: Export keeps `global_colors` values exactly as stored (hex or `$variable(...)` references) so re-importing the same file does not change the format.
* Fixed: Import summary color count reflects palette rows in the uploaded file (including brand ids), not the internal stored palette after Divi moves brand slots into theme options.

= 2.0.14 =
* Fixed: Import accepts **associative** `global_colors` objects (id → row), not only `[id, row]` tuples — previews already did; the writer now matches, so brand palette rows and Customizer sync are no longer skipped for that JSON shape.
* Fixed: Import can add missing **semantic** color variables (`primary-color`, `heading-color`, `body-color`, `link-color`, …) when the palette includes the corresponding `gcid-*` swatches, keeping Variable Manager and token references consistent.
* Fixed: **Shade** color variables matching `pri-200` / `primary_500` / `sec-100` style ids with baked hex values can be re-linked to `$variable(...)` references on the primary/secondary palette slots (with Divi lightness), when those base swatches exist in the imported palette.

= 2.0.13 =
* Fixed: Import normalizes Divi’s tuple-shaped `global_colors` storage before merge/replace, so Primary/Secondary/Heading/Body/Link rows apply and theme-option sync runs instead of only non-brand shades updating.

= 2.0.12 =
* Fixed: Export no longer replaces color variable values with plain hex; Divi `$variable(...)` tokens stay in the JSON so round-trips match what Divi expects.

= 2.0.11 =
* Fixed: Import — brand palette slots (Primary, Secondary, Heading, Body, Link) no longer turn white when `global_colors` entries use `$variable(...)$` tokens; values are resolved from the uploaded file before syncing Customizer options.

= 2.0.10 =
* Export tab: **File name** field — shows default download name, optional rename before download (client-side sanitization, `.json` ensured); empty field uses server default.
* Export tab: focusing the file name field clears it for quick entry of a new name.
* Fixed: Export list and downloaded JSON no longer duplicate **Heading** / **Body** font rows when the same ids already exist in Divi’s global variables (merge by id).
* Documentation: **MANUAL.md** (Export tab section) and release notes updated.

= 2.0 =
* Import (Divi 5): On global color import, sync **Primary / Secondary / Heading / Body / Link** palette IDs to the same theme options Divi’s Variable Manager uses (`accent_color`, `secondary_accent_color`, `header_color`, `font_color`, `link_color`), and remove those keys from persisted palette data to match Divi’s own `GlobalData::set_global_colors` behavior.
* Import (Divi 5): Sync **Heading** and **Body** fonts to `heading_font` and `body_font` when the payload includes Divi export IDs (`--et_global_heading_font`, `--et_global_body_font`) or matching Heading/Body typography rows (before and after site ID normalization).
* Documentation: **MANUAL.md** added (user manual + April 2026 implementation snapshot: brand rows vs. theme options). Readme FAQ and description reference it.
* Documentation: readme refreshed — stable tag 2.0, tested-up-to 6.8, features and tabs aligned with current UI.
* Admin UI: **Rollback** and **Import Changelog** are separate full-width tabs (version history vs. per-import diffs).
* Admin UI: consistent spacing scale and 4px corner radius across cards, notices, and controls; streamlined import preview (plain labels, no step badges).
* Feedback: success toasts and inline success messages use high-contrast green styling with light text.
* Copy: Useful Links includes Divi 5 Community, Divi 5 Mastery course, Support, and KrafterPRO User Guide.
* Branding: About card logo asset updated; plugin header version and `KPRO_VAR_VERSION` set to 2.0; Author URI https://krafterpro.com.

= 1.8.0 =
* Fix: resolve_color now uses a per-request memoisation cache — eliminates repeated JSON parsing for shared base colors
* Fix: import is now fully atomic — all processing happens before any DB writes, preventing blank state on server timeout
* Fix: all fetch() calls now check response.ok before parsing JSON — PHP 500 errors now show a proper error message
* Fix: version history snapshot capacity increased from earlier limits
* Fix: readme.txt synced to match plugin version
* Improvement: Onboarding copy for export and support resources

= 1.7.2 =
* Fix: renderPreview now uses null-safe DOM helpers — silent JS crash from missing elements no longer stops color rendering
* Improvement: import success message now instructs users to fully close and reopen Divi Builder to see changes

= 1.7.1 =
* Fix: replace mode now correctly wipes both et_global_colors and et_global_variables before writing new data

= 1.7.0 =
* New: Export tab with hero layout and stat cards
* New: Separate Import and Export tabs
* New: Live stat bar in header showing current variable counts

= 1.6.0 =
* New: Tab-based navigation (Import, Export, History & Changelog, About)
* New: Drag-and-drop upload zone
* New: Two-column layout for wider viewports
* New: Color swatches in version history snapshots
* New: Better empty states with CTAs
* New: Micro-animations throughout
* New: Persistent last-import status in header

= 1.5.0 =
* New: One-click export of current Divi 5 variables to JSON
* New: Import changelog — per-import diff showing added, modified, and removed variables

= 1.4.0 =
* New: KrafterPRO logo in header with brand colors (60/30/10 rule)
* New: Version display — plugin version and Divi version in header

= 1.3.0 =
* New: Preview panel before import — full color swatch grid, fonts, and spacing variables
* New: Version history with rollback — last 3 snapshots, one-click restore
* New: Two-step import flow (parse → review → confirm)

= 1.2.0 =
* Updated plugin identity — published under KrafterPRO brand by MAK

= 1.1.0 =
* Initial release
* Colors, fonts, and spacing/number variables
* Replace and Merge import modes
* Divi 5 detection gate on activation and runtime
