/* ============================================
   CRITICAL MOBILE FIXES
   Additional layer to ensure perfect mobile display
   ============================================ */

/* Prevent horizontal scroll at all costs */
html {
  width: 100%;
  scroll-behavior: smooth;
  /* NO position:relative - it breaks sticky! */
  /* NO overflow-x here either - mixed with body's overflow-x: hidden
     it makes <html> its own scroll container and breaks sticky too! */
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  /* NO position:relative - it breaks sticky! */
}

/* Ensure all major containers respect viewport */
/* NOTE: "nav" is intentionally excluded here. Giving a <nav> element
   overflow-x: hidden makes its overflow-y auto-compute to "auto" (per the
   CSS overflow spec), turning it into a clipping/scroll container. Since
   the header's dropdown submenu (.description-e972) is a descendant of
   .narrow-3651 (a <nav>), it was getting clipped and forced into a tiny
   internal scrollbar instead of opening naturally below the nav link. */
main,
section,
article,
footer {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header must NOT have max-width restriction for sticky to work */
header.logo_12bd {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".glass_705d" is intentionally excluded here for the same reason as
   "nav" above — the header's <div class="container"> wraps the nav and
   must not clip the dropdown submenu with an auto-computed overflow-y.
   It's already width-capped via max-width in style.primary-pressed-c647 so it can't cause
   horizontal overflow anyway. */
.picture-b2bb,
.thumbnail-b6f6,
.layout-wide-14a3,
.disabled_70cb,
.video_8327,
.widget_old_b76c,
.input_344d,
.block-steel-164e,
.header-c54a,
.link_dim_e66d,
.paragraph_glass_8bf6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .summary-a7d1 {
    padding: 8px 0;
  }
  
  .slow-42f6 img {
    height: 28px;
    width: auto;
  }
  
  .tertiary_d9d0 {
    display: none !important;
  }
  
  .caption-dff8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .caption-dff8 svg {
    width: 14px;
    height: 14px;
  }
  
  .rough-9f80 {
    padding: 6px;
  }
  
  .hero_862a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .layout-wide-14a3,
  .thumbnail-b6f6,
  .disabled_70cb,
  .video_8327,
  .silver_f3dd,
  .overlay-new-9061,
  .hover_silver_e2d5,
  .wrapper-complex-cd71,
  .slider_tiny_3a8e,
  .component_1656,
  .icon-lite-9407 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tertiary_fbe7,
  .hot_e103 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .table-ca2a,
  .module_middle_7aa4,
  .description-inner-f4ff,
  .left-57eb,
  .alert_5a39,
  .shade-ef00,
  .smooth-0910 {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }
  
  /* Ensure images are responsive */
  img,
  svg,
  picture {
    max-width: 100% !important;
    height: auto !important;
  }
  
  /* Better padding for mobile */
  .dynamic_c257,
  .next_1c2c,
  .footer-short-4d15,
  .panel-easy-f48d,
  .complex-dfcb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .thumbnail_0493,
  .hero_stone_2c67,
  .main_a24c,
  .backdrop-easy-f0a8 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .glass_1241,
  .dirty-db83 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .notice_b953,
  .breadcrumb-104b,
  .white_7f1c,
  .outline_tall_3923 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .detail-narrow-6dcc,
  .icon_east_6ef3,
  .photo-fa2f,
  .bright_94bd,
  .focused-75ea,
  .image-6a07 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dynamic_c257,
  .next_1c2c,
  .panel-easy-f48d {
    max-width: none !important;
  }
  
  .glass_705d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .thumbnail_0493 {
    font-size: 1.5rem !important;
  }
  
  .hero_stone_2c67 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .accordion-1fe5,
  .nav_over_2cd3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .main_a24c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .mask-8b50 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .motion-37a4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dynamic_c257,
  .panel-easy-f48d {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
  }
}

/* iPhone X and notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
}

/* css-noise: c6b7 */
.promo-block-j1 {
  padding: 0.1rem;
  font-size: 11px;
  line-height: 1.0;
}
