/* CP304: one calm, shared visual language for every inner page.
   The homepage hero and its approved logo/artwork are deliberately untouched. */
body.pg-visual-system:not(.pg-page-home) {
  --pg-bg: #020811;
  --pg-bg-2: #050b14;
  --pg-surface: #07111f;
  --pg-surface-2: #0a1627;
  --pg-text: #f3f7ff;
  --pg-muted: #aebed3;
  --pg-line: rgba(126, 157, 199, .2);
  --pg-blue: #109cff;
  --pg-red: #ff163c;
  --pg-subpage-border: rgba(82, 147, 219, .3);
  --pg-subpage-radius: 16px;
  color: var(--pg-text);
  background: #020811;
  --pg-font: Inter, Montserrat, Arial, Helvetica, sans-serif;
  --pg-display: Montserrat, Inter, Arial, Helvetica, sans-serif;
  font-family: var(--pg-font);
}

/* Use the homepage's near-black foundation with restrained blue/red light.
   The fixed lightning layer was making inner pages visually louder than home. */
.page.subpage-shell {
  background-color: #020811 !important;
  background-image:
    radial-gradient(ellipse at 8% 18%, rgba(16, 156, 255, .09), transparent 30%),
    radial-gradient(ellipse at 92% 20%, rgba(255, 22, 60, .08), transparent 30%),
    #020811 !important;
}
.page.subpage-shell::before,
.page.subpage-shell::after {
  display: none !important;
  content: none !important;
}
.subpage-shell main {
  position: relative;
  z-index: 1;
  color: var(--pg-text);
}

