/* Rexsun visual balance: one shared palette, quiet texture, existing geometry.
   Logo/media colors and status/error colors are intentionally independent. */
:root {
  --rx-brand-red: #d61820;
  --rx-brand-red-dark: #c3161e;
  --rx-balance-navy: #183149;
  --rx-balance-navy-hover: #254561;
  --rx-balance-dot: rgba(116, 132, 157, .075);
}

body.rexsun-enhanced,
body.rexsun-enhanced .rxco-page,
body.rexsun-enhanced .rxp-category-page,
body.rexsun-enhanced .rxp-catalog-page,
body.rexsun-enhanced #content.rxm {
  --rxp-red: var(--rx-brand-red);
  --rxp-red-dark: var(--rx-brand-red-dark);
  --rxh-red: var(--rx-brand-red);
  --rxh-red-dark: var(--rx-brand-red-dark);
  --rxh-red-ink: var(--rx-brand-red);
  --rxsv-red: var(--rx-brand-red);
  --rxsv-red-dark: var(--rx-brand-red-dark);
  --rxco-red: var(--rx-brand-red);
  --rxco-red-dark: var(--rx-brand-red-dark);
  --rxb-red: var(--rx-brand-red);
  --rxb-red-dark: var(--rx-brand-red-dark);
  --rxcat-red: var(--rx-brand-red);
  --rxcy-red: var(--rx-brand-red);
  --rxac-red: var(--rx-brand-red);
  --rxac-red-dark: var(--rx-brand-red-dark);
  --rxc-red: var(--rx-brand-red);
  --rxv2-red: var(--rx-brand-red);
  --rxv2-red-dark: var(--rx-brand-red-dark);
  --rxm-accent: var(--rx-brand-red);
  --rxm-accent-hover: var(--rx-brand-red-dark);
  --rxm-accent-soft: #f5edef;
}
body.rxp-brand-unified .rxp-brand-page.rxp-catalog-page.rxp-brand-ui-0250 {
  --rxui-action: var(--rx-brand-red);
}
body:is(.rxp-commerce-unified,.rxp-brand-unified) .rxp-certificate-section { --rxc-red: var(--rx-brand-red); }
body.rxp-catalog-unified #rex-light-viewer { --rxcat-red: var(--rx-brand-red); }
body.rxp-catalog-unified .rx-internal-journey .rx-journey-link:first-child {
  background: var(--rx-brand-red) !important;
  border-color: var(--rx-brand-red) !important;
}

