/* Catalog cards share the theme's detail link; purchase/learning controls belong to the introduction. */
:is(.home .cc-home-popular,#lp-archive-courses) :is(.cc-home-course-card,.course-item):not(.widget-area *) :is(.wrap-btn-add-course-to-cart,.lp-course-buttons,.course-buttons,.course-readmore,
  .course-btn-continue,.lp-form-retake-course,.course-btn-extra,.lp-btn-woo-view-cart,
  .chiako-course-purchase-slot,.chiako-course-purchase-action,.chiako-course-purchase-hint,.cc-course-replay,form.purchase-course,form.enroll-course) { display:none !important; }
:is(.home .cc-home-popular,#lp-archive-courses) .ck-public-course-card a.ck-course-card-link { display:inline-flex; align-items:center; min-height:44px; box-sizing:border-box; }

/* Eduma already supplies the title link. Extend its hit area over the existing thumbnail and price. */
.widget_courses .thim-course-list-sidebar .lpr_course { position:relative; min-height:44px; }
.widget_courses .thim-course-list-sidebar .course-title a::after { content:""; position:absolute; inset:0; z-index:1; }
.widget_courses .thim-course-list-sidebar .lpr_course:has(.course-title a:focus-visible) { outline:2px solid currentColor; outline-offset:2px; }
html body#thim-body.single-lp_course:not(.course-item-popup) #main-content #learn-press-course .course-info > h1.entry-title,
body.single-lp_course:not(.course-item-popup) #learn-press-course .course-info > h1.entry-title {
  font-size:clamp(1.25rem,1.08rem + .55vw,1.5rem) !important; line-height:1.4; margin-bottom: .75em;
}

/* Eduma's native metadata and payment actions stay intact until their replacement is available. */
body.single-lp_course:not(.course-item-popup) #learn-press-course .course-meta-single:has(> .ck-course-overview),
body.single-lp_course:not(.course-item-popup) .course-meta-single.ck-course-meta {
  display:block !important; padding:12px 16px !important; margin-bottom:16px !important;
}
body.single-lp_course:not(.course-item-popup) .course-meta-single:has(> .ck-course-overview) > :is(.course-author,.course-categories,.meta-item-review,.info-learning,.lp-course-graduation),
body.single-lp_course:not(.course-item-popup) .course-meta-single.ck-course-meta > :is(.course-author,.course-categories,.meta-item-review,.info-learning,.lp-course-graduation),
body.single-lp_course .course-info:has(.ck-course-overview) > .cc-course-replay,
body.single-lp_course .ck-course-payment-replaced,
body.single-lp_course .course-meta-single:has(> .ck-course-overview .ck-course-action :is(a,button)) ~ .course-payment,
body.single-lp_course .ck-sticky-ready > .lp-course-buttons:not(.ck-course-sticky-action),
body.single-lp_course #learn-press-course:has(.ck-course-overview:is([data-course-state="finished"],[data-course-state="enrolled"],[data-course-state="recovery_hold"])) .thim-course-landing-button > .course-price,
body.single-lp_course .ck-sticky-learning > .course-price { display:none !important; }

/* LearnPress has separate controls for the whole course and for the current lesson. */
body:is(.single-lp_course,.course-item-popup) :is(.form-button-finish-course,.lp-btn-finish-course,.btn-finish-course,.lp-form-finish-course) { display:none !important; }
.ck-course-overview { display:grid !important; width:100%; box-sizing:border-box; grid-template-columns:minmax(0,1fr) auto; gap:.45rem 1rem; align-items:center; color:var(--cc-ink,#243240); }
.ck-course-info { min-width:0; }
.ck-course-byline,.ck-course-progress-line,.ck-course-instructor { display:flex; align-items:center; flex-wrap:wrap; gap:.25rem; }
.ck-course-byline { line-height:1.4; }
.ck-course-byline a.ck-course-instructor { min-height:44px; gap:.5rem; text-decoration:none; }
.ck-instructor-avatar { width:28px !important; height:28px !important; border-radius:50%; object-fit:cover; }
.ck-course-progress-line { font-size:.9rem; line-height:1.45; color:var(--cc-ink,#243240); }
.ck-course-progress-line progress { width:clamp(3rem,9vw,6rem); height:5px; margin:0 .25rem 0 0; border:0; border-radius:3px; overflow:hidden; background:var(--cc-line,#d5dde2); color:var(--cc-blue,#547f97); }
.ck-course-progress-line progress::-webkit-progress-bar { background:var(--cc-line,#d5dde2); }
.ck-course-progress-line progress::-webkit-progress-value { background:var(--cc-blue,#547f97); }
.ck-course-progress-line progress::-moz-progress-bar { background:var(--cc-blue,#547f97); }
.ck-course-rating { display:inline-block; position:relative; white-space:nowrap; color:var(--cc-blue,#547f97); }
.ck-course-rating .ck-stars-filled { position:absolute; overflow:hidden; left:0; top:0; }
.ck-quiz-result { font-size:.875em; }
.ck-course-action,.ck-course-sticky-action { display:flex; flex-direction:column; align-items:flex-end; gap:.2rem; }
.ck-course-action form,.ck-course-sticky-action form { margin:0; }
.ck-course-action .ck-course-price { font-size: .9rem; }
body.single-lp_course:not(.course-item-popup) :is(.ck-course-overview,.ck-course-sticky-action) :is(a.chiako-course-purchase-action,a.lp-button,button.lp-button) {
  display:inline-flex !important; align-items:center; justify-content:center; box-sizing:border-box;
  min-height:44px !important; color:var(--cc-ink,#243240) !important; background:var(--cc-tint,#e3edf2) !important;
  border:1px solid var(--cc-tint,#e3edf2) !important; border-radius:8px !important; padding:10px 22px !important;
  font-size:16px !important; font-weight:500 !important; box-shadow:none !important; text-decoration:none;
}
.chiako-course-purchase-hint { display:block; font-size:.875em; line-height:1.45; }
@media (max-width:767px) {
  .ck-course-overview { grid-template-columns: minmax(0,1fr); }
  .ck-course-action { align-items:stretch; }
  .ck-course-action :is(.lp-button,button[type=submit],form,.wrap-btn-add-course-to-cart) { width:100%; }
  .ck-course-action .chiako-course-purchase-hint { text-align:center; }
}