/* Header geometry and accent line follow the homepage chrome. */
.subpage-shell > header {
  background: rgba(2, 6, 13, .88) !important;
  border-bottom: 1px solid var(--pg-line) !important;
  backdrop-filter: none;
}
.subpage-shell > header::after {
  height: 1px;
  background: linear-gradient(90deg, #109cff, rgba(16, 156, 255, .08) 48%, rgba(255, 22, 60, .08) 54%, #ff163c) !important;
}
.subpage-shell .nav {
  max-width: 1440px;
  min-height: 82px;
  padding-inline: clamp(20px, 4vw, 64px);
}
.subpage-shell .logo img { width: min(210px, 20vw); }
.subpage-shell .links > a:not(.cta),
.subpage-shell .langbtn { color: #dce8f8; }
.subpage-shell .links > a:not(.cta):hover,
.subpage-shell .langbtn:hover { color: #fff; }

/* Shared page width and section rhythm, including content-heavy support pages. */
.subpage-shell main > section {
  box-sizing: border-box;
  padding-block: clamp(48px, 6vw, 84px) !important;
  scroll-margin-top: 104px;
}
.subpage-shell main > section:first-child {
  padding-top: clamp(40px, 5vw, 70px) !important;
}
.subpage-shell main > section > .container,
.subpage-shell main > .container,
.subpage-shell .container {
  width: 100%;
  max-width: 1440px;
  box-sizing: border-box;
  padding-inline: clamp(20px, 4vw, 64px);
  margin-inline: auto;
}
.subpage-shell main > section + section { margin-top: 0; }

/* Headings, body copy, and links use the same clear hierarchy as the homepage. */
.subpage-shell main h1 {
  max-width: 23ch;
  color: #f3f7ff;
  font-family: var(--pg-display);
  font-size: clamp(3rem, 4.2vw, 4.75rem) !important;
  font-weight: 780;
  line-height: .98 !important;
  letter-spacing: -.045em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.subpage-shell main h2 {
  color: #edf4ff;
  font-family: var(--pg-display);
  font-size: clamp(1.85rem, 3vw, 3rem);
  font-weight: 740;
  line-height: 1.12;
  letter-spacing: -.03em;
  text-wrap: balance;
}
.subpage-shell main h3,
.subpage-shell main h4 { color: #e8f1ff; line-height: 1.25; }
.subpage-shell main p,
.subpage-shell main li {
  color: #b5c4d8;
  line-height: 1.65;
}
.subpage-shell main a:not(.cta):not(.ghost) {
  text-underline-offset: .2em;
  text-decoration-thickness: .08em;
}
.subpage-shell main :is(.eyebrow, .pg-partner-section > .eyebrow) {
  color: #68b5ff;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .13em;
  text-transform: uppercase;
}

/* One family of legible, deep-blue surfaces for cards and content panels. */
.subpage-shell main :is(
  .card, .product-card, .finder-panel, .contact-box, .registry-tools,
  .registry-no-results, .registry-card, .legal-section, .pg-partner-card,
  .pg-industry-solution-card, .pg-command-card, .pg-share-card,
  .pg-fit-preview, .pg-catalogue-card, .pg-registry-model-card,
  .pg-authority-card, .pg-centered-card, .pg-private-card,
  .pg-partner-form, .pg-partner-cap-grid article, .pg-spin360,
  .pg-video-tests article
) {
  border: 1px solid var(--pg-subpage-border) !important;
  border-radius: var(--pg-subpage-radius) !important;
  background: rgba(3, 9, 18, .18) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 22, 60, .025), 0 18px 48px rgba(0, 0, 0, .18) !important;
}
.subpage-shell main :is(.finder-panel, .contact-box, .pg-partner-form, .pg-command-card, .pg-cookie-modal-card) {
  background: rgba(3, 9, 18, .76) !important;
}
.subpage-shell main :is(.card, .product-card, .pg-catalogue-card, .pg-registry-model-card, .pg-partner-card, .pg-industry-solution-card) {
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.subpage-shell main :is(.card, .product-card, .pg-catalogue-card, .pg-registry-model-card, .pg-partner-card, .pg-industry-solution-card):hover,
.subpage-shell main :is(.card, .product-card, .pg-catalogue-card, .pg-registry-model-card, .pg-partner-card, .pg-industry-solution-card):focus-within {
  border-color: rgba(79, 169, 255, .65) !important;
  box-shadow: 0 22px 56px rgba(0, 0, 0, .32), 0 0 22px rgba(16, 156, 255, .09) !important;
  transform: translateY(-2px);
}
.subpage-shell main :is(.pg-partner-section, .pg-product-editorial, .pg-industry-solutions) {
  border-color: rgba(126, 157, 199, .14);
}

/* Keep product photos crisp, centered, and consistently framed. */
.subpage-shell main :is(.pg-catalogue-card-image, .pg-product-hero-media, .pg-product-media figure, .pg-media30-item, .registry-card figure) {
  border-color: rgba(126, 157, 199, .2);
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 42%, rgba(16, 156, 255, .11), transparent 64%), #030912;
}
.subpage-shell main :is(.pg-catalogue-card-image img, .pg-product-hero-media img, .pg-media30-item img, .registry-card img) {
  object-fit: contain;
}

/* Align action rows and let long labels wrap instead of colliding. */
.subpage-shell main :is(.cta, .ghost, .pg-quote-add, .pg-photo-fallback, .pgd-btn, .pgd-cms-quote, .pg-home-quote) {
  box-sizing: border-box;
  min-height: 48px;
  height: auto !important;
  max-height: none !important;
  padding: 11px 18px !important;
  border-radius: 10px;
  line-height: 1.25 !important;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}
.subpage-shell main .pg-filter-open {
  box-sizing: border-box;
  min-height: 48px;
  height: auto !important;
  max-height: none !important;
  padding: 11px 18px !important;
  border-radius: 10px;
  line-height: 1.25 !important;
  white-space: normal;
}
.subpage-shell main :is(.cta, .pg-quote-add, .pg-photo-fallback, .pgd-btn, .pgd-cms-quote, .pg-home-quote) {
  justify-content: center;
  align-items: center;
  gap: 9px;
}
.subpage-shell main :is(.hero-actions, .hero-actions-primary, .pg-card-actions, .pg-contact-social, .pg-share-actions) {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.subpage-shell main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]), select, textarea) {
  border-color: rgba(126, 157, 199, .32);
  border-radius: 10px;
  background-color: #050d18;
  color: #f3f7ff;
}
.subpage-shell main :is(input, select, textarea):focus-visible {
  outline: 2px solid #109cff;
  outline-offset: 2px;
}

/* Keep the scrollable brand/model rails as two clear adjacent steps. */
.subpage-shell .pg-category-items .pg-catalogue-filter-rails {
  gap: clamp(12px, 1.8vw, 24px);
}
.subpage-shell .pg-category-items :is(.pg-brand-tab, .pg-model-tab) {
  border: 1px solid rgba(126, 157, 199, .25);
  background: rgba(7, 17, 31, .92);
}
.subpage-shell .pg-category-items :is(.pg-brand-tab[aria-pressed="true"], .pg-model-tab[aria-pressed="true"], .is-active) {
  border-color: rgba(16, 156, 255, .78);
  background: rgba(16, 156, 255, .16);
  color: #f4f8ff;
}

@media (max-width: 900px) {
  .subpage-shell .nav { min-height: 70px; padding-inline: 20px; }
  .subpage-shell .logo img { width: min(184px, 44vw); }
  .subpage-shell main > section,
  .subpage-shell main > section:first-child { padding-block: 42px !important; }
  .subpage-shell main > section > .container,
  .subpage-shell main > .container,
  .subpage-shell .container { padding-inline: 20px; }
  .subpage-shell main h1 { font-size: clamp(2.35rem, 8.2vw, 3.4rem) !important; }
  .subpage-shell main h2 { font-size: clamp(1.65rem, 6vw, 2.4rem); }
  .subpage-shell main :is(.pg-partner-hero, .pg-partner-section, .pg-authority-page, .pg-industry-solutions) {
    margin-block: 0;
  }
  .subpage-shell main :is(.pg-partner-hero, .pg-partner-form-wrap, .pg-partner-capabilities, .pg-positioning-inner, .pg-sourcing-inner) {
    gap: 24px;
  }
  .subpage-shell main :is(.pg-partner-grid, .pg-industry-solutions-grid, .pg-authority-grid) {
    gap: 12px;
  }
}

@media (max-width: 560px) {
  .subpage-shell main > section,
  .subpage-shell main > section:first-child { padding-block: 34px !important; }
  .subpage-shell main > section > .container,
  .subpage-shell main > .container,
  .subpage-shell .container { padding-inline: 18px; }
  .subpage-shell main h1 { font-size: clamp(2.25rem, 10.2vw, 3.2rem) !important; }
  .subpage-shell main h2 { font-size: clamp(1.55rem, 7vw, 2rem); }
  .subpage-shell main :is(.pg-partner-grid, .pg-industry-solutions-grid, .pg-authority-grid, .pg-partner-cap-grid, .pg-product-editorial-grid) {
    grid-template-columns: minmax(0, 1fr);
  }
  .subpage-shell main :is(.hero-actions, .hero-actions-primary, .pg-card-actions, .pg-contact-social, .pg-share-actions) > * {
    min-width: min(100%, 145px);
  }
  .subpage-shell main :is(.cta, .ghost, .pg-quote-add, .pg-filter-open, .pg-photo-fallback, .pgd-btn, .pgd-cms-quote, .pg-home-quote) { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  .subpage-shell main :is(.card, .product-card, .pg-catalogue-card, .pg-registry-model-card, .pg-partner-card, .pg-industry-solution-card) {
    transition: none !important;
  }
  .subpage-shell main :is(.card, .product-card, .pg-catalogue-card, .pg-registry-model-card, .pg-partner-card, .pg-industry-solution-card):hover {
    transform: none;
  }
}
