/* CP334: a shared full-bleed canvas and consistent content surfaces. */
:root {
  --pg-fx-canvas: #020811;
  --pg-fx-surface-top: rgba(16, 28, 44, .92);
  --pg-fx-surface-bottom: rgba(10, 17, 25, .96);
  --pg-fx-line: rgba(195, 210, 227, .14);
  --pg-fx-line-strong: rgba(195, 210, 227, .22);
  --pg-fx-accent-red: #ff163c;
}

html,
body.pg-visual-system {
  min-width: 320px !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: clip !important;
}

html body.pg-visual-system.pg-page-home :is(.pgd-hero, .pgm-copy) {
  background-color: #020811 !important;
  background-image:
    radial-gradient(ellipse at 14% 38%, rgba(16, 156, 255, .11), transparent 42%),
    radial-gradient(ellipse at 86% 58%, rgba(255, 22, 60, .09), transparent 40%),
    linear-gradient(180deg, #020811 0%, #071522 100%) !important;
  background-size: auto !important;
  background-repeat: no-repeat !important;
}

body.pg-visual-system {
  background-color: var(--pg-fx-canvas) !important;
  background-image:
    radial-gradient(ellipse at 8% 18%, rgba(16, 156, 255, .075), transparent 34%),
    radial-gradient(ellipse at 92% 72%, rgba(255, 22, 60, .065), transparent 32%),
    linear-gradient(180deg, #020811 0%, #030914 52%, #020811 100%) !important;
  background-repeat: no-repeat !important;
}

@media (max-width: 900px) {
  html body.pg-visual-system .page .pg-site-header .header-inner > a.logo {
    display: flex !important;
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 90px !important;
    max-width: none !important;
    margin-right: 8px !important;
    overflow: visible !important;
  }

  html body.pg-visual-system .page .pg-site-header .header-inner > a.logo img {
    display: block !important;
    flex: 0 1 auto !important;
    width: 100% !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 30px !important;
    object-fit: contain !important;
    object-position: left center !important;
    overflow: visible !important;
  }
}

@media (max-width: 380px) {
  html body.pg-visual-system .page .pg-site-header .header-inner > a.logo {
    min-width: 74px !important;
  }

  html body.pg-visual-system .page .pg-site-header .header-inner > a.logo img {
    max-width: 160px !important;
    max-height: 30px !important;
  }
}

@media (max-width: 340px) {
  html body.pg-visual-system .page .pg-site-header .header-inner > a.logo {
    min-width: 64px !important;
  }

  html body.pg-visual-system .page .pg-site-header .header-inner > a.logo img {
    max-width: 140px !important;
    max-height: 30px !important;
  }
}

body.pg-visual-system > .page,
body.pg-visual-system .page.home-shell,
body.pg-visual-system .page.subpage-shell,
body.pg-visual-system main#main {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin-inline: 0 !important;
  background: transparent !important;
  background-image: none !important;
}

body.pg-visual-system main#main > section,
body.pg-visual-system main#main > nav,
body.pg-visual-system main#main > .page-hero,
body.pg-visual-system main#main > .models-container {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.pg-visual-system main#main > section:not(.pgd-hero-section):not(.pg-fx-why-posguard),
body.pg-visual-system main#main > .page-hero,
body.pg-visual-system main#main > .subpage-visual-scene,
body.pg-visual-system main#main > .legal-page,
body.pg-visual-system main#main > .product-page {
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.pg-visual-system main#main .container,
body.pg-visual-system main#main > .models-container,
body.pg-visual-system main#main > .page-hero > .container {
  width: min(92%, 1360px) !important;
  max-width: 1360px !important;
  min-width: 0 !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}

body.pg-visual-system main#main > section:not(.pgd-hero-section):not(.pg-fx-why-posguard) {
  border-block-color: transparent !important;
}

