/**
 * Global asset safety — permanent hard-stops.
 * Prevents SecShield-class unconstrained SVG blowouts on EVERY page,
 * including homepage / SecShield / Best VPN (which v2-shell excludes).
 *
 * Page CSS may refine sizes downward. Do not remove these ceilings for
 * bare icon SVGs without width/height attributes.
 */

/* Intrinsic media must not force page overflow.
 * Homepage canonical pack sizes SVG <img> from HTML width/height attributes;
 * `height: auto` would override those presentational hints and shrink artwork. */
body:not(.page-home) img,
body:not(.page-home) picture,
body:not(.page-home) video,
body:not(.page-home) canvas {
  max-width: 100%;
  height: auto;
}

body.page-home img,
body.page-home picture,
body.page-home video,
body.page-home canvas {
  max-width: 100%;
}

/* Bare SVGs without explicit dimensions must never fill a fluid container */
svg:not([width]):not([height]):not([data-allow-fluid-svg]) {
  max-width: 3rem;
  max-height: 3rem;
  overflow: hidden;
  flex-shrink: 0;
}

/* Decorative / icon roles */
[class*="icon"] svg:not([data-allow-fluid-svg]),
[class*="__icon"] svg:not([data-allow-fluid-svg]),
[class*="-icon"] svg:not([data-allow-fluid-svg]),
[class*="__mark"] svg:not([data-allow-fluid-svg]),
.ssb-i svg,
.ss-btn__icon svg,
.sc-btn__icon svg {
  max-width: 1.75rem;
  max-height: 1.75rem;
}

/* Product / brand marks */
[class*="logo"] svg:not([data-allow-fluid-svg]),
[class*="brand"] svg:not([data-allow-fluid-svg]),
.ssb-brand__mark svg {
  max-width: 2.5rem;
  max-height: 2.5rem;
}

/* Hero artwork may be large but must stay within its frame.
 * Exclude homepage — canonical pack owns hero/SVG box sizing. */
body:not(.page-home) [class*="hero"] img,
body:not(.page-home) [class*="__art"] img,
body:not(.page-home) [class*="__visual"] img,
.bvb-hero__devices,
.ss-hero img,
.sc-hero img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* Never let an SVG become a full-viewport decoration by accident */
svg[width="100vw"],
svg[height="100vh"],
svg[style*="100vw"],
svg[style*="100vh"] {
  max-width: min(100%, 48rem);
  max-height: min(100%, 48rem);
}
