/* Only a verified Creator Hub offer view receives this class. */
body.ch-offer-view{background:var(--ch-canvas);color:var(--ch-ink);font-family:var(--ch-body-font);--tutor-color-primary:var(--ch-accent);--tutor-color-primary-hover:var(--ch-ink);--tutor-body-color:var(--ch-ink);--tutor-color-black:var(--ch-ink)}
body.ch-offer-view>.elementor-location-header,body.ch-offer-view .elementor[data-elementor-type="header"],body.ch-offer-view .elementor[data-elementor-type="footer"]{display:none!important}
.ch-offer-nav{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap;padding:24px max(24px,calc((100% - 1120px)/2));background:var(--ch-surface);border-bottom:1px solid var(--ch-line)}
.ch-offer-nav a{color:var(--ch-ink);text-decoration:none;min-height:44px;display:inline-flex;align-items:center}
.ch-offer-brand{font:800 23px/1.2 var(--ch-heading-font);letter-spacing:-.6px}
.ch-offer-actions{display:flex;align-items:center;gap:12px 20px;flex-wrap:wrap}
.ch-offer-back{font-size:14px;font-weight:700;border:1px solid var(--ch-line);border-radius:99px;padding:9px 16px}
body.ch-offer-view #content,body.ch-offer-view .site-content{background:var(--ch-canvas)}
body.ch-offer-view.single-product #main{max-width:1120px;margin:48px auto;padding:0 24px}
body.ch-offer-view .product_title,body.ch-offer-view .tutor-course-details-title{font-family:var(--ch-heading-font)!important;font-size:clamp(30px,4vw,52px)!important;line-height:1.1!important;letter-spacing:-1.5px;color:var(--ch-ink)!important}
body.ch-offer-view .tutor-wrap{background:var(--ch-canvas);padding-top:40px;padding-bottom:48px}
body.ch-offer-view .tutor-card,body.ch-offer-view .woocommerce-tabs{background:var(--ch-surface);border:1px solid var(--ch-line);border-radius:20px}
body.ch-offer-view .woocommerce-tabs{padding:24px}
body.ch-offer-view .woocommerce-product-gallery img{border-radius:20px}
body.ch-offer-view .single_add_to_cart_button,body.ch-offer-view .tutor-btn-primary{background:var(--ch-accent)!important;color:var(--ch-accent-text)!important;border-color:var(--ch-accent)!important;border-radius:999px!important;min-height:48px;font-weight:700}
body.ch-offer-view .single_add_to_cart_button:hover,body.ch-offer-view .tutor-btn-primary:hover{background:var(--ch-ink)!important;border-color:var(--ch-ink)!important}
body.ch-offer-view .tutor-btn-outline-primary{color:var(--ch-accent)!important;border-color:var(--ch-accent)!important;border-radius:999px}
body.ch-offer-view .price{color:var(--ch-ink)!important;font-weight:800}
.ch-offer-footer{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:20px;padding:32px max(24px,calc((100% - 1120px)/2));border-top:1px solid var(--ch-line);background:var(--ch-surface);font-size:14px}
.ch-offer-footer a{color:var(--ch-ink);min-height:44px;display:inline-flex;align-items:center;text-decoration:underline}
.ch-offer-nav a:focus-visible,.ch-offer-footer a:focus-visible,body.ch-offer-view .tutor-btn:focus-visible,body.ch-offer-view .single_add_to_cart_button:focus-visible{outline:3px solid var(--ch-ink);outline-offset:4px}
@media(max-width:600px){.ch-offer-nav{gap:8px;padding:16px 24px}.ch-offer-brand{font-size:20px}.ch-offer-back{font-size:12px;padding:8px 12px}body.ch-offer-view.single-product #main{margin:24px auto;padding:0 20px}body.ch-offer-view .tutor-wrap{padding-top:24px}.ch-offer-footer{flex-direction:column;align-items:flex-start;padding:24px}}
/* The existing customer portal uses stronger button rules on signed-in course pages. */
body.ch-offer-view.is-customer-portal{--isp-button:var(--ch-accent);--isp-button-dark:var(--ch-ink);--isp-radius-sm:24px}
body.ch-offer-view.is-customer-portal .tutor-btn-primary,body.ch-offer-view.is-customer-portal a.tutor-btn-primary{background:var(--ch-accent)!important;color:var(--ch-accent-text)!important;border-radius:999px!important}
body.ch-offer-view.is-customer-portal .tutor-btn:not(.tutor-btn-primary){background:var(--ch-surface)!important;color:var(--ch-ink)!important;border:1px solid var(--ch-line)!important;padding:8px 14px}
body.ch-offer-view.is-customer-portal .tutor-btn:disabled{opacity:.55;cursor:not-allowed}
body.ch-offer-view .is-tutor-portal-header .is-portal-user-toggle{background:var(--ch-accent)!important}
body.ch-offer-view .is-tutor-portal-header .is-portal-logo-text{color:var(--ch-ink);font-family:var(--ch-heading-font)}
@media(max-width:600px){body.ch-offer-view .tutor-wrap .tooltip-txt.tooltip-right{left:auto!important;right:0!important;transform:none!important;max-width:220px;white-space:normal}}

/* Native WooCommerce retains cart, checkout and access logic inside the creator brand. */
body.ch-offer-view.woocommerce-cart #main,body.ch-offer-view.woocommerce-checkout #main,body.ch-offer-view.woocommerce-account #main{max-width:1120px;margin:40px auto;padding:0 24px}
body.ch-offer-view .woocommerce,body.ch-offer-view .wc-block-components-main{color:var(--ch-ink);font-family:var(--ch-body-font)}
body.ch-offer-view .woocommerce a.button,body.ch-offer-view .woocommerce button.button,body.ch-offer-view .wc-block-components-button:not(.is-link){background:var(--ch-accent)!important;color:var(--ch-accent-text)!important;border-color:var(--ch-accent)!important;border-radius:999px!important;min-height:48px}
body.ch-offer-view .woocommerce table.shop_table,body.ch-offer-view .woocommerce-checkout-review-order,body.ch-offer-view .woocommerce-MyAccount-content,body.ch-offer-view .wc-block-components-sidebar{background:var(--ch-surface);border-color:var(--ch-line);border-radius:16px;padding:20px}
body.ch-offer-view .woocommerce input.input-text,body.ch-offer-view .woocommerce select,body.ch-offer-view .woocommerce textarea{background:var(--ch-surface);color:var(--ch-ink);border:1px solid var(--ch-line);border-radius:8px;min-height:44px}
body.ch-offer-view .woocommerce a:not(.button){color:var(--ch-accent)}
body.ch-offer-view .woocommerce h1,body.ch-offer-view .woocommerce h2,body.ch-offer-view .woocommerce h3{font-family:var(--ch-heading-font);color:var(--ch-ink)}
@media(max-width:600px){body.ch-offer-view.woocommerce-cart #main,body.ch-offer-view.woocommerce-checkout #main,body.ch-offer-view.woocommerce-account #main{margin:24px auto;padding:0 16px}}

/* Native lesson, quiz and assignment controls retain Tutor access and completion logic. */
body.ch-learning-view .tutor-learning-page,body.ch-learning-view .tutor-learning-area,body.ch-learning-view .tutor-learning-area-content{background:var(--ch-canvas);color:var(--ch-ink)}
body.ch-learning-view .tutor-learning-header,body.ch-learning-view .tutor-learning-sidebar,body.ch-learning-view .tutor-lesson-content{background:var(--ch-surface);color:var(--ch-ink);border-color:var(--ch-line)}
body.ch-learning-view .tutor-learning-header-title,body.ch-learning-view .tutor-lesson-wrapper h2,body.ch-learning-view .tutor-lesson-wrapper h3{font-family:var(--ch-heading-font);color:var(--ch-ink)}
body.ch-learning-view .tutor-learning-nav-item.active{border-inline-start:3px solid var(--ch-accent);color:var(--ch-accent)}
body.ch-learning-view .tutor-learning-nav-item:focus-visible{outline:3px solid var(--ch-accent);outline-offset:-3px}

body.ch-learning-view .tutor-learning-progress-text,body.ch-learning-view .tutor-learning-nav-header-summary{color:var(--ch-muted)}

/* Tutor 3.9 keeps the lesson controls in its course-topic shell. */
body.ch-learning-view .tutor-course-single-content-wrapper,
body.ch-learning-view .tutor-course-topic-single-body{background:var(--ch-canvas);color:var(--ch-ink)}
body.ch-learning-view .tutor-course-single-sidebar-wrapper,
body.ch-learning-view .tutor-course-topic-single-footer,
body.ch-learning-view .tutor-spotlight-mobile-progress-complete{background:var(--ch-surface);color:var(--ch-ink);border-color:var(--ch-line)}
body.ch-learning-view .tutor-course-topic-single-header{background:var(--ch-accent);color:var(--ch-accent-text);border-color:var(--ch-line)}
body.ch-learning-view .tutor-course-topic-single-header-title{min-width:0;font-family:var(--ch-heading-font);color:var(--ch-accent-text)}
body.ch-learning-view .tutor-course-topic-single-header .ch-learning-creator-name{color:var(--ch-accent-text)}
body.ch-learning-view .tutor-course-topic-single-header a:focus-visible{outline:2px solid var(--ch-accent-text);outline-offset:2px}
body.ch-learning-view .tutor-course-topic-item.is-active{background:var(--ch-canvas);border-inline-start:3px solid var(--ch-accent)}

body.ch-learning-view .ch-learning-creator-name{display:block;font-family:var(--ch-body-font);font-size:12px;line-height:1.4;color:var(--ch-muted);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:100%}
body.ch-learning-view .tutor-learning-header-title{min-width:0}

body.ch-learning-view .ch-learning-creator-name{width:fit-content;text-decoration:underline;padding:4px 0}body.ch-learning-view .ch-learning-creator-name:focus-visible{outline:2px solid var(--ch-accent);outline-offset:2px}

/* Astra / Elementor Header & Footer Builder uses theme wrappers, not Elementor locations.
   Hide only that verified theme chrome; Tutor learning keeps its native shell. */
body.ch-offer-view:not(.ch-learning-view).wp-theme-astra > #page > #masthead,
body.ch-offer-view:not(.ch-learning-view).wp-theme-astra > #page > #colophon{display:none!important}

/* Standard block themes render their site chrome as top-level template parts.
   The verified creator journey supplies that chrome; preserve main content,
   nested content headers, non-header/footer parts, and the native learning shell. */
body.ch-offer-view > .wp-site-blocks > header.wp-block-template-part,
body.ch-offer-view > .wp-site-blocks > footer.wp-block-template-part{display:none!important}
/* Order confirmation blocks sit outside the classic .woocommerce wrapper. */
body.ch-offer-view .wc-block-order-confirmation-downloads__table a.button{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-height:48px;padding:10px 18px;border-radius:999px;background:var(--ch-accent);color:var(--ch-accent-text);text-decoration:none;font-weight:700}
body.ch-offer-view .wc-block-order-confirmation-downloads__table a.button:focus-visible{outline:3px solid var(--ch-ink);outline-offset:3px}
@media(max-width:600px){
 body.ch-offer-view .wc-block-order-confirmation-downloads{max-width:100%;overflow-x:auto}
 /* Keep native table/header semantics. Decorative mobile labels have empty
    speech alternatives; older engines retain the native scrollable table. */
 @supports(content:attr(data-title) / ""){
 body.ch-offer-view .wc-block-order-confirmation-downloads__table,
 body.ch-offer-view .wc-block-order-confirmation-downloads__table tbody,
 body.ch-offer-view .wc-block-order-confirmation-downloads__table tr,
 body.ch-offer-view .wc-block-order-confirmation-downloads__table td{display:block;box-sizing:border-box;width:100%;min-width:0}
 body.ch-offer-view .wc-block-order-confirmation-downloads__table thead{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
 body.ch-offer-view .wc-block-order-confirmation-downloads__table td{text-align:start!important;overflow-wrap:anywhere;padding:12px 16px}
 body.ch-offer-view .wc-block-order-confirmation-downloads__table td::before{content:attr(data-title) / "";display:block;font-weight:700;margin-bottom:6px}
 }
}

/* Existing customer portal: one creator identity, native account controls. */
body.ch-offer-view.is-customer-portal{
 --isp-primary:var(--ch-accent);--isp-primary-dark:var(--ch-ink);
 --isp-primary-light:color-mix(in srgb,var(--ch-accent) 12%,var(--ch-surface));
 --isp-button:var(--ch-accent);--isp-button-dark:var(--ch-ink);
 --isp-header-bg:var(--ch-surface);--isp-header-text:var(--ch-ink);
 --isp-header-text-muted:var(--ch-muted);--isp-bg:var(--ch-canvas);
 --isp-surface:var(--ch-surface);--isp-text:var(--ch-ink);
 --isp-text-muted:var(--ch-muted);--isp-border:var(--ch-line)
}
/* Creator identity and backlink already appear immediately above this account toolbar. */
body.ch-offer-view.is-customer-portal .is-portal-header .is-portal-logo{display:none}
body.ch-offer-view.is-customer-portal .is-portal-header{height:auto;min-height:var(--isp-header-height)}
body.ch-offer-view.is-customer-portal .is-portal-header-inner{min-height:var(--isp-header-height);height:auto;flex-wrap:wrap;gap:8px 16px;padding-block:8px;box-sizing:border-box}
body.ch-offer-view.is-customer-portal .is-portal-nav{min-width:0;flex:1 1 600px}
body.ch-offer-view.is-customer-portal .is-portal-nav-list{flex-wrap:wrap}
body.ch-offer-view.is-customer-portal .is-portal-user{margin-inline-start:auto;max-width:100%}
body.ch-offer-view.is-customer-portal .is-portal-user-name{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
body.ch-offer-view.is-customer-portal .is-portal-wrapper{font-family:var(--ch-body-font)}
body.ch-offer-view.is-customer-portal .is-portal-cart{background:var(--isp-primary-light)}
body.ch-offer-view.is-customer-portal .is-portal-user-toggle,
body.ch-offer-view.is-customer-portal .is-cart-count{color:var(--ch-accent-text)!important}
body.ch-offer-view.is-customer-portal .is-portal-user-toggle:focus-visible{outline:3px solid var(--ch-ink)!important;outline-offset:3px}
/* Portal CTAs are anchors without Woo's .button class. Pair their label with
   the accent background instead of the general commerce-link accent ink. */
body.ch-offer-view.is-customer-portal .woocommerce a:is(.is-browse-courses-btn,.is-cta-btn,.is-portal-btn){background:var(--ch-accent);color:var(--ch-accent-text)}
body.ch-offer-view.is-customer-portal footer.ch-offer-footer{display:flex!important}
/* The provider fixes its mobile panel to the viewport. Dock its toolbar there too
   while open so the creator header cannot obscure the first menu links. */
@media(max-width:768px){
 body.ch-offer-view.is-customer-portal.is-mobile-nav-open .is-portal-header{position:fixed;top:0;left:0;right:0;height:calc(var(--isp-header-height) + 1px);box-sizing:border-box}
 body.ch-offer-view.is-customer-portal.is-mobile-nav-open .is-portal-mobile-nav{top:calc(var(--isp-header-height) + 1px)}
}
/* The signed-out account already has the verified creator identity above it. */
body.ch-offer-view.is-customer-portal .is-login-header{display:none}
/* Creator catalogs use curated cards, not legacy theme taxonomy navigation. */
body.ch-offer-view.single-product .summary .single-product-category,
body.ch-offer-view.single-product .product_meta .posted_in,
body.ch-offer-view.single-product .product_meta .tagged_as{display:none!important}
/* The customer keeps a useful purchase history after file access ends. */
body.ch-offer-view .ch-download-library{max-width:1050px;margin-inline:auto;color:var(--ch-ink)}
body.ch-offer-view .ch-download-library h2{font-size:clamp(26px,4vw,36px);margin:0 0 12px}
body.ch-offer-view .ch-download-cards{display:grid;gap:16px;margin:28px 0}
body.ch-offer-view .ch-download-card{display:flex;justify-content:space-between;gap:24px;padding:24px;border:1px solid var(--ch-line);border-radius:16px;background:var(--ch-surface);min-width:0;overflow-wrap:anywhere}
body.ch-offer-view .ch-download-card h3{font-size:22px;line-height:1.3;margin:6px 0 14px;color:var(--ch-ink)}
body.ch-offer-view .ch-download-card p{margin:0 0 8px}
body.ch-offer-view .ch-download-product,body.ch-offer-view .ch-download-details{color:var(--ch-muted);font-size:14px}
body.ch-offer-view .ch-download-status{margin:0 0 12px;padding:0;list-style:none;font-weight:600}
body.ch-offer-view .ch-download-card-actions{display:flex;flex-direction:column;gap:14px;align-items:flex-start;justify-content:center;flex-shrink:0}
body.ch-offer-view .ch-download-pagination{display:flex;gap:20px;flex-wrap:wrap;padding-block:16px}
body.ch-offer-view .ch-download-library a:focus-visible{outline:3px solid var(--ch-ink);outline-offset:4px}
body.ch-offer-view .is-dashboard-download-card a.is-download-btn{width:auto;min-width:44px;min-height:44px;padding:10px;gap:6px}
body.ch-offer-view .is-dashboard-download-card a.is-download-btn span{font-size:14px}
@media(max-width:600px){
 body.ch-offer-view .ch-download-card{flex-direction:column;padding:20px;gap:12px}
 body.ch-offer-view .ch-download-card-actions{align-items:stretch}
 body.ch-offer-view .ch-download-card-actions .button{text-align:center}
}

/* The portal MU header is fixed at the same top edge as Tutor 4.1's learning
   header. Use Tutor's own full-screen shell, including the creator return link,
   instead of hiding the course title and completion controls under two headers. */
body.ch-learning-view.is-tutor-portal-mode .is-tutor-portal-header{display:none!important}
body.ch-learning-view.is-tutor-portal-mode{padding-top:0!important}
