/*
Theme Name: FileDeck
Template: twentytwentyfive
Description: FileDeck brand child theme of Twenty Twenty-Five. Marketing-site design system v1.
Version: 1.42.0
License: GPL v2 or later
Text Domain: filedeck-theme
*/

/*
 * Design tokens live in theme.json (editor presets) and are mirrored here
 * as --fdk-* custom properties for the component library in
 * assets/css/fdk-site.css. This file keeps only base polish; components
 * are all fdk-* classes in fdk-site.css.
 */

:root {
	/* The marketing site is a light-only design. Pin the scheme so native
	   controls (any injected search / form <select> popups) render light on
	   dark-mode devices, matching the site. */
	color-scheme: light;
	--fdk-blue-900: #1e3a8a;
	--fdk-blue-800: #1e40af;
	--fdk-blue-700: #1d4ed8;
	--fdk-blue-100: #dbeafe;
	--fdk-blue-50: #eff6ff;
	--fdk-ink: #0f172a;
	--fdk-slate-600: #475569;
	--fdk-slate-400: #94a3b8;
	--fdk-slate-200: #e2e8f0;
	--fdk-slate-50: #f8fafc;
	--fdk-white: #ffffff;
	--fdk-green-600: #16a34a;
	--fdk-red-600: #dc2626;
	--fdk-mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
	--fdk-radius-card: 16px;
	--fdk-radius-browser: 14px;
	--fdk-radius-btn: 12px;
	--fdk-border: 1px solid var(--fdk-slate-200);
	--fdk-shadow-card: 0 1px 2px rgb(15 23 42 / 0.05), 0 8px 24px -8px rgb(30 64 175 / 0.12);
	--fdk-shadow-browser: 0 2px 4px rgb(15 23 42 / 0.04), 0 24px 48px -16px rgb(30 64 175 / 0.18);
}

