/*
 * Bridge for pages still built on the legacy theme markup (body.pp-legacy).
 * Re-points the theme's variables at the Canopy brand so those pages match the
 * pp design system until they are rebuilt on it. Load after the theme CSS.
 */
:root {
  --font-family-primary: "Plus Jakarta Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --font-family-secondary: "Plus Jakarta Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --font-family-tertiary: "Plus Jakarta Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --radius: 10px;
  --border-radius: 10px;

  --color-primary: #0b6e74;
  --bs-primary-rgb: 11, 110, 116;
  --color-primary-: #0b6e74;
  --bs-primary--rgb: 11, 110, 116;
  --color-primary-10: #f4faf9;
  --bs-primary-10-rgb: 244, 250, 249;
  --color-primary-25: #eef7f6;
  --bs-primary-25-rgb: 238, 247, 246;
  --color-primary-50: #e3f2f1;
  --bs-primary-50-rgb: 227, 242, 241;
  --color-primary-100: #cfe7e6;
  --bs-primary-100-rgb: 207, 231, 230;
  --color-primary-200: #a6d3d1;
  --bs-primary-200-rgb: 166, 211, 209;
  --color-primary-300: #72b8b7;
  --bs-primary-300-rgb: 114, 184, 183;
  --color-primary-400: #3d9a9c;
  --bs-primary-400-rgb: 61, 154, 156;
  --color-primary-500: #0b6e74;
  --bs-primary-500-rgb: 11, 110, 116;
  --color-primary-600: #095c61;
  --bs-primary-600-rgb: 9, 92, 97;
  --color-primary-700: #14525c;
  --bs-primary-700-rgb: 20, 82, 92;
  --color-primary-800: #0e3b43;
  --bs-primary-800-rgb: 14, 59, 67;
  --color-primary-900: #102a2e;
  --bs-primary-900-rgb: 16, 42, 46;
  --color-primary-950: #0a1c1f;
  --bs-primary-950-rgb: 10, 28, 31;

  /* Section bands: the app canvas instead of the theme's pale blue. */
  --color-secondary: #f3f4f1;
  --bs-secondary-rgb: 243, 244, 241;
}

body.pp-legacy {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, Arial, sans-serif;
  color: #15171a;
  -webkit-font-smoothing: antialiased;
  /* Theme utility overflow-x-hidden !important forces overflow-y:auto and breaks sticky headers. */
  overflow-x: clip !important;
  /* Match fixed .pp-header so content is not covered. */
  padding-top: calc(var(--pp-header-h) + env(safe-area-inset-top, 0px));
}

/* Safari scroll smoothness: keep document scrolling native (no smooth on html). */
html {
  scroll-behavior: auto;
}
body.pp-legacy h1,
body.pp-legacy h2,
body.pp-legacy h3,
body.pp-legacy h4,
body.pp-legacy h5,
body.pp-legacy h6,
body.pp-legacy .h1,
body.pp-legacy .h2,
body.pp-legacy .h3,
body.pp-legacy .h4,
body.pp-legacy .h5,
body.pp-legacy .h6 {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, Arial, sans-serif;
  font-weight: 800;
  letter-spacing: -0.028em;
  color: #15171a;
}
body.pp-legacy h1,
body.pp-legacy .h1 {
  letter-spacing: -0.036em;
  line-height: 1.1;
}

/* Buttons: pill shape and brand colour, matching .pp-btn */
body.pp-legacy .btn {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
body.pp-legacy .btn-primary {
  background-color: #0b6e74;
  border-color: #0b6e74;
  color: #fff;
}
body.pp-legacy .btn-primary:hover,
body.pp-legacy .btn-primary:focus {
  background-color: #095c61;
  border-color: #095c61;
  color: #fff;
}
body.pp-legacy .btn-outline-primary {
  border-color: #0b6e74;
  color: #0b6e74;
}
body.pp-legacy .btn-outline-primary:hover {
  background-color: #0b6e74;
  color: #fff;
}
body.pp-legacy .text-primary,
body.pp-legacy .text-quaternary {
  color: #0b6e74 !important;
}
body.pp-legacy main a:not(.btn):not([class*="px-"]):hover {
  color: #095c61;
}
body.pp-legacy ::selection {
  background: #cfe7e6;
  color: #102a2e;
}
body.pp-legacy :focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 2px;
}

