@layer overrides {
  /* ==========================================================================
     Modernization & Performance
     Browser enhancements and performance optimizations
     ========================================================================== */

  /* Stable Scrollbar Gutter
     Prevents page jumps when content height changes
     ------------------------------------------------------------------------- */
  html {
    scrollbar-gutter: stable;
  }

  /* Text Wrap Balance
     Prevents orphan words in headings
     Browser support: Safari 17.4, Chrome 114, Firefox 121+
     ------------------------------------------------------------------------- */
  .dash-hero__title,
  .services-hero__title,
  .recovery-hero__title,
  .overview-hero__title,
  .dns-hero__title,
  .page-header h1,
  .dash-hero h1,
  .card-title,
  .services-card__title,
  .overview-card__title,
  .help-nav-card .card-title,
  h1, h2, h3 {
    text-wrap: balance;
  }

  /* Text Wrap Pretty
     Prevents single-word last lines in paragraphs
     ------------------------------------------------------------------------- */
  .dash-hero__subtitle,
  .services-hero__subtitle,
  .recovery-hero__subtitle,
  .dash-section p,
  .card-body p {
    text-wrap: pretty;
  }

  /* Touch Device Hover Fix
     Suppress transform-based lift effects on touch devices
     Prevents sticky-hover bug where tapped cards stay lifted
     ------------------------------------------------------------------------- */
  @media (hover: none) {
    .dash-infra-item:hover,
    .dash-link-card .gauge-card:hover,
    .dash-link-card:hover .gauge-card,
    .help-nav-card:hover,
    .landing-portal-card:hover,
    .license-stat-card:hover,
    .log-analyzer__stat-card:hover,
    .overview-card:hover .overview-card__inner,
    .overview-card:hover .overview-card__arrow,
    .overview-link-card:hover .overview-link-card__inner,
    .overview-link-card:hover .overview-link-card__arrow,
    .plan-card:hover,
    .settings-dash-card:hover,
    .settings-dash-card:hover .settings-dash-card-arrow,
    .stat-card:hover,
    .services-card:hover .services-card__inner,
    .services-card:hover .services-card__arrow,
    .services-link-card:hover .services-link-card__arrow {
      transform: none;
    }
  }

  /* View Transition API
     Smooth cross-fade for Turbo Drive navigations
     Browser support: Chrome 126, Safari 18+
     ------------------------------------------------------------------------- */
  @view-transition {
    navigation: auto;
  }

  /* Content Visibility Optimization
     Defer rendering of off-screen rows in long tables
     Maintains accurate scrollbar height
     ------------------------------------------------------------------------- */
  .log-analyzer__table tbody tr,
  .audit-event,
  .app-table tbody tr,
  table.table tbody tr {
    content-visibility: auto;
    contain-intrinsic-size: auto 48px;
  }

  /* Layout Containment
     Restricts reflow scope for card-shaped components
     Prevents ancestor reflow on content updates
     ------------------------------------------------------------------------- */
  .dash-section,
  .dash-infra-card {
    contain: layout;
  }
}
