=== TOC Genius Pro ===
Requires at least: 6.5
Tested up to: 7.1.3
Requires PHP: 7.4
Stable tag: 0.2.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A separate TOC Genius add-on for ordered rules, shared templates, and adaptive navigation.

== Description ==

TOC Genius Pro requires the Free TOC Genius plugin. Distribute this add-on separately from the WordPress.org Free package.

* Up to 30 ordered rules; the first enabled matching rule wins.
* All/Any logic with up to 8 conditions per rule: category slug, tag slug, content type, title contains, and eligible heading count.
* Rule overrides for automatic show/hide, minimum headings, navigation layout, and appearance templates.
* Searchable articles for rule testing and category/tag selectors with manual fallbacks.
* Unicode-aware, literal case-insensitive title matching.
* Up to 30 shared templates with content-type and rule assignments; confirmed deletion safely clears references.
* Validated schemaVersion 1 JSON template import/export with a last-import backup and undo.
* Complete configuration export/import: Free globals, templates, ordered rules, assignments and navigation. Review before replacement; Undo is protected from later edits.
* Adaptive desktop rail when the theme has at least 250px of clear right-side space; occupied layouts retain inline contents.
* Mobile contents panel, hierarchical search, Escape dismissal, and heading focus.

There are no default rules or template assignments. Adaptive navigation is opt-in and manual TOCs stay inline. Existing per-post disable and placement controls take priority over automatic rules.

Content-type template assignments are preserved while their registering plugin is unavailable and resume when that public content type returns.

No licensing requests, telemetry, external assets, checkout, or automatic Pro update service are included in this beta. This add-on is fully usable after activation. Commercial distribution, pricing, and support terms are a separate release task.

All source is bundled and has no build step.

== Installation ==

1. Install and activate TOC Genius Free version 0.2.0 or later.
2. Upload and activate TOC Genius Pro.
3. Open Settings > TOC Genius and use Rules, Saved templates, or Advanced navigation.

== Frequently Asked Questions ==

= Does Pro replace Free? =
No. Install Pro alongside Free. Free owns heading extraction, manual placement, appearance controls, post overrides, and the common renderer.

= Do templates contain publishing logic? =
No. Templates store appearance only. Rules decide automatic visibility, minimum headings and layout. Template edits update every assignment to that stable template ID.

= What is exported? =
Saved templates has an appearance-library export which merges matching IDs. Tools has a separate complete-configuration export including Free global settings, templates, ordered rules, assignments and navigation. It excludes article bodies, per-post overrides and each site’s uninstall-cleanup choice. Complete imports replace the configuration after a 15-minute preview and explicit confirmation. A stale preview cannot overwrite later settings edits.

= What does undo restore? =
For complete configuration imports, Undo restores the configuration before the latest successful import only while no later configuration edit has occurred. Import and Undo require supported transactional storage; unsupported storage is rejected before configuration changes. The separate template-library Undo restores the earlier library, including reverting later template edits; missing references are cleared.

= What happens when Pro is deactivated? =
Free continues with its global defaults and post controls. Pro data is retained. Adaptive navigation and Pro policies stop applying.

== Changelog ==

= 0.2.0 =
* Delete obsolete templates with confirmation and safely clear their references; explain the 30-template duplication limit.
* Match non-English title capitalization with Unicode-aware literal comparison.
* Add explicit automatic show/hide rules with first-match priority.
* Search articles, categories and tags with accessible keyboard controls and manual fallbacks.
* Export/import complete configuration with strict validation, preview, confirmation, atomic replacement and guarded Undo.
* Requires Free 0.2.0 or later.

= 0.1.1 =
* Keep adaptive navigation inline when the rail would overlap theme content.
* Preserve template assignments while a content type is temporarily unavailable.
* Requires TOC Genius Free 0.1.1 for shared navigation and placement fixes.

= 0.1.0 =
* First beta of the separate Pro add-on.