/* Remove the technical grid that read as a stack of boxed backgrounds. */
body.pg-visual-system .pg-blueprint-section,
body.pg-visual-system .pg-blueprint-section::before,
body.pg-visual-system .pg-blueprint-section::after {
  background-color: transparent !important;
  background-image: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* One repeatable surface for actual cards; outer sections stay on the canvas. */
body.pg-visual-system :is(
  .pg-home-compare-card,
  .pg-bento-card,
  .pgd-text-category,
  .pg-sector-card,
  .sector-pill-card,
  .pg-industry-card,
  .pg-public-category-card,
  .pg-public-contact-card,
  .pg-public-value-card,
  .pg-public-link-card,
  .pg-public-callout,
  .pg-partner-hero,
  .pg-partner-signal,
  .pg-faq-group,
  .pg-faq-tools,
  .pg-guide-card,
  .pg-model-accessory-card,
  .pg-member-form-card,
  .pg-member-account-bar,
  .pg-member-price-disclaimer,
  .pg-swivel-demo,
  .pg-stress-card,
  .pg-catalogue-card,
  .pg-registry-model-card,
  .detail-card,
  .pg-review-card,
  .pg-interactive-card
):not(.pg-fx-why-posguard *) {
  background-color: #0A1119 !important;
  background-image: linear-gradient(180deg, var(--pg-fx-surface-top), var(--pg-fx-surface-bottom)) !important;
  border-color: var(--pg-fx-line) !important;
  border-radius: 16px !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 10px 28px rgba(0, 0, 0, .16) !important;
}

body.pg-visual-system :is(.pg-home-compare-card--exposed, .pg-home-compare-card--protected) {
  border-left: 2px solid var(--pg-fx-accent-red) !important;
}

body.pg-page-home .pg-home-stat-grid {
  width: min(92%, 1360px) !important;
  max-width: 1360px !important;
  margin: 14px auto 0 !important;
  padding-block: 8px !important;
  gap: 0 !important;
  border-block: 1px solid var(--pg-fx-line) !important;
}

body.pg-page-home .pg-home-stat-card {
  position: relative !important;
  min-width: 0 !important;
  min-height: 82px !important;
  padding: 12px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.pg-page-home .pg-home-stat-card + .pg-home-stat-card::before {
  content: "";
  position: absolute;
  inset-block: 16px;
  left: 0;
  width: 1px;
  background: var(--pg-fx-line);
  pointer-events: none;
}

body.pg-page-home .pg-home-stat-card strong {
  color: #ff163c !important;
  text-shadow: 0 0 18px rgba(255, 22, 60, .18) !important;
}

/* Keep the Hero full-bleed while its text follows the same readable content rail. */
body.pg-page-home main#main > .pgd-hero-section {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

@media (min-width: 1024px) {
  body.pg-page-home .pgd-hero-section > .pg-home-hero-inner {
    width: min(92%, 1360px) !important;
    max-width: 1360px !important;
    margin-inline: auto !important;
  }

  html body.pg-visual-system.pg-page-home .pgd-hero-section .pgd-hero-visual {
    width: calc(100% + (100vw - min(92vw, 1360px)) / 2) !important;
    max-width: none !important;
    justify-self: stretch !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 1023px) {
  html body.pg-visual-system.pg-page-home .pgd-hero-section > .pg-home-hero-inner {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding-inline: 0 !important;
  }

  body.pg-page-home .pgd-hero-section .pgd-hero-copy {
    width: 100% !important;
    max-width: 640px !important;
    margin-inline: auto !important;
    padding-inline: clamp(20px, 6vw, 32px) !important;
    box-sizing: border-box !important;
  }

  body.pg-page-home .pgd-hero-section .pgd-hero-visual {
    width: 100% !important;
    max-width: none !important;
    margin-inline: 0 !important;
    border-radius: 0 !important;
  }
}

@media (max-width: 768px) {
  html body.pg-visual-system .page > main#main .container:not(.pg-home-nav) {
    width: 100% !important;
    max-width: none !important;
    padding-inline: 16px !important;
  }

  html body.pg-visual-system .page > main#main > :is(.pg-public-page, .page-hero, .legal-page) {
    padding-inline: 0 !important;
  }

  html body.pg-visual-system .page > main#main > .models-container {
    width: 100% !important;
    max-width: none !important;
    padding-inline: 16px !important;
  }

  body.pg-page-home .pgd-hero-section .pgd-hero-copy {
    padding: 24px 20px 20px !important;
  }

  body.pg-page-home .pgd-hero-section .pgd-hero-visual {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 !important;
    aspect-ratio: 3 / 2 !important;
  }

  body.pg-page-home .pg-home-stat-grid { width: calc(100% - 32px) !important; }
  body.pg-page-home .pg-home-stat-card { min-height: 72px !important; padding: 10px 6px !important; }
  body.pg-page-home .pg-home-stat-card strong { font-size: clamp(20px, 6vw, 26px) !important; }
  body.pg-page-home .pg-home-stat-card span { font-size: 11px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.pg-visual-system *,
  body.pg-visual-system *::before,
  body.pg-visual-system *::after {
    scroll-behavior: auto !important;
  }
}