/* Larger radii to match the new cards */
body.pp-legacy .rounded-2 {
  border-radius: 20px !important;
}
body.pp-legacy .rounded-3,
body.pp-legacy .xl\:rounded-3 {
  border-radius: 28px !important;
}

/* The shared chrome inside a theme page: keep theme element styles out. */
.pp-legacy .pp-header ul,
.pp-legacy .pp-menu ul,
.pp-legacy .pp-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pp-legacy .pp-header a,
.pp-legacy .pp-menu a,
.pp-legacy .pp-footer a {
  text-decoration: none;
}
.pp-legacy .pp-header img,
.pp-legacy .pp-menu img,
.pp-legacy .pp-footer img {
  max-width: none;
}
.pp-legacy .pp-footer p,
.pp-legacy .pp-mega p {
  margin-top: 0;
}
.pp-legacy .pp-footer h2 {
  color: #fff4e0 !important;
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, Arial, sans-serif !important;
  font-size: 0.9375rem !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  letter-spacing: 0 !important;
  margin: 0 0 12px !important;
}
/* Keep PP chrome free of theme heading scale (!important on h1–h6). */
.pp-legacy .pp-header h1,
.pp-legacy .pp-header h2,
.pp-legacy .pp-header h3,
.pp-legacy .pp-menu h1,
.pp-legacy .pp-menu h2,
.pp-legacy .pp-menu h3,
.pp-legacy .pp-mega h2,
.pp-legacy .pp-mega h3 {
  font-size: inherit !important;
  line-height: inherit !important;
  letter-spacing: inherit !important;
}
.pp-legacy .pp-news label {
  margin: 0;
  font: inherit;
  color: inherit;
}
.pp-legacy .pp-news-form input[type="email"] {
  border: 0;
  box-shadow: none;
}
.pp-legacy .pp-news-form .pp-btn {
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: max-content !important;
  height: 44px !important;
  min-height: 44px !important;
  padding: 0 22px !important;
  white-space: nowrap !important;
}
@media (max-width: 559.98px) {
  .pp-legacy .pp-news-form .pp-btn {
    width: 100% !important;
    min-width: 0 !important;
  }
}
.pp-legacy .pp-burger,
.pp-legacy .pp-menu summary {
  font-family: inherit;
}

/* Blog date and author badges: readable contrast on the tinted pill. */
body.pp-legacy .px-blog-badge {
  background: #e3f2f1;
  color: #0e3b43;
}