/* Keep the original pattern sizes; reduce contrast without fading content. */
body.rexsun-enhanced,
body.rxp-home-unified,
body.rxp-commerce-unified .rxco-page,
body.rxp-projects-unified #content.rxm {
  background-image: radial-gradient(circle, var(--rx-balance-dot) .8px, transparent .9px);
}
body.rxp-services-unified {
  background-image: radial-gradient(circle at 1px 1px, rgba(15,37,68,.035) 1px, transparent 1.35px), linear-gradient(180deg,#f9fafc,#eef2f7);
}
html body.rexsun-enhanced .rxp-section:nth-of-type(odd) {
  background: radial-gradient(circle at 1px 1px, rgba(20,35,59,.035) 1px, transparent 1.35px) 0 0 / 24px 24px, var(--rxp-surface) !important;
}
body:is(.rxp-rfq-unified,.rxp-survey-unified,.rxp-after-sales-unified,.rxp-link-hub-unified) {
  background-image: radial-gradient(circle at 1px 1px, rgba(15,23,42,.03) 1px, transparent 1.25px);
}
body.rxp-about-unified .rxa-page,
body.rxp-contact-unified .rxc-page {
  background-image: radial-gradient(circle at 1px 1px, rgba(16,37,65,.025) 1px, transparent 1.2px);
}
body.rxp-home-unified .rxh-engineering,
body.rxp-home-unified .rxh-capability {
  background-image: radial-gradient(circle, rgba(255,255,255,.025) .75px, transparent .85px);
}
body.rxp-services-unified .rxsv-hero::before { opacity: .05; }
body.rexsun-enhanced .rxp-cylinder-section:nth-of-type(even) {
  background: radial-gradient(circle at 1px 1px, rgba(15,37,68,.025) 1px, transparent 1.2px) 0 0 / 24px 24px, var(--rxcy-surface) !important;
}
body.rxp-link-hub-unified #rex-hub-ultimate .fixed-bg-layer {
  background: radial-gradient(circle at 1px 1px, rgba(15,23,42,.025) 1px, transparent 1.25px) 0 0 / 24px 24px, linear-gradient(155deg,#f7f9fc,#f6f8fb 58%,#f2f5f9) !important;
}

/* Large reading surfaces use the existing industrial navy; red marks actions. */
body.rexsun-enhanced .rxp-brand-final-cta .rxp-brand-container,
body.rxp-brand-unified .rxp-category-selection__grid > aside,
body.rxp-services-unified .rxsv-contact-strip__inner,
body.rxp-about-unified .rxa-cta__panel {
  background: linear-gradient(120deg, #1b364f, #10283f);
  box-shadow: 0 16px 36px rgba(15,35,55,.12);
}
body.rxp-home-unified .rxh-intro h1 span,
body.rxp-home-unified .rxh-section-head h2 span,
body.rxp-home-unified .rxh-about h2 span {
  color: var(--rxh-ink);
}
body.rxp-home-unified .rxh-kicker:not(.rxh-kicker--dark),
body.rxp-home-unified .rxh-icon {
  color: #526780;
}
body.rxp-home-unified .rxh-icon--red {
  color: var(--rx-balance-navy);
  background: #eaf0f6;
  box-shadow: none;
}
body.rxp-home-unified .rxh-kicker--dark { color: #d5dfeb; }
body.rxp-home-unified :is(.rxh-engineering,.rxh-capability) h2 span { color: #fff; }
body.rxp-services-unified .rxsv-hero h1 span { color: #fff; }
body.rxp-rfq-unified .rxp-rfq-intro .rxp-eyebrow { color: #d5dfeb; }
body.rxp-commerce-unified .rxco-hero h1 span { color: var(--rxco-navy); }
body.rxp-projects-unified #content.rxm .rxm-hero h1 span { color: var(--rxm-text); }
body.rxp-home-unified .rxh-service-card::before { background: #526d86; }
body.rxp-home-unified .rxh-service-card:hover .rxh-icon,
body.rxp-home-unified .rxh-service-card:focus-within .rxh-icon {
  color: #fff;
  background: var(--rx-balance-navy);
  box-shadow: 0 7px 18px rgba(15,35,55,.1);
}

/* Remove colored glow; retain the primary-action hierarchy and visible focus. */
body.rexsun-enhanced :is(.rxh-button--primary,.rxco-button,.rxsv-button,.rxp-button,.rxp-brand-button) {
  box-shadow: 0 5px 14px rgba(15,35,55,.08);
}
body.rexsun-enhanced .rxp-button:not(.rxp-button-secondary):not(.rxp-button--secondary):not(.rxp-button-ghost):not(.rxp-button--ghost),
body.rxp-home-unified .rxh-hero__story-link,
body.rxp-link-hub-unified #rex-hub-ultimate .catalog-link,
body.rxp-brand-unified .rxp-brand-master-doc a:last-child {
  background: var(--rx-brand-red) !important;
  border-color: var(--rx-brand-red);
  box-shadow: 0 5px 14px rgba(15,35,55,.08) !important;
}
body.rxp-home-unified .rxh-hero__story-link:hover,
body.rxp-link-hub-unified #rex-hub-ultimate .catalog-link:hover,
body.rxp-brand-unified .rxp-brand-master-doc a:last-child:hover {
  background: var(--rx-brand-red-dark) !important;
}
body.rexsun-enhanced #rp-scroll-top {
  background: rgba(24,49,73,.92) !important;
  border-color: rgba(255,255,255,.45) !important;
  box-shadow: 0 5px 18px rgba(15,35,55,.16) !important;
}
body.rexsun-enhanced #rp-scroll-top:hover { background: #254561 !important; }
body.rexsun-enhanced #rp-modern-footer .rp-brand-en { color: #e8a0a7 !important; }

/* Secondary brand navigation and resource labels no longer compete with CTAs. */
body.rxp-brand-unified .rxp-brand-ui-0250 .rxp-brand-hero .rxp-brand-eyebrow,
body.rxp-brand-unified .rxp-brand-ui-0250 .rxp-brand-hero__shop,
body.rxp-brand-unified .rxp-brand-ui-0250 .rxp-catalog-directory__card .rxp-catalog-directory__action,
body.rxp-brand-unified .rxp-brand-ui-0250 .rxp-catalog-resources__grid a > span {
  color: #526780 !important;
}
body.rxp-brand-unified .rxp-brand-ui-0250 .rxp-resource-type {
  color: #526780;
  background: #edf2f7;
}
body.rexsun-enhanced .rxp-brand-final-cta .rxp-brand-button--light { color: #183149 !important; }
body.rxp-brand-unified .rxp-brand-ui-0250 .rxp-brand-jump a:hover {
  color: #183149 !important;
  border-bottom-color: #183149;
}
body.rexsun-enhanced :is(.rxh-button,.rxco-button,.rxsv-button,.rxp-button):focus-visible {
  outline: 3px solid #536d86 !important;
  outline-offset: 4px !important;
}