/* Links */
a {
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

/* Legacy site-title glyph (kept for templates still using site-title) */
.wp-block-site-title a {
	font-weight: 800;
	letter-spacing: -0.03em;
	text-decoration: none;
	color: var(--fdk-ink);
	font-size: 1.4rem;
}

.wp-block-site-title a::before {
	content: "";
	display: inline-block;
	width: 0.9em;
	height: 0.9em;
	margin-right: 0.4em;
	vertical-align: -0.08em;
	background: linear-gradient(135deg, var(--fdk-blue-800) 0%, #3b82f6 100%);
	border-radius: 3px;
	box-shadow: 3px -3px 0 -1px rgba(30, 64, 175, 0.35), 6px -6px 0 -2px rgba(30, 64, 175, 0.15);
}

.wp-block-navigation a {
	font-weight: 500;
	text-decoration: none;
}

.wp-block-navigation a:hover {
	color: var(--fdk-blue-800);
}

/* Tables (pricing page polish until its phase-2 rebuild) */
.wp-block-table th {
	background: rgba(30, 64, 175, 0.05);
}

/* The embedded plugin inherits the brand accent */
.filedeck {
	--fdk-accent: var(--fdk-blue-800);
}

/*
Changelog
1.42.0 — WordPress.org listing is LIVE (wordpress.org/plugins/filedeck, 2.12.2): retire the launch-pending download workaround. Removed fdk-download.js, the .fdk-dlm modal styles, the shipped free zip (download/), and the fdk_wporg_pending()/fdk_free_zip_* helpers + modal markup. Every "Download free" CTA (already fdk_install_url()) now lands straight on the .org listing. The fdk_notify CPT + collected signups are KEPT (Notify List admin) until the launch email can be sent — blocked on the Brevo SMTP key.
1.37.1 — Modal free zip refreshed to plugin 2.12.1 (zip + lead-capture fix release).
1.37.0 — Work order #18 content: new KB tutorial (list-files-with-download-button), role-user-restrictions gains testing checklist + common-mistakes sections, and ops-create-wo18-pages.php creates three pages on prod (members-document-library landing, best-wordpress-document-library-plugins roundup, filr-vs-filedeck comparison; Filr claims verified from its public listing July 2026).
1.36.1 — Pricing: curate the Pro column from 15 lines to 10 strong ones + a quiet "Plus: … see every feature →" tail line (fdk-plan-more) naming the folded features, so the parity gate's aliases all remain in the region. New .fdk-plan-more styles.
1.36.0 — Plugin 2.12.0 release surfaces: pricing + features patterns list client areas (Pro); new KB article (client-areas) rendered into docs/; customer changelog entry; modal free zip refreshed to 2.12.0.
1.35.1 — Modal free zip refreshed to plugin 2.11.1 (front-end watermark hotfix release; the zip refresh keeps the modal's served version current).
1.35.0 — Plugin 2.11.0 release surfaces: pricing + features patterns list dynamic PDF watermarking and view-only documents in the AI tier; 2 new KB articles (pdf-watermarking, view-only-documents) rendered into docs/; customer changelog entry; modal free zip refreshed to 2.11.0.
1.34.1 — Version-bust the launch-pending modal's zip URL (?v=<ver>): Cloudflare's 4h edge cache otherwise keeps serving the previous build after a release.
1.34.0 — Plugin 2.10.0 release surfaces: pricing + features patterns list download notifications, daily download limits, and delivery control; 3 new KB articles (delivery-control, download-notifications, download-quotas) rendered into docs/; customer changelog entry; modal free zip refreshed to 2.10.0.
1.33.0 — Launch-pending download modal: while the wordpress.org listing awaits approval, every "Download free" CTA (the baked-in wordpress.org/plugins/filedeck and Freemius free-plan links) opens a modal (fdk-download.js + .fdk-dlm) offering the latest free zip directly (download/filedeck.zip, refreshed per plugin release — see docs/RELEASE.md) plus a notify-me email signup (REST fdk-site/v1/wporg-notify → fdk_notify CPT + PostHog). Single off-switch: fdk_wporg_pending() in functions.php.
1.29.0 — SEO fundamentals: (1) KB article routes no longer emit core's second canonical pointing at /docs/ (remove_action rel_canonical on article routes) and og:url now reports the article URL via the new filedeck_meta_url filter — the duplicate canonical risked Google collapsing all 63 articles into the hub. (2) Demo sample documents + their category/tag archives are noindex,follow and removed from the sitemap (theme-only policy — customer sites keep their documents indexable). (3) /changelog/ gets its own meta description instead of the homepage default. inc/docs.php, functions.php.
1.26.3 — Changelog renderer: entity-encode literal square brackets in entry text. esc_html() leaves "[" and "]" alone, so a documented shortcode in a code span (`[filedeck_submit]`) survived into post content and the_content's do_shortcode() EXECUTED it — rendering a live submission form (and loading Turnstile) inside a release note, or a "please log in to submit" link for logged-out readers. Brackets are now encoded after markdown-link parsing, so [text](url) still works and everything left is inert. inc/changelog.php.
1.26.0 — SEO/entity: emit Organization + WebSite + SoftwareApplication JSON-LD as a single @graph (new inc/schema.php); no invented review markup, offers as an honest $0–$399 AggregateOffer. Analytics hardening: GA4 + PostHog now fire only on the production host (fdk_is_production_host) so local/staging/clones don't pollute the property. functions.php, inc/schema.php.
1.24.3 — Homepage: add a bold "Coming from another document library plugin?" switch band (dark cta-band) after the AI section, linking to /switch/. New patterns/switch-band.php; referenced from the front page.
1.24.2 — Switch page: reframe the offer to assisted/done-with-you (heavy lifting on your own WordPress, files stay put, you stay in control) rather than done-for-you; reference the self-serve Documents → Migrate tool + /docs/migrate-from-another-plugin/; add "Do you need access?" / "Can I do it myself?" FAQs. patterns/switching.php.
1.24.1 — Pricing: add a "Moving from another document library plugin? We'll move it for you, free →" caption under the lede, linking to /switch/. patterns/pricing-table.php.
1.24.0 — Add a "Switch to FileDeck" page (patterns/switching.php): the offer is free hands-on migration + matching the time left on the visitor's current plan (deliberately NO price discount — honest flat pricing is the brand pillar). New "tell us about your library" form ([filedeck_migration_form] shortcode) posting to fdk-site/v1/migration-request, stored as a private Migration Requests CPT + emailed to the admin + mirrored to PostHog; honeypot + nonce + per-IP rate limit, no IP stored. Footer "Switch to us" link. functions.php, patterns/switching.php, fdk-site.css, footer.
1.19.5 — Favicon: /favicon.ico served the WordPress logo (core's no-Site-Icon fallback) and Google indexed it — serve the FileDeck mark instead. apple-touch-icon now a square 180 PNG, not the 1200x630 OG image.
1.19.3 — Features page: quiet monochrome integration logo (Zapier, Google Analytics, Elementor) on the cards that name those products; official brand paths, inline SVG.
1.19.2 — Features page: a line-icon chip on every feature card (Free/Pro brand blue, AI violet) for scannability; inline SVG, no external assets.
1.18.7 — Forward the plugin filedeck:ask event to PostHog (demo analytics; respects DNT).
1.18.6 — Remove "public beta" framing across the site (hero pill, CTA band, security page); fix the CTA demo count to 66.
1.18.5 — Add a "real, live answer" caption under the Ask box (home + demo), mirroring the library caption.
1.18.4 — Move the home-page Ask box directly under the hero library (mirrors the demo); revert the AI feature section to its illustrative card so there is one live Ask box per page.
1.18.3 — Ask this library is now a live chat box on the home page (AI feature section) and the demo page, with clickable example questions.
1.18.2 — Demo counts updated to 66 documents / 11 categories (added the AI sample set).
1.18.1 — Demo page: add an "Ask this library" AI section (filedeck_ask) with example questions mapped to the sample documents.
1.18.0 — Templates renamed for plugin 2.0.0 post-type prefix migration (single-filedeck_document, taxonomy-filedeck_category/_tag). Requires plugin >= 2.0.0.
1.17.24 — Housekeeping: inc/changelog.php header comment updated for the image-based deploy flow (deploy.sh retired). No functional changes.
1.17.23 — Pricing: "Download free" now opens the embedded Freemius overlay (plan 56543) like the paid buttons, instead of linking out to the hosted opt-in page. The old comment claiming the overlay can't do $0 opt-ins was a misdiagnosis — verified against production that it can. Hosted-page URL kept as the no-JS href fallback.
1.17.22 — Cloud storage improvements (plugin 1.9.0): new changelog entry + KB note in external-files (connected accounts are admin-only, credentials encrypted at rest, cloud files now show their size). KB rebuilt.
1.17.21 — Privacy: redact personal data from KB screenshots — the IP-address column in the Activity Log shot and the email column in the Leads shot. Visitor IPs and emails should not appear in docs, least of all a privacy-focused product's.
1.17.19 — Surface the Google Analytics 4 integration (Pro) and the lead webhook / Zapier connection on the features page, pricing table and KB; add GA4 + the analytics dashboard to the readme Pro list. Feature parity. KB rebuilt.
1.17.18 — Feature parity: surface two shipped features that were missing from customer-facing copy — the analytics dashboard (Pro) and the Elementor widget — on the features page, pricing table and KB. (Front-end submissions is deliberately excluded per the KB claims-ban, so it was left out.) KB rebuilt.
1.17.17 — Content accuracy + feature parity: fix the refund period to 30 days (hero, pricing FAQ; the pricing table already said 30); surface cloud storage (S3/Dropbox/Drive/OneDrive, Pro), automatic PDF thumbnails (Pro) and the Elementor widget (free) on the pricing table, features page and KB; remove the Memphis comparison from the footer; rebuild the /docs KB. Comparison-page copy fixes ship as WP content, not the theme.
1.17.16 — Footer: add a "Compare" column linking the 8 published comparison pages (previously orphaned — reachable only by direct URL / search). Widen the footer grid to 5 columns (1.5fr + 4×1fr). footer.html, fdk-site.css.
1.17.15 — PostHog: route through a first-party managed reverse proxy (t.getfiledeck.com → PostHog Cloud EU) so ad-blockers don't block analytics — array.js, config and event ingestion all go through the one same-domain host. api_host/server-side capture point at the proxy; direct EU host stays as the filter fallback. functions.php.
1.17.14 — PostHog: fix events not reaching the project — the project is in the EU region but the host was set to US, so ingestion accepted events and silently dropped them. Point api_host (and the server-side capture) at https://eu.i.posthog.com. Keeps the cookieless persistence:'memory'; adds capture_pageview:true. functions.php.
1.17.12 — Add a feature-request form: an on-brand "Missing a feature?" section on the home and features pages (plus a footer link), posting to a public fdk-site/v1 REST endpoint. Submissions are stored durably as a private Feature Requests CPT and mirrored to PostHog server-side (so Do-Not-Track visitors are still recorded); honeypot + nonce + per-IP rate limit; no IP stored. functions.php, patterns/feature-request.php, fdk-site.css, footer.
1.17.11 — PostHog: privacy-harden the config — persistence:'memory' (no cookies, no local storage), respect_dnt (honour Do Not Track), session recording off. Keeps the site's "no third-party cookies" stance. functions.php.
1.17.10 — Add PostHog product analytics (front-end wp_head snippet, mirrors the GA4 block: skipped for logged-in admins). Project key set (US region); override or disable via the filedeck_posthog_api_key filter, region host via filedeck_posthog_host (EU is https://eu.i.posthog.com). functions.php.
1.17.7 — Add SEO output for imported content pages: emit each page's FAQPage JSON-LD (postmeta _fdk_faq_schema) and feed its meta description (_fdk_meta_description) into the theme's single description tag via the filedeck_meta_description filter (no duplicate tag). Inert until the content is imported. inc/content-meta.php.
1.17.6 — Customer changelog entry for plugin 1.2.17 (mobile table paging fix).
1.17.5 — Truth-in-advertising copy fixes (claims audit): remove the false "libraries over 500 documents switch to server-backed search and pagination" (that mode is unbuilt — rendering + paging are client-side, instant-search index covers up to ~500) across the /docs KB; correct the shortcode sort attribute (sort_by/sort_order) and column-key list (16 keys, content not "description"); align the WordPress minimum to 6.1; fix the demo counts to the real 61 documents / 10 categories (cta-band, trust-strip, demo-sandbox). KB rebuilt.
1.17.4 — Fix the mobile menu: the header's backdrop-filter made it the containing
        block for the menu's position:fixed overlay, so the open menu was trapped
        inside the 68px header bar (only the first link visible, close button
        off-screen). The frosted-glass effect now lives on a ::before layer.
        The hamburger is a proper 44px bordered button (was a bare 24px icon),
        the open overlay gets an explicit white background, and overlay links
        are tap-sized.
1.17.3 — Merge: fold in the theme 1.16.3 changelog-renderer fixes (same-day releases sort newest-version-first; wrapped bullet lines render as hanging list items) alongside the /docs knowledge base.
1.17.2 — Fix a memory-exhaustion 500 on /docs: inject the rendered HTML at the_content priority 99 (after wpautop/wptexturize/do_shortcode) so WP does not re-format the pre-built markup. See 1.17.0.
1.17.1 — Fix the /docs page rendering blank in block themes (post-content runs outside the loop) and make the docs layout full-width. See 1.17.0.
1.17.0 — Add the knowledge base at /docs: 58 KB articles (hand-written Markdown in docs/filedeck-kb/, rendered to HTML + index.json by ops/build-docs.sh) served through inc/docs.php on a single "docs" page with a collection sidebar, search, breadcrumbs, related links and TechArticle JSON-LD. Agent files llms.txt + llms-full.txt served from the site root. Footer link under Product.
1.16.3 — Changelog entry for plugin 1.2.16 (tidier admin menu). Renderer fixes: same-day releases now sort newest-version-first, and wrapped bullet lines render as list items instead of a dash-paragraph.
1.16.2 — Changelog is product-only: drop author bylines and remove commercial/company items (e.g. on-site checkout) from entries; add the "product changes only" and "no personal bylines" editorial rules.
1.16.1 — Link the changelog from the footer (Product column).
1.16.0 — Add the public product changelog at /changelog: hand-written Markdown entries in changelog/*.md, rendered reverse-chronologically by inc/changelog.php via the fdk/changelog pattern. Linear-style feed; editorial rules in changelog/CONTRIBUTING.md; release process in docs/RELEASE.md.
1.15.7 — Checkout: route the free "Download free" button to Freemius' hosted opt-in page (email-gated). Freemius' embedded dialog can't initialise a $0 plan ("plugin_id must be configured"); Pro + AI stay on the verified embedded checkout.
1.15.6 — Checkout: Freemius configure() expects plugin_id, not product_id (fixes "plugin_id parameter is missing").
1.15.5 — Checkout fix: the Freemius checkout.min.js loader is jQuery-wrapped, so load jQuery as its dependency on /pricing (block themes omit it on the front end) — otherwise FS.Checkout never initialises.
1.15.4 — Wire the Freemius Checkout into the pricing page: Download free (opt-in), Buy Pro, Buy AI buttons; email-consent + support line; load checkout.min.js only on /pricing.
1.15.3 — Add Google Analytics 4 (gtag.js) via wp_head, filterable Measurement ID; skipped for logged-in admins so our own visits don't skew reports.
1.15.2 — Pin color-scheme:light on the site root so native controls (any
        injected search / form select popups) render light on dark-mode
        devices, matching this light-only marketing design.
1.14.3 — Pricing page: neobrutalist plan cards (dark border + hard shadow) to
        match the button language; the Pro plan pops with a blue border, hard
        blue shadow and a lift; accent word on the Get FileDeck heading.
1.14.2 — Hero + section rhythm polish: larger, tighter hero headline with a
        blue accent word ("document library"); comfortable lede measure; tighter
        eyebrow-to-heading spacing.
1.14.1 — Spacing fixes: header + footer content was flush to the viewport edges
        (no side gutters) — now contained + padded; footer columns rebuilt as an
        even grid (no dead gap after the brand column); top nav sits beside the
        logo with the CTA pushed right.
1.14.0 — Design pass (reference: easymcpai.com, kept FileDeck blue): bolder,
        tighter marketing headings; "neobrutalist" buttons (solid fill, dark
        border, hard offset shadow that presses on hover); tighter, better-spaced
        top nav with a styled CTA cluster; a rebuilt multi-column footer (brand
        column + tagline, uppercase column headings, clean bottom bar). Fixed the
        /features page: the `[filedeck]` example in copy was executing as a live
        shortcode (inflating a card), and the first feature card was rendering
        double-wide — both resolved (escaped shortcode + uniform fdk-bento--even).
1.13.1 — Tailored meta description for the new /features page.
1.13.0 — New /features page (fdk/features pattern): a full, honest overview of
        the toolkit grouped by tier — Free (no artificial limits), Pro (search
        inside documents, access & protection, lifecycle/workflow, insight &
        governance) and the opt-in AI tier. Header + footer "Features" nav now
        points at the dedicated page instead of the homepage anchor.
1.12.1 — Unique meta descriptions for the key landing pages (pricing,
        security, and the six /for-* persona pages), keyed by slug in the
        theme so pattern-composed pages still get tailored SEO/social text.
1.12.0 — Conversion + SEO pass: each /for-* persona page now embeds only its
        sector's documents (category= on the shortcode); added a per-page meta
        description, OpenGraph + Twitter-card tags with a branded 1200x630 OG
        image, and an SVG favicon (replaces the default WordPress mark).
1.11.0 — Trust/accuracy copy pass: file-protection story on homepage +
        /security rewritten to the real two-part model (tokenless
        access-checked streaming by default + optional signed 15-min share
        links); dropped false "free scales past 500 / indexed search" and
        "specific users" claims; doc count 56→58 / "nine categories"; AI
        mockup query changed to a safeguarding example the seed data answers;
        "download log" → "activity log & audit trail".
1.6.0 — Security page rewritten to describe the real protected-file mechanism
        (deny-all vault + access-checked streaming), replacing the earlier
        signed-token wording that the plugin didn't implement.
1.5.0 — Latest-features pass: surface full-text "search inside documents"
        (PDF/Office/text) and optional scanned-PDF OCR across the site —
        elevated bento card, hero chip, feature-modern bullet, Pro plan
        lists (pricing-table + plans-teaser), and a search/OCR pricing FAQ
        (with matching FAQPage JSON-LD) noting on-server extraction and the
        opt-in, process-and-discard OCR privacy posture.
1.4.0 — Conversion audit pass 2: admin walkthrough section (fdk/admin-tour,
        five annotated stylized admin screens based on the real wp-admin
        UI); "How it works" 3-step section (fdk/how-it-works); dedicated
        Security page (fdk/security) with precise controls and honest
        limitations, no compliance claims; header adds Security + a
        Solutions submenu; six industry/audience pages rebuilt as real
        landing pages (schools/healthcare/law/construction + new
        local-government and agencies) with document-jobs grid, filtered
        demo, how-it-works and a vertical FAQ each; footer + homepage
        personas updated.
1.3.0 — Conversion audit pass 1: hero leads with the category ("WordPress
        document library plugin" eyebrow + new H1), "Your documents.
        Found in seconds." moves above the live embed as an outcome;
        honest pre-launch CTAs sitewide (no "Download free"/"Get Pro"
        until those flows exist); pricing plans renamed (Single Site /
        Agency / Network) with per-site economics, founding price
        guarantee card and licensing FAQs (+JSON-LD); custom
        single-fdk_document template (no author byline, prev/next, or
        "More posts"); fdk/demo-sandbox pattern — one tabbed guided
        demo replaces the stacked layout demos.
1.2.0 — Site-review punch list: wordmark SVG re-cropped to its artwork
        (was ~43% dead space) and sized 32px/28px; pricing-table +
        pricing-faq patterns (4 plan cards, renewals pillar line, FAQ
        with FAQPage JSON-LD, #get section so no dead button hrefs);
        industry links fixed to live /for-* slugs; footer prunes
        Docs/Blog/Contact until those pages exist; header drops Docs;
        footer Resources gains Live demo link.
1.1.0 — Marketing-site design system v1: theme.json tokens (palette, Inter
        variable self-hosted, spacing, 680/1120 layout), fdk-* component
        library (browser card, chips, compare table, bento, log vignette,
        CTA band, persona cards), 10 "FileDeck" block patterns for the
        homepage, new sticky header + 4-column footer parts with a
        swap-ready SVG wordmark slot, reveal-on-scroll JS.
1.0.1 — Initial brand child theme.
*/