/* ---------- Blog post: sticky side columns ---------- */
.px-blog-section {
  overflow: clip;
}
.px-blog-layout {
  display: grid;
  gap: 20px;
  align-items: start;
}
.px-blog-main {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.px-blog-main > .seo-card {
  width: 100%;
  margin: 0 !important;
}
.px-blog-rail {
  min-width: 0;
}
.px-blog-rail--toc {
  padding: 20px;
  border: 1px solid #e4e6e1;
  border-radius: 20px;
  background: #fff;
}
.px-blog-toc-label {
  margin: 0 0 10px;
  color: #5c6166;
  font-size: 0.8125rem;
  font-weight: 700;
}
.px-blog-toc ol {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: toc;
}
.px-blog-toc li {
  counter-increment: toc;
}
.px-blog-toc a {
  display: flex;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #4b5055;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}
.px-blog-toc a::before {
  content: counter(toc) ".";
  color: #0b6e74;
  font-weight: 800;
}
/* Hover is a plain grey wash; the section being read gets the teal tint and a bar.
   Same font weight in both, so lines never re-wrap. */
.px-blog-toc a:hover {
  background: #f3f4f1 !important;
  color: #15171a !important;
  opacity: 1 !important;
}
.px-blog-toc a.is-active,
.px-blog-toc a.is-active:hover {
  background: #e3f2f1 !important;
  color: #0e3b43 !important;
  box-shadow: inset 3px 0 0 #0b6e74;
  opacity: 1 !important;
}
@media (min-width: 1000px) {
  .px-blog-layout {
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
  }
  .px-blog-rail--toc {
    display: none;
  }
  .px-blog-rail--contact {
    position: sticky;
    top: 96px;
  }
}
@media (min-width: 1280px) {
  .px-blog-layout {
    grid-template-columns: 230px minmax(0, 1fr) 330px;
  }
  .px-blog-rail--toc {
    display: block;
    position: sticky;
    top: 96px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
  }
}
@media (max-width: 999.98px) {
  .px-blog-rail--toc {
    order: 0;
  }
  .px-blog-main {
    order: 1;
  }
  .px-blog-rail--contact {
    order: 2;
  }
}

/* ---------- Blog CTA band ---------- */
body.pp-legacy .seo-card-cta,
body.pp-legacy .seo-prose .seo-card-cta {
  position: relative;
  overflow: hidden;
  border: 0 !important;
  background: linear-gradient(160deg, #0e3b43, #102a2e 75%) !important;
  color: #fff4e0;
  isolation: isolate;
}
body.pp-legacy .seo-card-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(70% 100% at 90% 0%, rgba(232, 197, 71, 0.14), transparent 62%) !important;
  -webkit-mask-image: none;
  mask-image: none;
  opacity: 1 !important;
}
body.pp-legacy .seo-card-cta h2,
body.pp-legacy .seo-prose .seo-card-cta h2 {
  color: #fff4e0 !important;
}
body.pp-legacy .seo-card-cta p,
body.pp-legacy .seo-prose .seo-card-cta p {
  color: #cfe7e6 !important;
  max-width: 52ch;
}
body.pp-legacy .seo-card-cta .btn-primary {
  background: #f2b705 !important;
  border-color: #f2b705 !important;
  color: #2a1f00 !important;
}
body.pp-legacy .seo-card-cta .btn-primary:hover {
  background: #ffc61a !important;
}
body.pp-legacy .seo-card-cta a:not(.btn) {
  color: #fff4e0 !important;
}

/* Blog date and author badges: readable contrast on the tinted pill. */
body.pp-legacy .px-blog-badge {
  background: #e3f2f1;
  color: #0e3b43;
}

/* ---------- Blog contact rail: fits the window, no inner scrollbar ---------- */
@media (min-width: 1000px) {
  .px-blog-rail--contact {
    max-height: none !important;
    overflow: visible !important;
  }
  .px-blog-rail--contact .px-blog-contact {
    gap: 10px !important;
    padding: 22px 22px 20px !important;
  }
  .px-blog-rail--contact .px-blog-contact > h2 {
    font-size: 1.375rem !important;
    line-height: 1.2;
  }
  .px-blog-rail--contact .px-blog-contact-intro {
    margin: 0 !important;
    font-size: 0.875rem !important;
    line-height: 1.45;
  }
  .px-blog-rail--contact .px-blog-contact-form {
    gap: 8px !important;
  }
  .px-blog-rail--contact .px-blog-contact-form .row {
    --bs-gutter-y: 8px;
    row-gap: 8px;
    margin-top: 0;
  }
  .px-blog-rail--contact .px-blog-contact-form .row > * {
    margin-top: 0;
  }
  .px-blog-rail--contact .form-label {
    margin-bottom: 4px !important;
    font-size: 0.8125rem;
    font-weight: 600;
  }
  .px-blog-rail--contact .form-control {
    height: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.875rem;
  }
  .px-blog-rail--contact textarea.form-control {
    height: 76px;
    padding: 9px 12px;
    resize: none;
  }
  .px-blog-rail--contact .btn {
    min-height: 42px;
    width: 100%;
  }
  .px-blog-rail--contact .px-blog-contact-note {
    font-size: 0.75rem !important;
  }
}
@media (min-width: 1000px) and (max-height: 760px) {
  .px-blog-rail--contact .px-blog-contact-intro,
  .px-blog-rail--contact .px-blog-contact-note,
  .px-blog-rail--contact .form-group:has(#blogContactSubject) {
    display: none !important;
  }
}
@media (min-width: 1000px) and (max-height: 620px) {
  .px-blog-rail--contact {
    position: static !important;
  }
}

/* ---------- Blog cards: no lift, scale, or underline on hover ---------- */
.px-blog-hub-card,
.px-blog-latest-card,
.px-guide-link,
.pp-post {
  transition: background-color 0.18s ease, border-color 0.18s ease !important;
  text-decoration: none !important;
}
.px-blog-hub-card:hover,
.px-blog-hub-card:focus-visible,
.px-blog-latest-card:hover,
.px-blog-latest-card:focus-visible,
.px-guide-link:hover,
.px-guide-link:focus-visible,
.pp-post:hover,
.pp-post:focus-visible,
.px-blog-hub-card:hover *,
.px-blog-hub-card:focus-visible *,
.px-blog-latest-card:hover *,
.px-blog-latest-card:focus-visible *,
.px-guide-link:hover *,
.px-guide-link:focus-visible *,
.pp-post:hover *,
.pp-post:focus-visible * {
  text-decoration: none !important;
}
.px-blog-hub-card:hover,
.px-blog-hub-card:focus-visible,
.px-blog-latest-card:hover,
.px-guide-link:hover,
.pp-post:hover {
  transform: none !important;
  box-shadow: none !important;
  background-color: #f4faf9 !important;
  border-color: #0b6e74 !important;
}
.px-blog-hub-card:hover img,
.pp-post:hover img {
  transform: none !important;
}

/* ---------- Space between the last section and the footer ---------- */
body.pp-legacy #wrapper {
  padding-bottom: clamp(32px, 5vw, 64px);
}

/* ---------- Blog contact card: soft teal ---------- */
.px-blog-rail--contact .px-blog-contact,
.dark .px-blog-rail--contact .px-blog-contact {
  border: 1px solid #b9dcd9 !important;
  background: linear-gradient(165deg, #d4ebe8 0%, #e6f3f1 60%, #eef7f5 100%) !important;
  color: #2f4f52;
}
.px-blog-rail--contact .px-blog-contact > h2 {
  color: #0e3b43 !important;
}
.px-blog-rail--contact .px-blog-contact-intro,
.px-blog-rail--contact .px-blog-contact-note {
  color: #3d5c5f !important;
  opacity: 1 !important;
}
.px-blog-rail--contact .form-label {
  color: #0e3b43 !important;
}
.px-blog-rail--contact .form-control {
  border: 1px solid #c3e0dd !important;
  background: #fff !important;
  color: #15171a !important;
}
.px-blog-rail--contact .form-control:focus {
  border-color: #0b6e74 !important;
  box-shadow: 0 0 0 3px rgba(11, 110, 116, 0.18) !important;
}
.px-blog-rail--contact .btn-primary {
  background: #0b6e74 !important;
  border-color: #0b6e74 !important;
  color: #fff !important;
}
.px-blog-rail--contact .btn-primary:hover {
  background: #095c61 !important;
}

/* ---------- Blog photos ---------- */
.px-blog-hub-card.has-media,
.pp-post.has-media {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0 !important;
}
.px-blog-hub-card.has-media .px-blog-hub-media,
.pp-post.has-media .pp-post-media {
  order: -1;
  flex: none;
  align-self: stretch;
  width: auto !important;
  max-width: none;
}
.px-blog-hub-media,
.pp-post-media {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #e3f2f1;
}
.pp-post.has-media {
  --post-pad: 20px;
  padding: 0 var(--post-pad) var(--post-pad) !important;
}
@media (min-width: 480px) {
  .pp-post.has-media {
    --post-pad: 24px;
  }
}
.pp-post.has-media .pp-post-media {
  margin: 0 calc(-1 * var(--post-pad)) 12px !important;
}
.px-blog-hub-card--large .px-blog-hub-media {
  aspect-ratio: 2 / 1;
}
.px-blog-hub-img,
.pp-post-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.px-blog-hero-media {
  width: min(100%, 1100px);
  margin: 28px auto 0;
  aspect-ratio: 1200 / 520;
  overflow: hidden;
  border-radius: 24px;
  background: #e3f2f1;
}
.px-blog-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 719.98px) {
  .px-blog-hero-media {
    aspect-ratio: 16 / 10;
    border-radius: 18px;
  }
}

/* ---------- Blog list: even panel padding and a closing CTA band ---------- */
.px-blog-hub-panel {
  padding-block: clamp(20px, 3vw, 40px) !important;
}
.px-blog-hub-panel > .container {
  padding-inline: clamp(20px, 3vw, 40px);
}
.px-blog-hub-cta-band {
  position: relative;
  display: grid;
  gap: 20px 40px;
  align-items: center;
  margin-top: clamp(28px, 4vw, 48px);
  padding: clamp(28px, 4vw, 48px);
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(160deg, #0e3b43, #102a2e 75%);
  color: #cfe7e6;
  isolation: isolate;
}
.px-blog-hub-cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(70% 100% at 95% 0%, rgba(232, 197, 71, 0.16), transparent 62%);
}
@media (min-width: 900px) {
  .px-blog-hub-cta-band {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}
.px-blog-hub-cta-band h2 {
  margin: 0 0 8px;
  color: #fff4e0 !important;
  font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
  line-height: 1.15;
}
.px-blog-hub-cta-band p {
  margin: 0;
  max-width: 56ch;
  color: #cfe7e6;
}
.px-blog-hub-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.px-blog-hub-cta-link {
  color: #fff4e0 !important;
  font-weight: 700;
  text-decoration: none;
}
/* Photos always fill their frame, whatever its shape. */
.px-blog-hero-media,
.px-blog-hub-media,
.pp-post-media {
  position: relative;
}
.px-blog-hero-img,
.px-blog-hub-img,
.pp-post-media img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
}
/* Soft dark shade so bright stock photos sit better on the page. */
.px-blog-hero-media::after,
.px-blog-hub-media::after,
.pp-post-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(16, 42, 46, 0.08) 0%, rgba(16, 42, 46, 0.18) 55%, rgba(16, 42, 46, 0.28) 100%);
}
.px-blog-hero-media::after {
  border-radius: inherit;
  background:
    linear-gradient(180deg, rgba(16, 42, 46, 0.06) 0%, rgba(16, 42, 46, 0.14) 50%, rgba(16, 42, 46, 0.26) 100%);
}

