/*
Theme Name: FCT Inventor
Description: Tema universale a blocchi minimale, con testata emozionale e sidebar modulare.
Version: 0.4.6
Requires at least: 6.6
Requires PHP: 8.2
Text Domain: fct-inventor
License: GNU General Public License v2 or later
*/
:root{--fct-bg:#0B1120;--fct-surface:#111827;--fct-card:#162338;--fct-border:#334155;--fct-primary:#2563EB;--fct-accent:#60A5FA;--fct-text:#F1F5F9;--fct-muted:#94A3B8;--fct-focus:#93C5FD;--fct-s1:4px;--fct-s2:8px;--fct-s3:12px;--fct-s4:16px;--fct-s5:24px;--fct-s6:32px;--fct-s7:48px;--fct-s8:64px;--fct-img-radius:12px;--fct-card-radius:16px;--fct-motion:200ms;--fct-header-height:56px;color-scheme:dark;scroll-padding-top:calc(var(--fct-header-height) + 12px)}
:root[data-fct-theme=light]{--fct-bg:#F1F5F9;--fct-surface:#F8FAFC;--fct-card:#FFFFFF;--fct-border:#CBD5E1;--fct-primary:#1D4ED8;--fct-accent:#1E40AF;--fct-text:#0F172A;--fct-muted:#475569;--fct-focus:#2563EB;color-scheme:light}
body{margin:0;background:var(--fct-bg);color:var(--fct-text);font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;line-height:1.6}*,*::before,*::after{box-sizing:border-box} .wp-site-blocks{padding:0!important;min-height:100vh;display:flex;flex-direction:column;gap:0}.wp-site-blocks>*{margin-block-start:0!important}.wp-site-blocks>.fct-body{flex:0 0 auto}a{color:var(--fct-accent);text-underline-offset:.18em}a:hover{text-decoration-thickness:2px}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.65;cursor:default}:focus-visible{outline:2px solid var(--fct-focus)!important;outline-offset:3px}img{max-width:100%;height:auto;border-radius:var(--fct-img-radius)}figure{max-width:100%}iframe,video{max-width:100%}h1,h2,h3,h4{line-height:1.25;overflow-wrap:anywhere}p,li,a{overflow-wrap:anywhere}.fct-wrap{max-width:1440px;margin-inline:auto;padding-inline:var(--fct-s4);width:100%}.wp-site-blocks>header,.wp-site-blocks>.wp-block-template-part.fct-header{position:sticky;top:0;z-index:20;background:var(--fct-surface);overflow-anchor:none}.admin-bar .wp-site-blocks>header{top:32px}@media(max-width:782px){.admin-bar .wp-site-blocks>header{top:46px}}.fct-hero{height:33vh;height:33svh;overflow:hidden;background:var(--fct-surface);transition:height var(--fct-motion) ease;overflow-anchor:none}.fct-hero img{display:block;width:100%;height:100%;object-fit:cover}.fct-compact .fct-hero{height:0}.fct-bar{min-height:56px;display:flex!important;align-items:center;gap:var(--fct-s4);justify-content:space-between;padding-block:var(--fct-s2);flex-wrap:wrap}.fct-bar .wp-block-site-title{font-size:clamp(1rem,2vw,1.3rem);margin:0;flex-shrink:0}.fct-bar .wp-block-site-title a{color:var(--fct-text);text-decoration:none}.fct-bar .wp-block-navigation{margin-inline-start:auto}.fct-switch,.fct-nav-toggle{background:transparent;color:var(--fct-text);border:1px solid var(--fct-border);border-radius:8px;min-width:40px;min-height:40px;display:inline-flex;align-items:center;justify-content:center;padding:6px}.fct-switch svg{width:20px;height:20px}.fct-switch[hidden],.fct-nav-toggle[hidden],.fct-sub-toggle[hidden]{display:none}.fct-nav{margin-left:auto;max-width:100%}.fct-nav ul{list-style:none;padding:0;margin:0}.fct-nav>ul{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.fct-nav li{position:relative}.fct-nav li>a{display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;color:var(--fct-text);text-decoration:none;border-radius:8px;font-size:.95rem;font-weight:500;line-height:1.35}.fct-nav .current-menu-item>a,.fct-nav .current-menu-ancestor>a{color:var(--fct-accent);font-weight:650;text-decoration:underline;text-underline-offset:5px}.fct-nav .sub-menu{padding-left:12px}.fct-js .fct-nav .sub-menu{display:none;position:absolute;z-index:22;top:100%;left:0;min-width:220px;max-width:min(320px,90vw);background:var(--fct-surface);border:1px solid var(--fct-border);border-radius:12px;padding:8px;box-shadow:0 6px 18px #0003}.fct-js .fct-nav li.fct-open>.sub-menu{display:block}.fct-js .fct-nav .sub-menu .sub-menu{position:static;box-shadow:none}.fct-js .fct-nav.fct-narrow{order:3;flex:1 0 100%;max-height:65vh;overflow:auto;margin:0}.fct-js .fct-nav.fct-narrow:not(.fct-open){display:none}.fct-js .fct-nav.fct-narrow>ul{display:block}.fct-js .fct-nav.fct-narrow .sub-menu{position:static;box-shadow:none;border:0;padding:0 0 0 16px}.fct-body{display:grid!important;grid-template-columns:minmax(0,1fr);gap:var(--fct-s5);align-items:start;padding-block:var(--fct-s5)}.fct-body>*{min-width:0;margin-block:0!important}.fct-main,.fct-sidebar{min-width:0}.fct-main>*+*,.fct-sidebar>*+*{margin-block-start:var(--fct-s4)}.fct-card,.fct-module,.fct-sidebar>.wp-block-group{background:var(--fct-card);border:1px solid var(--fct-border);border-radius:var(--fct-card-radius);padding:var(--fct-s5);min-width:0;box-shadow:none}.fct-card>*+*,.fct-module>*+*{margin-block-start:var(--fct-s4)}.fct-card h1,.fct-card h2,.fct-module h2{margin-block:0}.fct-card .fct-meta{color:var(--fct-muted);font-size:.875rem}.fct-card .fct-content{font-size:18px;line-height:1.7}.fct-content :where(p,blockquote,.wp-block-list>li,ul:not([class])>li,ol:not([class])>li){max-width:75ch}.fct-content :where(.wp-block-image,.wp-block-gallery,.wp-block-table,pre){max-width:100%}.fct-content pre,.wp-block-table,.fct-content .fct-scroll{overflow-x:auto;max-width:100%}.fct-module ul,.fct-module ol{padding-inline-start:1.25em}.fct-module h2{font-size:1.1rem}.fct-module li+li{margin-block-start:var(--fct-s2)}.fct-module [aria-current]{font-weight:700;text-decoration:underline}.fct-breadcrumb{font-size:.875rem;color:var(--fct-muted);margin-block-end:var(--fct-s4)}.fct-footer{background:var(--fct-surface);border-top:1px solid var(--fct-border);padding-block:var(--fct-s5)}.fct-footer p{margin-block:var(--fct-s2)}.fct-footer a{color:var(--fct-accent)}.wp-block-post-template{list-style:none;padding:0;margin:0}.wp-block-query-pagination{gap:var(--fct-s3);flex-wrap:wrap}.wp-block-search__input,input[type=search],input[type=text],textarea{background:var(--fct-bg);border:1px solid var(--fct-muted);border-radius:8px;padding:var(--fct-s2);color:var(--fct-text);min-width:0}.wp-block-search__button,.wp-block-button__link,input[type=submit]{background:var(--fct-primary);color:#fff;border-radius:8px;border:0;padding:var(--fct-s2) var(--fct-s4);font-weight:600}.fct-visually-hidden{position:absolute!important;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.fct-immersive .fct-content :where(p,li){max-width:none}.fct-anchor{scroll-margin-top:12px}@media(max-width:1023px){.fct-body{gap:var(--fct-s4)}}@media(max-width:799px){:root{--fct-header-height:48px}.fct-bar{min-height:48px;gap:8px}.fct-body{grid-template-columns:minmax(0,1fr)}.fct-card,.fct-module{padding:var(--fct-s4)}.fct-nav>ul{display:block}.wp-site-blocks>header:not(.fct-compact){position:relative}}@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}}@media(max-height:500px){.fct-js .fct-nav.fct-narrow{max-height:45vh}}html:not(.fct-js) .wp-site-blocks>header{position:relative}html:not(.fct-js) .fct-nav .sub-menu{display:block}.editor-styles-wrapper :is(.fct-card,.fct-module):not(.has-background):not(.has-text-color){color:var(--fct-text)}
.fct-hero img{object-position:var(--fct-focal,50% 50%)}.fct-social ul{display:flex;flex-wrap:wrap;gap:16px;list-style:none;padding:0}.fct-toc-level-3{margin-inline-start:12px}.fct-switch svg[hidden]{display:none}

.fct-footer-links{list-style:none;padding:0;display:flex;flex-wrap:wrap;gap:16px}.fct-js .fct-nav:not(.fct-narrow)>ul{flex-wrap:nowrap;width:max-content;max-width:none}.fct-js .fct-nav:not(.fct-narrow){min-width:0}.fct-js .fct-nav:not(.fct-narrow) .fct-menu>li{white-space:nowrap}.fct-nav.fct-narrow li{white-space:normal}
/* The header animates its height; browser scroll anchoring must not synthesize a return to zero. */
html,body{overflow-anchor:none}

/* Minimal Enterprise: one visual surface per menu item, separate accessible controls. */
.fct-nav .fct-sub-toggle{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;min-width:32px;min-height:44px;padding:4px 8px;background:transparent;color:var(--fct-muted);border:0;border-radius:0 8px 8px 0;line-height:1;cursor:pointer}
.fct-nav .fct-sub-toggle svg{width:14px;height:14px;transition:transform var(--fct-motion)}
.fct-nav li.fct-open>.fct-sub-toggle svg{transform:rotate(180deg)}
.fct-js .fct-nav li:has(>.fct-sub-toggle)>a{border-radius:8px 0 0 8px;padding-inline-end:3px}
.fct-nav li>a:hover,.fct-nav .fct-sub-toggle:hover,.fct-nav li.fct-open>a,.fct-nav li.fct-open>.fct-sub-toggle{background:var(--fct-card);color:var(--fct-accent)}
.fct-nav .current-menu-item>a,.fct-nav .current-menu-ancestor>a,.fct-nav .current_page_item>a,.fct-nav .current_page_ancestor>a{background:color-mix(in srgb,var(--fct-accent) 14%,var(--fct-surface));color:var(--fct-accent);font-weight:650;text-decoration:underline;text-underline-offset:5px}
.fct-nav li.current-menu-item>.fct-sub-toggle,.fct-nav li.current-menu-ancestor>.fct-sub-toggle{background:color-mix(in srgb,var(--fct-accent) 14%,var(--fct-surface))}
.fct-js .fct-nav:not(.fct-narrow)>ul>li:nth-last-child(-n+2)>.sub-menu{left:auto;right:0}
.fct-nav .sub-menu li>a{display:inline-flex;white-space:normal;max-width:100%;font-size:.9rem}
.fct-nav .sub-menu li+li{margin-block-start:2px}
.fct-js .fct-nav.fct-narrow>ul>li{border-bottom:1px solid var(--fct-border);padding-block:2px}
.fct-js .fct-nav.fct-narrow .fct-sub-toggle{float:right;min-width:44px}
.fct-js .fct-nav.fct-narrow .sub-menu{clear:both;max-width:none;min-width:0}
.fct-hero img{border-radius:0 0 var(--fct-img-radius) var(--fct-img-radius)}
.fct-hero img[data-fct-broken]{visibility:hidden}
.fct-editor-hero{padding:16px;border:1px solid #94a3b8;border-radius:12px;color:#0f172a;background:#f8fafc}
.fct-editor-hero-preview{margin:12px 0;aspect-ratio:3/1;background:#111827;color:#f1f5f9;display:grid;place-items:center;overflow:hidden;border-radius:12px;text-align:center}
.fct-editor-inherited,.fct-editor-inherited img{width:100%;height:100%;object-fit:cover}
.fct-editor-hero p{font-size:13px;margin:8px 0}
/* Local overflow and accessible compact forms. */
.fct-module .wp-block-search__inside-wrapper,.fct-module form[role=search]{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.fct-module input[type=search]{flex:1 1 120px;width:100%;min-width:0}
.fct-module .wp-block-search__button{margin:0}
.fct-card .fct-content :where(img,video,iframe){max-width:100%}
.fct-card .fct-content :where(.wp-block-table,pre){max-width:100%;overflow-x:auto}
.fct-nav .sub-menu{overflow-wrap:anywhere}
.fct-bar{padding-block:6px}
@media(max-width:799px){.fct-bar{padding-block:2px}}

/* 0.3.0 — presentation refinements within the canonical dimensions. */
.fct-hero[data-fct-hero-source="surface"],.fct-hero:not(:has(img)),.fct-hero:has(img[data-fct-broken]){height:0}
.fct-header,.wp-site-blocks>header{border-bottom:1px solid var(--fct-border)}
.fct-bar{gap:12px;padding-block:6px;min-height:56px}
.fct-bar .wp-block-site-title{font-size:clamp(1.05rem,2vw,1.35rem);font-weight:750;letter-spacing:-.025em;line-height:1.2}
.fct-nav>ul{gap:2px}.fct-nav>ul>li>a{padding-inline:10px;font-size:.95rem}
.fct-nav .fct-sub-toggle{min-width:28px;padding-inline:5px 8px}
.fct-nav .sub-menu{padding:6px}.fct-nav .sub-menu li>a{display:flex;padding-inline:12px;min-height:40px}
.fct-switch,.fct-nav-toggle{flex:0 0 40px;color:var(--fct-accent);border-color:var(--fct-border)}
.fct-card h1{font-size:clamp(1.65rem,3vw,2.1rem);letter-spacing:-.025em}
.fct-card h2{font-size:clamp(1.2rem,2vw,1.55rem);letter-spacing:-.015em}.fct-card-list h2 a{color:var(--fct-text);text-decoration:none}.fct-card-list h2 a:hover{text-decoration:underline;color:var(--fct-accent)}

.fct-card .fct-content :where(p,h2,h3,h4,blockquote){margin-inline:auto}
.fct-card .fct-content :where(h2,h3,h4){max-width:75ch;text-wrap:pretty}
.fct-card .fct-content :where(h2,h3,h4){margin-block-start:var(--fct-s6);margin-block-end:var(--fct-s3)}
.fct-module{padding:var(--fct-s4)}.fct-module h2{font-size:1.05rem;letter-spacing:-.01em;line-height:1.35}
.fct-module ul{list-style:none;padding-inline-start:0;margin-block-end:0}.fct-module ul ul{padding-inline-start:var(--fct-s4)}
.fct-module li{padding-block:var(--fct-s2)}.fct-module li+li{margin-block-start:0;border-top:1px solid var(--fct-border)}
.fct-module li a{text-decoration:none;display:block}.fct-module li a:hover{text-decoration:underline}
.fct-module a[aria-current=page]{color:var(--fct-text);border-inline-start:2px solid var(--fct-accent);padding-inline-start:8px}
.fct-module form.fct-search-form{display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:0;align-items:stretch}
.fct-search-form input[type=search]{border-radius:8px 0 0 8px;width:100%;min-height:44px;padding-inline:12px}
.fct-search-form button{display:grid;place-items:center;background:var(--fct-primary);color:white;border:0;border-radius:0 8px 8px 0;min-height:44px;padding:8px}
.fct-search-form button:hover{filter:brightness(.92)}
.fct-section-title{font-size:clamp(1.25rem,2vw,1.6rem);padding-block:var(--fct-s3) var(--fct-s2);border-bottom:1px solid var(--fct-border)}
.fct-main>.wp-block-media-text,.fct-home-content>.wp-block-media-text,.fct-content .wp-block-media-text,.editor-styles-wrapper .wp-block-media-text,.wp-block-media-text.is-style-fct-card{border:1px solid var(--fct-border);border-radius:var(--fct-card-radius);padding:var(--fct-s4);gap:var(--fct-s4)}
.fct-main>.wp-block-media-text:not(.has-background):not([style*="background"]),.fct-home-content>.wp-block-media-text:not(.has-background):not([style*="background"]),.fct-content .wp-block-media-text:not(.has-background):not([style*="background"]),.editor-styles-wrapper .wp-block-media-text:not(.has-background):not([style*="background"]),.wp-block-media-text.is-style-fct-card:not(.has-background):not([style*="background"]){background:var(--fct-card)}
.fct-main>.wp-block-media-text .wp-block-media-text__content,.fct-home-content>.wp-block-media-text .wp-block-media-text__content,.fct-content .wp-block-media-text .wp-block-media-text__content,.editor-styles-wrapper .wp-block-media-text .wp-block-media-text__content,.wp-block-media-text.is-style-fct-card .wp-block-media-text__content{padding:0;min-width:0}
.fct-footer{padding-block:var(--fct-s4)}.fct-footer-inner{display:flex;flex-wrap:wrap;align-items:center;gap:8px 24px}.fct-footer-inner>*{margin:0!important}.fct-footer-inner .wp-block-site-title{font-weight:700;letter-spacing:-.015em}.fct-footer-inner .wp-block-site-tagline{flex:1 1 50%;color:var(--fct-muted);font-size:.875rem}.fct-footer-inner .fct-footer-links{margin:0;gap:8px 16px}.fct-footer-inner>p:last-child{flex-basis:100%;padding-top:12px;border-top:1px solid var(--fct-border);color:var(--fct-muted);font-size:.875rem}
@media(max-width:799px){.fct-bar{gap:8px;min-height:48px;padding-block:2px}.fct-bar .wp-block-site-title{flex:1 1 0;min-width:0;overflow-wrap:anywhere}.fct-footer-inner{display:block}.fct-footer-inner>*+*{margin-top:8px!important}}
.fct-nav .children{padding-inline-start:12px}html:not(.fct-js) .fct-nav .children{display:block}

/* 0.4.0 — variants share one card and one set of fields. */
.fct-brand{display:flex;align-items:center;gap:8px;min-width:0;max-width:100%;margin:0!important}.fct-brand .wp-block-site-logo{flex:0 0 auto;margin:0}.fct-brand .wp-block-site-logo img{max-width:40px;height:auto}.fct-brand .wp-block-site-title{min-width:0;overflow-wrap:anywhere;white-space:normal}.fct-card-compact{gap:8px;padding:12px}.fct-read-more{display:inline-flex;align-self:start;font-weight:650;min-height:44px;align-items:center}.fct-sequence-links{display:flex;flex-wrap:wrap;justify-content:space-between;gap:12px;border-top:1px solid var(--fct-border);padding-top:12px}.fct-footer-menu ul{list-style:none;padding-inline-start:0;margin:0;display:flex;flex-wrap:wrap;gap:8px 16px}.fct-footer-menu ul ul{padding-inline-start:12px}.fct-content :where(.wp-block-gallery,.gallery,.wp-block-embed,.wp-block-video,.wp-block-image,figure){min-width:0;max-width:100%}.fct-content :where(.wp-block-gallery img,.gallery img,.wp-block-image img){max-width:100%;height:auto}.fct-content :where(figcaption,.wp-caption-text,.gallery-caption){font-size:.875rem;line-height:1.5;color:var(--fct-muted);overflow-wrap:anywhere}.fct-content :where(.wp-block-embed__wrapper,video,iframe){max-width:100%}.fct-content .wp-block-embed.is-type-video:not(.wp-has-aspect-ratio) .wp-block-embed__wrapper iframe:not([height]){width:100%;aspect-ratio:16/9;height:auto}.fct-nav li>a{overflow-wrap:anywhere}.fct-nav.fct-narrow li>a{max-width:calc(100% - 44px)}
@media(max-width:799px){.fct-brand{flex:1 1 0}.fct-brand .wp-block-site-title{flex:1 1 0}}

/* Visual baseline 0.3.0: independent Media & Text cards, including static landing pages. */
body.home.page .fct-main>.fct-card-single:has(>.fct-content .wp-block-media-text){background:transparent;border:0;padding:0}
body.home.page .fct-main>.fct-card-single:has(>.fct-content .wp-block-media-text)>.fct-content{max-width:none}
.wp-block-group.is-style-fct-card{border:1px solid var(--fct-border);border-radius:var(--fct-card-radius);padding:var(--fct-s4);min-width:0}
.wp-block-group.is-style-fct-card:not(.has-background):not([style*="background"]){background:var(--fct-card)}
/* Native and FCT cards share their foreground, including the default editor canvas. */
.fct-card:not(.has-text-color):not(.has-background),.fct-module:not(.has-text-color):not(.has-background),.wp-block-group.is-style-fct-card:not(.has-text-color):not(.has-background){color:var(--fct-text)}
.fct-card:not(.has-background),.fct-module:not(.has-background),.wp-block-group.is-style-fct-card:not(.has-background),.wp-block-media-text:not(.has-background):not([style*="background"]){--fct-context-link:var(--fct-accent)}

/* Legacy text-role background retains its value without regenerating the colliding .has-text-color preset. */
.has-text-background-color{background-color:var(--fct-text)!important}

/* One intrinsic featured-media geometry for FCT and Core; the wrapper follows the image.
   No layout constraints are saved back to WordPress. Native intentional crops opt out. */
:is(.fct-card .fct-featured,:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-featured-image:not(.is-style-fct-editorial),:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts__featured-image:not(:is(.alignleft,.alignright)):where(:not(:has(img[style*="max-width"],img[style*="max-height"])))){
 display:block;width:fit-content!important;max-width:100%!important;min-width:0!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;margin-inline:auto!important;overflow:visible
}
:is(:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-featured-image:not(.is-style-fct-editorial),:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts__featured-image:not(:is(.alignleft,.alignright)):where(:not(:has(img[style*="max-width"],img[style*="max-height"])))) > a{
 display:block;width:auto!important;max-width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important
}
:is(.fct-card .fct-featured,:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-featured-image:not(.is-style-fct-editorial),:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts__featured-image:not(:is(.alignleft,.alignright)):where(:not(:has(img[style*="max-width"],img[style*="max-height"])))) img{
 display:block;width:auto!important;max-width:min(100%,var(--fct-image-width,100%))!important;height:auto!important;min-height:0!important;max-height:none!important;aspect-ratio:auto!important;object-fit:contain!important;margin-inline:auto;border-radius:var(--fct-img-radius);background:none
}
.fct-card.fct-card-compact .fct-featured img{max-height:180px!important}
/* Native editor media resize wrapper: preview intrinsic geometry without saving changes. */
.editor-styles-wrapper .wp-block-post-featured-image:not(.is-style-fct-editorial) .components-resizable-box__container{width:fit-content!important;max-width:100%!important;height:auto!important;min-height:0!important;aspect-ratio:auto!important;margin-inline:auto}
/* Query owns result order and the chosen list/grid. Never hide a native result because it lacks fct/card. */
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-query{min-width:0;max-width:100%}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-template{min-width:0;max-width:100%;align-items:start}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-template > li{min-width:0;max-width:100%;align-self:start}
.fct-results > li:empty{display:none}
.fct-results:not(.is-layout-grid):not(.is-flex-container):not(.is-layout-flex) > li + li{margin-block-start:var(--fct-s4)}
.fct-results:is(.is-layout-grid,.is-flex-container,.is-layout-flex) > li{margin-block-start:0}
.fct-results > li > :is(.fct-card,.wp-block-group.is-style-fct-card){width:100%;max-width:100%;min-width:0;margin-inline:auto}
/* Same default card padding in managed queries; authored padding is kept. */
@media(min-width:800px){.fct-results > li > .wp-block-group.is-style-fct-card:not([style*="padding"]){padding:var(--fct-s5)}}
/* A styled native card uses the same media rule, not a second media column. */
.wp-block-group.is-style-fct-card > .wp-block-post-featured-image:not(.is-style-fct-editorial){max-width:100%!important}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-media-text:not(.is-image-fill) .wp-block-media-text__media img{display:block;width:auto;max-width:100%;height:auto;max-height:none;object-fit:contain;margin-inline:auto}
/* Native image fill, gallery crop, Cover and emotional hero remain deliberate editorial exceptions. */
/* A known semantic surface supplies an accessible inherited foreground. Explicit text and link colors stay editorial. */
:is(.wp-site-blocks,.editor-styles-wrapper) .has-background-background-color:not(.has-text-color){color:var(--fct-on-background,var(--fct-text));--fct-context-link:var(--fct-link-on-background,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-surface-background-color:not(.has-text-color){color:var(--fct-on-surface,var(--fct-text));--fct-context-link:var(--fct-link-on-surface,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-card-background-color:not(.has-text-color){color:var(--fct-on-card,var(--fct-text));--fct-context-link:var(--fct-link-on-card,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-border-background-color:not(.has-text-color){color:var(--fct-on-border,var(--fct-text));--fct-context-link:var(--fct-link-on-border,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-primary-background-color:not(.has-text-color){color:var(--fct-on-primary,var(--fct-text));--fct-context-link:var(--fct-link-on-primary,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-accent-background-color:not(.has-text-color){color:var(--fct-on-accent,var(--fct-text));--fct-context-link:var(--fct-link-on-accent,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-foreground-background-color:not(.has-text-color){color:var(--fct-on-text,var(--fct-text));--fct-context-link:var(--fct-link-on-text,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-muted-background-color:not(.has-text-color){color:var(--fct-on-muted,var(--fct-text));--fct-context-link:var(--fct-link-on-muted,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-focus-background-color:not(.has-text-color){color:var(--fct-on-focus,var(--fct-text));--fct-context-link:var(--fct-link-on-focus,var(--fct-accent))}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-text-background-color:not(.has-text-color){color:var(--fct-on-text,var(--fct-text));--fct-context-link:var(--fct-link-on-text,var(--fct-accent))}
/* Geometry contract: the main layout owns its columns; the reading measure belongs to prose only. */
.wp-site-blocks > .fct-body,.editor-styles-wrapper .fct-body{width:100%;max-width:1440px;margin-inline:auto!important}
.fct-body > :is(.fct-main,.fct-sidebar,.wp-block-template-part){width:100%;max-width:none;min-width:0;margin-inline:0!important;align-self:start}
.fct-body > .fct-sidebar:empty,.fct-body > .fct-sidebar[hidden],.fct-body > .wp-block-template-part:empty,.fct-body > .wp-block-template-part:has(>.fct-sidebar:empty):not(:has(>:not(.fct-sidebar))){display:none!important}
@media(min-width:800px){
 .fct-body:has(> .fct-sidebar:not(:empty):not([hidden]),> .wp-block-template-part > .fct-sidebar:not(:empty):not([hidden])){grid-template-columns:minmax(0,1fr) clamp(280px,25vw,340px)}
 .fct-js .fct-body > .fct-sidebar.fct-sidebar-sticky{position:sticky;top:var(--fct-sticky-top,calc(var(--fct-header-height) + var(--fct-s4)));align-self:start}
 .fct-js .fct-body > .fct-sidebar.fct-sidebar-sticky[data-fct-sticky-overflow]{position:static}
}
.fct-main > .fct-card,.fct-card > .fct-content{width:100%;max-width:none;min-width:0;margin-inline:0!important}
.fct-card > .fct-content{--wp--style--global--content-size:100%;--wp--style--global--wide-size:100%}
.fct-card-single > .fct-content :where(p,h2,h3,h4,blockquote){max-width:75ch}
.fct-immersive .fct-card-single > .fct-content :where(p,h2,h3,h4,blockquote){max-width:none}
/* Default figures fit their available space. Keep explicit alignment, resized images and native Cover/gallery crops. */
:is(.fct-content,.editor-styles-wrapper) .wp-block-image:not(.alignleft):not(.alignright):not(.is-resized):not(.wp-block-gallery .wp-block-image){margin-inline:auto;max-width:100%;min-width:0}
:is(.fct-content,.editor-styles-wrapper) .wp-block-image:not(.alignleft):not(.alignright):not(.is-resized):not(.wp-block-gallery .wp-block-image) img:not([style*="width"]):not([style*="height"]){display:block;width:auto;max-width:100%;height:auto;margin-inline:auto}
:is(.fct-content,.editor-styles-wrapper) .wp-block-media-text:not(.is-image-fill) > .wp-block-media-text__media{margin:0;min-width:0;height:auto;min-height:0;align-self:center}
:is(.fct-content,.editor-styles-wrapper) .wp-block-media-text > .wp-block-media-text__content{min-width:0}
:is(.fct-content,.editor-styles-wrapper) :where(.wp-block-gallery,.gallery,.wp-block-embed,.wp-block-video){min-width:0;max-width:100%}
:is(.fct-content,.editor-styles-wrapper) .wp-block-gallery:not(.is-cropped) figure.wp-block-image img{height:auto;max-width:100%;object-fit:contain}
:is(.fct-content,.editor-styles-wrapper) video{height:auto;max-width:100%}
/* A styled group with no rendered content does not reserve a theme-generated card. */
.fct-card:empty,.fct-module:empty{display:none}

/* Native article collections are layout, not prose. Preserve Core grid/float choices. */
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts.wp-block-latest-posts__list{min-width:0;max-width:100%;padding-inline-start:0}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts.wp-block-latest-posts__list > li{min-width:0;max-width:none;display:flow-root}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts.wp-block-latest-posts__list:not(.is-grid) > li{width:100%}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts__featured-image:is(.alignleft,.alignright){max-width:100%;height:auto}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-latest-posts__featured-image:is(.alignleft,.alignright) img{max-width:100%;height:auto}
/* Native query containers without an authored content width use the available media column. */
:is(.fct-content,.editor-styles-wrapper) :is(.wp-block-query,.wp-block-post-template):not([style*="width"]){max-width:100%;min-width:0;width:100%}
:is(.fct-content,.editor-styles-wrapper) .wp-block-post-template > li > .wp-block-group:not(.is-style-fct-editorial):not([style*="width"]){max-width:100%;min-width:0}
/* Recognize the supplied legacy card signature only: white + shadow + title/excerpt (featured can be absent).
   Explicit editorial style opts out; all saved attributes and query semantics remain unchanged. */
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-template .wp-block-group.has-white-background-color:not(.is-style-fct-editorial):not(.has-text-color)[style*="box-shadow"]:has(.wp-block-post-title):has(.wp-block-post-excerpt){background-color:var(--fct-card)!important;color:var(--fct-text);--fct-context-link:var(--fct-accent);border:1px solid var(--fct-border);border-radius:var(--fct-card-radius)!important;box-shadow:none!important;min-width:0;max-width:100%;padding:var(--fct-s4)!important;--wp--style--global--content-size:100%;--wp--style--global--wide-size:100%}
@media(min-width:800px){:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-template .wp-block-group.has-white-background-color:not(.is-style-fct-editorial):not(.has-text-color)[style*="box-shadow"]:has(.wp-block-post-title):has(.wp-block-post-excerpt){padding:var(--fct-s5)!important}}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-template .wp-block-group.has-white-background-color:not(.is-style-fct-editorial):not(.has-text-color)[style*="box-shadow"]:has(.wp-block-post-title):has(.wp-block-post-excerpt) > .wp-block-group:not(.has-background):not([style*="width"]){padding-inline:0!important;max-width:100%;min-width:0}
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-post-template .wp-block-group.has-white-background-color:not(.is-style-fct-editorial):not(.has-text-color)[style*="box-shadow"]:has(.wp-block-post-title):has(.wp-block-post-excerpt) .wp-block-post-featured-image:not(.is-style-fct-editorial) img{border-radius:var(--fct-img-radius)!important}
/* Legacy no-results message in the supplied composition: semantic surface/ink in both modes. */
:is(.wp-site-blocks,.editor-styles-wrapper) .wp-block-query-no-results .has-luminous-vivid-orange-background-color.has-white-color:not(.is-style-fct-editorial){background-color:var(--fct-card)!important;color:var(--fct-text)!important}
/* Literal legacy surfaces outside the managed card keep their original meaning. */
:is(.wp-site-blocks,.editor-styles-wrapper) .has-white-background-color:not(.has-text-color){color:#0F172A;--fct-context-link:#1E40AF}
:is(.wp-site-blocks,.editor-styles-wrapper) .has-black-background-color:not(.has-text-color){color:#F1F5F9;--fct-context-link:#93C5FD}
/* One inherited foreground contract for neutral and nested editorial surfaces.
   Explicit Core classes, inline colors and block-specific user styles remain authoritative. */
:is(.wp-site-blocks,.editor-styles-wrapper) :is(.fct-content,.wp-block-post-template,.fct-card,.wp-block-group,.wp-block-media-text,.wp-block-post-content) :where(h1,h2,h3,h4,h5,h6,p,li,.wp-block-post-excerpt):not(:where(.has-text-color,.has-background,[data-fct-surface-ink],[style*="color:"])){color:inherit}
:is(.wp-site-blocks,.editor-styles-wrapper) :is(.has-background-background-color,.has-surface-background-color,.has-card-background-color,.has-border-background-color,.has-primary-background-color,.has-accent-background-color,.has-foreground-background-color,.has-muted-background-color,.has-focus-background-color,.has-text-background-color,.has-white-background-color,.has-black-background-color,[data-fct-surface-ink]) a:not(:where(.has-text-color,.wp-element-button,.wp-block-button__link,[style*="color:"],.has-link-color a)){color:var(--fct-context-link,var(--fct-accent))}
/* The known surface itself may be a paragraph or heading. Keep its assigned contrast. */
:is(.wp-site-blocks,.editor-styles-wrapper) [data-fct-surface-ink]:not(.has-text-color){color:var(--fct-literal-ink);--fct-context-link:var(--fct-literal-ink)}
/* Avoid the dark-mode ink leaking into the editor's light default canvas or vice versa. */
.wp-site-blocks,.editor-styles-wrapper{background-color:var(--fct-bg);color:var(--fct-text);--fct-context-link:var(--fct-accent)}

.wp-block-separator.has-contrast-background-color:not([style*="background"]){background-color:var(--wp--preset--color--contrast,var(--fct-border))}
