/* Shared controls; reader navigation and editor toolbar icons retain their sizing. */
body.fbp :is(input[type=text],input[type=search],input[type=email],input[type=url],input[type=number],input[type=date],input[type=password],input[type=tel],textarea,select),body .fbs-manager-form :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),textarea,select),body #fbs-workspace :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),textarea,select){background:#fff!important;color:#263344!important;border:1px solid #cbd1da!important;border-radius:7px!important;font:16px/1.5 Arial,sans-serif!important;padding:10px 12px!important;box-shadow:none!important;min-height:44px;letter-spacing:normal!important;text-transform:none!important}
body.fbp :is(.button,button[type=submit],input[type=submit]),body .fbs-publisher-workspace .button,body .fbs-manager-dialog .button,body #fbs-workspace :is(.fbs-actions button,.fbs-heading button,.fbs-steps button,[data-price-calculator]){font:600 14px/1.4 Arial,sans-serif!important;padding:10px 16px!important;min-height:42px!important;border-radius:7px!important;letter-spacing:normal!important;text-transform:none!important;background:var(--fbp-brand,#365ecc)!important;color:#fff!important;border:1px solid var(--fbp-brand,#365ecc)!important;box-shadow:none!important;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
body .fbs-publisher-workspace :is(.button.fbs-danger,.fbs-danger),body .fbs-manager-dialog .button.fbs-danger{background:#b32635!important;border-color:#b32635!important;color:white!important}
body .fbs-list-controls,body .fbs-pub-search{display:grid!important;grid-template-columns:minmax(180px,1fr) minmax(180px,1fr)!important;gap:14px!important;padding:18px!important;border:1px solid #dfe5ee!important;border-radius:12px!important;background:#fff!important;margin:18px 0!important;align-items:center!important;box-shadow:0 2px 8px #24304708}
body .fbs-list-controls :is(input,select),body .fbs-pub-search input{width:100%!important;min-width:0!important;margin:0!important}body .fbs-pub-search{grid-template-columns:minmax(180px,1fr) auto!important}
body .fbs-row-actions,body .woocommerce-cart .actions,body .fbp-market-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px!important}body .fbp-store-save{margin:0!important}body .fbp-store-save button{margin:0!important}body .fbp-account-topmenu a{font-size:15px!important;font-weight:700!important}body .fbs-multi-label,body .fbs-group-genres legend{display:block;font-weight:700!important;font-size:16px;margin-bottom:8px}
body .fbs-manager-dialog .wp-editor-container,body .fbs-manager-dialog .mce-panel,body #fbs-workspace [data-rich-editor]{background:#fff!important;color:#263344!important;border-color:#cbd1da!important}body .fbs-manager-dialog .mce-toolbar button,body #fbs-workspace .fbs-editor-toolbar button{background:#f2f4f7!important;color:#263344!important;border:1px solid #cbd1da!important;padding:5px 7px!important;min-height:30px!important;box-shadow:none!important}body .fbs-manager-dialog .mce-toolbar .mce-ico{color:#263344!important}body .fbs-manager-dialog textarea{background:#fff!important}
body #fbs-workspace .fbs-steps button[aria-current=step],body .fbs-manager-dialog .fbs-steps button[aria-current=step]{background:var(--fbp-brand,#365ecc)!important;color:#fff!important}body .fbs-manager-dialog .fbs-steps{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:18px}body .fbs-table-pagination{gap:8px;margin:18px 0}body .fbs-pub-table td .button{margin:3px 5px 3px 0!important}body .fbs-acf-file-name{font-size:14px!important}body #fbs-workspace .fbs-edition>.fbs-check{display:flex;margin-top:12px}
body .fbp-commerce-heading{padding:20px 24px;margin:0 0 24px;border:1px solid var(--fbp-brand,#365ecc);border-radius:12px;background:var(--fbp-panel,#fff)}body .fbp-commerce-heading h1{margin:0;font-size:30px;line-height:1.3}
@media(max-width:550px){body .fbs-list-controls{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;padding:12px!important;gap:8px!important}body .fbs-list-controls :is(input,select){font-size:14px!important;padding:8px!important}body .fbp-commerce-heading h1{font-size:25px}}

/* Theme back-to-top control: contrast and clearance above mobile navigation. */
body .scroll_to_top,body .scroll_to_top:hover,body .scroll_to_top:focus{background:var(--fbp-brand,#243047)!important;color:#fff!important;border:1px solid #fff!important;box-shadow:0 3px 12px #0003}
body .scroll_to_top:before{color:#fff!important}
@media(max-width:700px){body .scroll_to_top{bottom:calc(84px + env(safe-area-inset-bottom,0px))!important;right:16px!important}}
/* Each listing row becomes a labelled card on small screens. */
.fbp-mobile-step-picker{display:none}
@media(max-width:700px){
body table.fbp-mobile-cards{display:block;width:100%!important;border:0!important;background:transparent!important;table-layout:auto}
body table.fbp-mobile-cards thead,body table.fbp-mobile-cards .fbp-mobile-table-header{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
body table.fbp-mobile-cards tbody,body table.fbp-mobile-cards tfoot{display:block;width:100%}
body table.fbp-mobile-cards tbody>tr{display:block;margin:0 0 14px;padding:14px;background:var(--fbp-panel,#fff);border:1px solid var(--fbp-accent,#dfe5ee);border-radius:10px}
body table.fbp-mobile-cards tbody>tr>td,body table.fbp-mobile-cards tbody>tr>th{display:block;width:auto!important;min-width:0!important;text-align:left!important;padding:8px 0!important;border:0!important;white-space:normal!important;overflow-wrap:anywhere}
body table.fbp-mobile-cards [data-mobile-label]:before{content:attr(data-mobile-label);display:block;font-size:12px;line-height:1.4;font-weight:700;color:var(--fbp-ink,#243047);margin-bottom:4px}
body table.fbp-mobile-cards [data-mobile-label=""]:before{display:none}
body table.fbp-mobile-cards td a,body table.fbp-mobile-cards td button{max-width:100%;white-space:normal}
body .fbs-pub-table-wrap:has(.fbp-mobile-cards),body .fbs-table-wrap:has(.fbp-mobile-cards){overflow:visible;min-width:0}
body .fbs-steps:has(+.fbp-mobile-step-picker){display:none!important}
body .fbp-mobile-step-picker{display:block;margin:14px 0;font-size:13px;font-weight:700}
body .fbp-mobile-step-picker select{display:block;width:100%;min-height:44px;margin-top:6px;padding:10px;background:#fff;color:var(--fbp-ink,#243047);border:1px solid var(--fbp-accent,#dfe5ee);border-radius:7px;font-size:16px}
body .fbs-actions{position:sticky;bottom:calc(78px + env(safe-area-inset-bottom,0px));z-index:20;background:var(--fbp-panel,#fff);padding:10px;border:1px solid var(--fbp-accent,#dfe5ee);border-radius:8px;gap:8px}
body .fbs-actions>div{flex:1;justify-content:flex-end}body .fbs-actions button{padding:9px 12px!important;font-size:13px!important}
body [role=tablist],body .woocommerce-tabs ul.tabs,body .fbs-pub-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;gap:8px;max-width:100%;scrollbar-width:thin}
body [role=tablist]>* ,body .woocommerce-tabs ul.tabs>li,body .fbs-pub-tabs>*{flex:0 0 auto;white-space:nowrap}
}

@media(max-width:700px){body table.fbp-mobile-cards tr[hidden]{display:none!important}body table.fbp-mobile-cards tfoot>tr,body table.fbp-mobile-cards tfoot th,body table.fbp-mobile-cards tfoot td{display:block;width:auto!important;white-space:normal}body .woocommerce-tabs ul.tabs>li{float:none!important}}
/* Constrain cards to their actual viewport, including legacy table minimum widths. */
@media(max-width:700px){body .fbs-publisher-workspace table.fbs-pub-table.fbp-mobile-cards{min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box}body .fbs-publisher-workspace .fbs-pub-table-wrap{min-width:0;max-width:100%;width:100%;box-sizing:border-box}body table.fbp-mobile-cards tbody>tr{box-sizing:border-box;min-width:0;max-width:100%}body .fbs-publisher-workspace .fbs-pub-topbar>a:not(.fbs-pub-home){display:none}body .fbs-pub-book-title{min-width:0;overflow-wrap:anywhere}body .fbs-pub-main{box-sizing:border-box;max-width:100%}body .fbp-built-home :is(section,article,.fbp-builder-row,.fbp-builder-cell){min-width:0;box-sizing:border-box;max-width:100%}}
.fbp-featured-field{border:1px solid var(--fbp-accent,#ddd);padding:16px;margin:20px 0}.fbp-featured-field legend{font-weight:700}.fbp-featured-field [data-featured-preview]{margin-top:14px}.fbp-featured-field img{display:block;max-width:100%;width:auto;max-height:240px;object-fit:contain}.fbp-nav-item-icon{display:inline-flex;width:20px;height:20px;vertical-align:middle;margin-right:8px}.fbp-nav-item-icon svg{width:100%;height:100%}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage){grid-template-columns:repeat(7,minmax(0,1fr));overflow:hidden;padding:30px 16px}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage)>.fbp-market-book:nth-child(4){display:flex;grid-row:1;grid-column:4/span 3;transform:rotate(7deg);z-index:4}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage)>.fbp-market-book:nth-child(n+5){display:none}
body.fbp .fbp-built-home .fbp-market-cover .fbp-labelled-cover{display:inline-block;position:relative;max-width:100%;height:100%;width:auto;line-height:0}
body.fbp .fbp-built-home .fbp-market-cover .fbp-labelled-cover>img{height:100%;width:auto;max-width:100%;object-fit:contain}
body.fbp .fbp-cover-reader{display:flex;align-items:center;justify-content:center;line-height:1;z-index:5}body.fbp .fbp-cover-reader img.fbp-reader-badge-icon{width:40%!important;height:40%!important;min-width:0!important;max-width:none!important;object-fit:contain}
@media(max-width:700px){body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage){display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important}body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage)>.fbp-market-book{grid-row:1!important;min-width:0}body .fbs-pub-book-title>.fbp-labelled-cover{width:64px!important;max-height:none}body .fbs-pub-book-title .fbp-cover-reader{display:flex!important;width:19px;height:19px}body .fbs-pub-book-title .fbp-cover-reader img{width:15px!important;height:15px!important}body .fbs-pub-book-title .fbp-cover-edition{display:block!important;font-size:8px!important;padding:2px!important}}
body.fbp .fbp-market-cover .fbp-labelled-cover{display:inline-block;position:relative;width:auto;max-width:100%;height:100%;line-height:0}body.fbp .fbp-market-cover .fbp-labelled-cover>img{display:block;height:100%;width:auto;max-width:100%;object-fit:contain}body.fbp .fbp-built-home .fbp-product-grid>article,body.fbp .fbp-built-home .fbp-content-grid>article{min-width:0;overflow-wrap:anywhere}

/* The glyph scales inside the corner badge, including compact catalogue covers. */
body.fbp .fbp-labelled-cover .fbp-cover-reader>img.fbp-reader-badge-icon{width:40%!important;height:40%!important;min-width:0!important;max-width:none!important;max-height:none!important;inset:11% 10% auto auto!important}

.fbp-mobile-current-section{display:none}@media(max-width:700px){body .fbp-mobile-step-picker select{display:none}body .fbp-mobile-current-section{display:block;margin-top:6px;padding:12px;background:var(--fbp-panel,#fff);border:1px solid var(--fbp-accent,#dfe5ee);border-radius:7px;font-size:16px}}

.fbp-post-categories{border:1px solid var(--fbp-accent,#ddd);padding:16px;margin:20px 0}.fbp-post-categories legend{font-weight:700}.fbp-post-categories details{border:1px solid var(--fbp-accent,#ddd);border-radius:7px;background:var(--fbp-panel,#fff);padding:12px}.fbp-post-categories summary{cursor:pointer;min-height:24px;font-size:16px}.fbp-post-categories label{display:flex;align-items:center;gap:10px;padding:8px 0;margin:0}.fbp-post-categories input[type=checkbox]{width:18px;height:18px;margin:0}
/* Overlap covers use their natural aspect ratio rather than nested percentage heights. */
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage)>.fbp-market-book{display:block!important;align-self:center;min-height:0!important}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage)>.fbp-market-book:nth-child(n+5){display:none!important}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage) .fbp-market-cover{display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0!important}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage) .fbp-market-cover>a,body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage) .fbp-labelled-cover{display:block!important;position:relative;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;padding:0!important;line-height:0}
body.fbp .fbp-built-home :is(.fbp-hero-arrangement-overlap,.fbp-hero-arrangement-collage) .fbp-market-cover img:not(.fbp-reader-badge-icon){display:block!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;object-fit:contain!important;margin:0!important}

/* Mobile hero: full-width copy, then CTA beside two proportional covers. */
@media(max-width:700px){
body.fbp .fbp-built-home .fbp-sales-hero.fbp-mobile-hero-pair{display:grid!important;grid-template-columns:minmax(0,0.9fr) minmax(0,1.4fr);gap:18px 12px;align-items:center;min-height:0!important;height:auto!important;padding:28px 20px!important}
body.fbp .fbp-built-home .fbp-mobile-hero-pair>div:first-child{display:contents}
body.fbp .fbp-built-home .fbp-mobile-hero-pair>div:first-child>:is(p,h1){grid-column:1/-1;margin:0!important;min-width:0}
body.fbp .fbp-built-home .fbp-mobile-hero-pair>div:first-child>.button{grid-column:1;align-self:center;justify-self:start;margin:0!important;padding:12px 14px!important;font-size:14px!important;white-space:normal}
body.fbp .fbp-built-home .fbp-mobile-hero-pair .fbp-builder-hero-books{grid-column:2;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:0!important;width:100%!important;min-width:0!important;margin:0!important;padding:20px 10px!important;overflow:visible!important}
body.fbp .fbp-built-home .fbp-mobile-hero-pair .fbp-builder-hero-books>.fbp-market-book:first-child{grid-column:1/span 3;transform:rotate(-5deg);z-index:2}
body.fbp .fbp-built-home .fbp-mobile-hero-pair .fbp-builder-hero-books>.fbp-market-book:nth-child(2){grid-column:2/span 3;transform:rotate(5deg);z-index:1}
body.fbp .fbp-built-home .fbp-mobile-hero-pair .fbp-builder-hero-books>.fbp-market-book:nth-child(n+3){display:none!important}
body.fbp .fbp-built-home .fbp-mobile-hero-pair .fbp-market-cover{filter:drop-shadow(0 10px 9px rgba(0,0,0,.35))}
}
@media(max-width:340px){
body.fbp .fbp-built-home .fbp-sales-hero.fbp-mobile-hero-pair{grid-template-columns:minmax(0,1fr)}
body.fbp .fbp-built-home .fbp-mobile-hero-pair>div:first-child>.button{grid-column:1;justify-self:center}
body.fbp .fbp-built-home .fbp-mobile-hero-pair .fbp-builder-hero-books{grid-column:1;max-width:230px!important;justify-self:center}
}
