/* PUNTO! Studio 3.0 — M5 CATALOGUE FIRST
   Only applied after an exact existing catalogue enhancement succeeds.
   Does not style unrelated pages, product details, live payments, CMS or forms globally.
 */
body[data-pm5="catalogue"][data-pm5-ready="1"] {
  --pm5-ink:#112039;--pm5-accent:#f38a42;--pm5-border:#dce3eb;
  --pm5-space:16px;--pm5-paper:#fff;--pm5-muted:#52637a;
}
/* Catalogue content expands to make room for categories, actual listings and optional help. */
body[data-pm5-ready="1"] :is(.pt77-wrap,.pg28-shell,.pt53 .wrap,.pt58-wrap,.pt58-container,.pt-wrap,.pt65-container) {
  width:min(1360px,calc(100% - 36px))!important;max-width:1360px!important;
}
body[data-pm5-ready="1"] .pm5-three {
  display:grid!important;grid-template-columns:minmax(180px,222px) minmax(0,1fr) minmax(178px,232px)!important;
  align-items:start!important;gap:var(--pm5-space)!important;width:100%;max-width:none!important;
}
body[data-pm5-ready="1"] .pm5-three > :first-child {grid-column:1;min-width:0}
body[data-pm5-ready="1"] .pm5-three > :nth-child(2) {grid-column:2;min-width:0}
body[data-pm5-ready="1"] .pm5-three > .pm5-right {grid-column:3;min-width:0}
body[data-pm5-ready="1"] .pm5-right {
  display:flex;flex-direction:column;gap:10px;align-self:start;
  background:var(--pm5-paper);border:1px solid var(--pm5-border);border-radius:14px;
  padding:16px;box-shadow:0 6px 20px #11203909;
  color:var(--pm5-ink);position:sticky;top:15px;font-family:inherit;
}
body[data-pm5-ready="1"] .pm5-right-title {font-size:.99rem;line-height:1.3;font-weight:800;margin:0!important;color:var(--pm5-ink)}
body[data-pm5-ready="1"] .pm5-right-note {font-size:.78rem;line-height:1.5;color:var(--pm5-muted);margin:0!important}
body[data-pm5-ready="1"] .pm5-right-links {display:flex;flex-direction:column;gap:5px}
body[data-pm5-ready="1"] .pm5-link {
  display:block;color:#21466e!important;text-decoration:none!important;font-weight:700;font-size:.81rem;
  line-height:1.35;padding:10px 8px;border:1px solid #e6eaf0;border-radius:8px;overflow-wrap:anywhere;
}
body[data-pm5-ready="1"] .pm5-link:hover {background:#f4f7fb;border-color:#a8bfd5}
body[data-pm5-ready="1"] .pm5-link:focus-visible {outline:3px solid var(--pm5-accent);outline-offset:2px}
body[data-pm5-ready="1"] .pm5-side-feature {display:flex;flex-direction:column;gap:7px;padding:11px 10px;background:#f5f7fb;border-radius:10px}
body[data-pm5-ready="1"] .pm5-side-feature strong {color:var(--pm5-ink);font-size:.85rem;line-height:1.3}
body[data-pm5-ready="1"] .pm5-side-feature .pm5-link {background:white}
/* COURSE CATALOGUE: one unobtrusive title, first course visible immediately. */
body[data-pm5-ready="1"][data-pm5-section="courses"] .pt77-heading {
  margin:0 0 11px!important;padding:5px 0 8px!important;min-height:0!important;
  display:flex;flex-wrap:wrap;gap:5px 16px;align-items:baseline;border:0!important;
}
body[data-pm5-ready="1"][data-pm5-section="courses"] .pt77-heading .pt75-eyebrow {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="courses"] .pt77-heading h1 {
  margin:0!important;font-size:clamp(1.35rem,2.2vw,1.85rem)!important;line-height:1.22!important;
}
body[data-pm5-ready="1"][data-pm5-section="courses"] .pt77-heading > p:last-child {
  margin:0!important;max-width:680px;font-size:.79rem!important;line-height:1.4!important;
}
body[data-pm5-ready="1"] .pt77-sidebar {padding:12px!important;margin:0!important;min-width:0}
body[data-pm5-ready="1"] .pt77-results {padding:0!important;margin:0!important;min-width:0}
body[data-pm5-ready="1"] .pt77-listbar {padding:0 0 8px!important;margin:0!important}
body[data-pm5-ready="1"] .pt77-course-list {gap:10px!important}
body[data-pm5-ready="1"] .pt77-course-row {padding:12px 14px!important;margin:0!important;min-height:0!important}
body[data-pm5-ready="1"] .pt77-course-row p {margin:4px 0 5px!important}
body[data-pm5-ready="1"] .pt77-sidebar .pt77-help {font-size:.79rem;line-height:1.35}
/* FREE PRACTICE: the original pt78 gallery (and filters) is kept intact. */
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-intro {
  padding:8px 0 9px!important;margin:0!important;min-height:0!important;background:transparent!important;
}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-intro-grid {display:block!important;min-height:0!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-intro :is(.pg28-eyebrow,.pg28-lede,.pg28-assurance) {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-intro h1 {
  margin:0 0 7px!important;font-size:clamp(1.35rem,2.1vw,1.85rem)!important;line-height:1.2!important;
}
body[data-pm5-ready="1"][data-pm5-section="learn"] :is(.m3-page-band--learn) {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-library {margin:0!important;padding:0 0 20px!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-library > .pg28-shell {padding-top:0!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-browse-head {margin:0 0 6px!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-browse-head p {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-browse-head h2 {font-size:1.07rem!important;margin:0!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pt78-sidebar {margin:0!important;padding:12px!important;min-width:0}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pt78-content {margin:0!important;padding:0!important;min-width:0}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pm5-featured {
  margin:0!important;padding:12px!important;display:block!important;width:100%!important;
  min-width:0!important;max-width:100%!important;box-shadow:none!important;border-radius:10px;
}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pm5-featured :is(h2,p) {font-size:.8rem!important;line-height:1.42!important;margin:5px 0!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pm5-featured a {
  display:block!important;margin-top:9px!important;padding:9px 10px!important;font-size:.76rem!important;
  white-space:normal!important;overflow-wrap:anywhere;text-align:center!important;
}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pm5-featured .pf80-feature-kicker {font-size:.67rem!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-results-bar {padding:4px 0 8px!important;margin:0!important}
body[data-pm5-ready="1"][data-pm5-section="learn"] .pg28-cards {gap:11px!important}
/* SHOP: remove duplicate marketing above the genuine product catalogue. */
body[data-pm5-ready="1"][data-pm5-section="shop"] :is(.p30-section[data-p30-w01],.m3-page-band--shop) {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt53 > .wrap > .pt53-breadcrumb {margin:3px 0!important;padding:0!important;font-size:.7rem!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt58-shop-shell-head {
  border:0!important;background:transparent!important;padding:2px 0 7px!important;margin:0!important;min-height:0!important;
}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt58-shop-shell-head .pt58-shell-eyebrow {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt58-shop-shell-head h1 {
  font-size:clamp(1.35rem,2.2vw,1.85rem)!important;line-height:1.2!important;
  margin:0 0 3px!important;padding:0!important;
}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt58-shop-shell-head p {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt57-shop {margin:0!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt57-top {padding:0 0 6px!important;margin:0!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt57-top :is(p,.pt57-eyebrow) {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt57-top h2 {margin:0!important;font-size:1.04rem!important;line-height:1.25}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt79-layout {margin:0!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt79-sidebar {padding:12px!important;margin:0!important;min-width:0}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt79-sidebar-intro {margin:0 0 6px!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt79-sidebar-intro h2 {font-size:.96rem!important;margin:0!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt79-results-area {padding:0!important;margin:0!important;min-width:0}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt79-results-head {margin:0 0 7px!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="shop"] .pt57-grid {gap:11px!important}
/* TEACHER RESOURCES: downloadable materials first, explanation below. */
body[data-pm5-ready="1"][data-pm5-section="teachers"] .m3-page-band--teachers {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] :is(.pt58-hero,.pt-hero,.pt65-hero) {
  padding:8px 0 10px!important;margin:0!important;min-height:0!important;background:transparent!important;
}
body[data-pm5-ready="1"][data-pm5-section="teachers"] :is(.pt58-hero,.pt-hero,.pt65-hero) h1 {
  margin:0 0 5px!important;font-size:clamp(1.35rem,2.15vw,1.85rem)!important;line-height:1.2!important;
}
body[data-pm5-ready="1"][data-pm5-section="teachers"] :is(.pt58-hero,.pt-hero,.pt65-hero) :is(.pt-lede,.pt58-eyebrow,.pt-eyebrow,.pt-pills) {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt-hero-grid {display:block!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt-hero-panel {display:none!important} /* repeated via right-hand quick access */
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt58-quicklinks {display:none!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt58-breadcrumb {margin:0!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-layout {margin:0!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-sidebar {padding:12px!important;margin:0!important;min-width:0}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-content {
  min-width:0!important;display:flex!important;flex-direction:column!important;gap:10px!important;padding:0!important;
}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-content #resources,
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-content #downloads,
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-content .pt58-catalog {order:0!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-content #featured {order:2!important;margin-top:22px!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] :is(.pt58-library,.pt58-catalog,.pt-downloads) {margin:0!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] :is(.pt58-section-head,.pt-section-head,.pt58-catalog-head) {margin:0 0 6px!important;padding:0!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt58-library h2,
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt-downloads h2 {font-size:1.15rem!important;line-height:1.3;margin:0 0 8px!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt58-feature {padding:12px!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] :is(.pt58-grid,.pt58-product-grid,.pt-download-grid) {gap:11px!important}
body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt-section:not(#downloads):not(.pt-downloads) {padding-top:18px!important;padding-bottom:18px!important}
/* Keep actual controls usable; responsive rails become secondary content, never block products. */
@media(max-width:1120px){
  body[data-pm5-ready="1"] .pm5-three {grid-template-columns:minmax(170px,210px) minmax(0,1fr)!important}
  body[data-pm5-ready="1"] .pm5-three > .pm5-right {grid-column:1/-1!important;position:static;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  body[data-pm5-ready="1"] .pm5-right-links {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-column:1/-1}
  body[data-pm5-ready="1"] .pm5-side-feature {grid-column:1/-1}
  body[data-pm5-ready="1"] .pm5-featured {grid-column:1/-1}
}
@media(max-width:740px){
                body[data-pm5-ready="1"] .pm5-three {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important}
  body[data-pm5-ready="1"] .pm5-three > :first-child,
  body[data-pm5-ready="1"] .pm5-three > :nth-child(2),
  body[data-pm5-ready="1"] .pm5-three > .pm5-right {grid-column:1!important}
  body[data-pm5-ready="1"] .pm5-three > .pm5-right {display:block;padding:12px}
  body[data-pm5-ready="1"] .pm5-right-title {margin-bottom:3px!important}
  body[data-pm5-ready="1"] .pm5-right-note {display:none}
  body[data-pm5-ready="1"] .pm5-right-links {grid-template-columns:1fr 1fr;display:grid;gap:7px}
  body[data-pm5-ready="1"] .pm5-link {padding:8px;font-size:.77rem}
  body[data-pm5-ready="1"] .pt77-sidebar {padding:8px!important}
  body[data-pm5-ready="1"] .pt77-sidebar .pt77-filter-panel {padding:6px 0!important}
  body[data-pm5-ready="1"] .pt78-sidebar,
  body[data-pm5-ready="1"] .pt79-sidebar,
  body[data-pm5-ready="1"] .pt80-sidebar {padding:9px!important}
  body[data-pm5-ready="1"] :is(.pt77-wrap,.pg28-shell,.pt53 .wrap,.pt58-wrap,.pt58-container,.pt-wrap,.pt65-container) {
    width:calc(100% - 24px)!important;max-width:none!important;
  }
  body[data-pm5-ready="1"][data-pm5-section="teachers"] .pt80-content #featured {margin-top:12px!important}
}
@media(prefers-reduced-motion:reduce){body[data-pm5-ready="1"] .pm5-right a {transition:none!important}}

/* English catalogue focus pass: use the existing layouts without the duplicate rails. */
body[data-punto-catalogue-focus="1"] :is(#free-library,#free-mini-courses,#catalogo) {scroll-margin-top:6rem}
body[data-punto-catalogue-focus="1"] .pg28 .pf80-featured {
  width:min(1360px,calc(100% - 36px));max-width:1360px;box-sizing:border-box;
  margin:0 auto 16px;padding:14px 18px;gap:12px;
}
body[data-punto-catalogue-focus="1"] .pg28 .pf80-feature-title {font-size:clamp(1.05rem,2vw,1.3rem);margin:2px 0 4px}
body[data-punto-catalogue-focus="1"] .pg28 .pf80-featured p {margin:0}
body[data-punto-catalogue-focus="1"] .pg28 .pf80-featured a {white-space:normal}
body[data-punto-catalogue-focus="1"] .pg28.pt78-ready .pg28-card {
  grid-template-columns:minmax(0,1fr)!important;min-height:0;
}
body[data-punto-catalogue-focus="1"] .pg28 .pg28-card-inner {grid-column:1;min-width:0}
body[data-punto-catalogue-focus="1"] .pg28 .pg28-start::after {content:none!important}
@media(min-width:901px){
  body[data-punto-catalogue-focus="1"] .pt53 .pt57-shop .pt79-layout {
    grid-template-columns:minmax(190px,222px) minmax(0,1fr);
  }
}
body[data-punto-catalogue-focus="1"] .pt53 .pt57-shop .pt57-card.pt57-featured-publication {
  grid-column:1/-1;grid-template-columns:minmax(0,1fr);min-height:0;
  background:#f7f3e9;border-color:#e5d9c3;
}
body[data-punto-catalogue-focus="1"] .pt53 .pt57-shop .pt57-featured-publication .pt57-card-body {padding:14px 16px;gap:6px}
body[data-punto-catalogue-focus="1"] .pt53 .pt57-shop .pt57-featured-publication .pt57-card-body p {margin:0;font-size:.84rem}
body[data-punto-catalogue-focus="1"] .pt53 .pt57-shop .pt57-featured-publication h3 {display:block;font-size:1.05rem;overflow:visible}
body[data-punto-catalogue-focus="1"] .pt53 .pt57-shop .pt57-featured-publication .pt57-button {align-self:flex-start;white-space:normal}
@media(max-width:740px){
  body[data-punto-catalogue-focus="1"] .pg28 .pf80-featured {width:calc(100% - 24px)}
  body[data-punto-catalogue-focus="1"] .pt77-heading {display:block!important}
  body[data-punto-catalogue-focus="1"] .pt77-heading .pt77-mini-jump {display:inline-block;margin-top:6px}
}