/* ---------- Blog list: two featured cards of equal size, photos edge to edge ---------- */
@media (min-width: 768px) {
  .px-blog-hub-featured:not(.px-blog-hub-featured--solo) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  }
}
.px-blog-hub-card,
.px-blog-hub-card--small,
.px-blog-hub-card--large {
  --hub-pad: 1.25rem;
  padding: 0 var(--hub-pad) var(--hub-pad) !important;
}
.px-blog-hub-card:not(.has-media) {
  padding-top: var(--hub-pad) !important;
}
.px-blog-hub-card--large {
  background: #fff;
  border-color: rgba(15, 23, 42, 0.08);
}
.px-blog-hub-card .px-blog-hub-media,
.px-blog-hub-card--large .px-blog-hub-media {
  width: calc(100% + 2 * var(--hub-pad));
  max-width: none;
  margin: 0 calc(-1 * var(--hub-pad)) 0.6rem;
  aspect-ratio: 16 / 9;
  border-radius: 0;
}
.px-blog-hub-card--small .px-blog-hub-title,
.px-blog-hub-card--large .px-blog-hub-title,
.px-blog-hub-card--large h2.px-blog-hub-title {
  font-size: 1.25rem !important;
}
.px-blog-hub-card--large .px-blog-hub-desc,
.px-blog-hub-card--small .px-blog-hub-desc {
  font-size: 0.95rem;
  max-width: none;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}
.px-blog-hub-cta {
  margin-top: auto;
}

/* Italic text in articles keeps the body colour. */
body.pp-legacy .seo-prose em,
body.pp-legacy .seo-prose i {
  color: inherit;
}

/* Card photos bleed to both edges: stretch across the card, cancelling its side padding. */
.px-blog-hub-card .px-blog-hub-media,
.px-blog-hub-card--large .px-blog-hub-media {
  align-self: stretch;
  width: auto !important;
  margin-left: calc(-1 * var(--hub-pad)) !important;
  margin-right: calc(-1 * var(--hub-pad)) !important;
}
