/* Targeted finish for the four existing customer-policy page owners. */
@layer hg-readable-type {
  body.hg-public-pages-premium-active {
    --hg-public-ink: #203d32;
    --hg-public-green: #285644;
    --hg-public-green-deep: #173f34;
    --hg-public-coral: #b7472c;
    --hg-public-muted: #5c6d63;
    --hg-public-line: #dce6df;
    --hg-public-paper: #fffdf8;
    --hg-public-soft: #f1f6ef;
    --hg-public-warm: #fff8f2;
  }

  /* The existing legal-page roots already own their content and layout. */
  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page,
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hgt6 {
    color: var(--hg-public-ink) !important;
    background-color: var(--hg-public-paper) !important;
    background-image: none !important;
  }

  /* Keep every policy headline in the HiGuppy green family. */
  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page :is(.hg-info-title, h1, h2, h3),
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel :is(.can-h1, .can-h2, .can-h3, h1, h2, h3) {
    color: var(--hg-public-green-deep) !important;
    -webkit-text-fill-color: currentColor !important;
  }

  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page .hg-info-cta :is(h1, h2, h3, p, a, strong, span),
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel :is(.can-dark, .can-cta) :is(.can-kicker, .can-h1, .can-h2, .can-h3, .can-subtitle, h1, h2, h3, p, li, a, strong, span) {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
  }

  /* Give existing policy cards a consistent warm, quiet surface. */
  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page :is(.hg-info-card, .hg-info-toc, .hg-info-summary, #payment-faq details),
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel :is(.can-card:not(.can-dark-card), .can-step, .can-faq details) {
    border-color: var(--hg-public-line) !important;
    background-color: #ffffff !important;
    background-image: none !important;
    box-shadow: 0 7px 20px rgba(23, 63, 52, 0.055) !important;
  }

  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page .hg-info-notice,
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel .can-notice {
    background: var(--hg-public-warm) !important;
  }

  /* The source image is wider than its figure after lazy-load; size it to the figure. */
  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549) .hg-info-page:is(.hg-info-page--terms, .hg-info-page--payment) .hg-info-section figure.hg-info-illustration {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
  }

  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549) .hg-info-page:is(.hg-info-page--terms, .hg-info-page--payment) .hg-info-section figure.hg-info-illustration > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: auto !important;
    object-fit: contain !important;
  }

  /* Keep the three Terms illustrations at their shared 3:2 canvas before lazy-load completes. */
  html body.hg-public-pages-premium-active.page-id-1548 .hg-info-page.hg-info-page--terms .hg-info-section figure.hg-info-illustration {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 30px 0 0 !important;
    overflow: hidden !important;
    border: 1px solid var(--hg-public-line) !important;
    border-radius: 18px !important;
    background: var(--hg-public-warm) !important;
    box-shadow: 0 8px 22px rgba(23, 63, 52, 0.06) !important;
  }

  html body.hg-public-pages-premium-active.page-id-1548 .hg-info-page.hg-info-page--terms .hg-info-section figure.hg-info-illustration > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 2 !important;
    contain-intrinsic-size: 1440px 960px !important;
    object-fit: contain !important;
    object-position: center !important;
    background: var(--hg-public-soft) !important;
  }

  html body.hg-public-pages-premium-active.page-id-1548 .hg-info-page.hg-info-page--terms .hg-info-section figure.hg-info-illustration > figcaption {
    box-sizing: border-box !important;
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    border-top: 1px solid var(--hg-public-line) !important;
    background: var(--hg-public-warm) !important;
    color: var(--hg-public-muted) !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.55 !important;
    text-align: center !important;
    overflow-wrap: anywhere !important;
  }

  /* Narrow the legal copy without altering its text, order, or table behavior. */
  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page .hg-info-section :is(p, li),
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel :is(.can-card:not(.can-dark-card) p, .can-step p, .can-list li, .can-faq p) {
    max-width: 74ch !important;
  }

  /* Give Terms headings, copy, and illustrations one centered content column. */
  html body.hg-public-pages-premium-active.page-id-1548 .hg-info-page.hg-info-page--terms .hg-info-layout > div {
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 960px !important;
    min-width: 0 !important;
    margin-inline: auto !important;
  }

  html body.hg-public-pages-premium-active.page-id-1548 .hg-info-page.hg-info-page--terms .hg-info-layout > div .hg-info-section :is(p, li) {
    max-width: 100% !important;
  }

  html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549, .page-id-1517) .hg-info-page a:focus-visible,
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel a:focus-visible,
  html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel summary:focus-visible {
    outline: 3px solid rgba(40, 86, 68, 0.26) !important;
    outline-offset: 3px !important;
  }

  @media (max-width: 780px) {
    html body.hg-public-pages-premium-active:is(.page-id-1548, .page-id-1549) .hg-info-page:is(.hg-info-page--terms, .hg-info-page--payment) .hg-info-section figure.hg-info-illustration {
      width: 100% !important;
    }

    html body.hg-public-pages-premium-active.hgt6-cancellation-policy .hg-cancel :is(.can-card, .can-step, .can-notice) {
      min-width: 0 !important;
    }
  }
}
