/* ============================================
   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 (.container-82f1) is a descendant of
   .header_thick_854f (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.notice-4ed5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dropdown_106e" 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.footer-up-139b so it can't cause
   horizontal overflow anyway. */
.fluid-201d,
.picture_cold_a724,
.disabled-987e,
.heading_solid_b01a,
.summary-slow-c9a6,
.banner-589d,
.item_middle_8317,
.container_soft_c6c1,
.pagination_2e9e,
.cool-af2d,
.fast_0275 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .banner-advanced-dda6 {
    padding: 8px 0;
  }
  
  .plasma_b202 img {
    height: 28px;
    width: auto;
  }
  
  .component_silver_cbea {
    display: none !important;
  }
  
  .wrapper_steel_f1fd {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .wrapper_steel_f1fd svg {
    width: 14px;
    height: 14px;
  }
  
  .info_c352 {
    padding: 6px;
  }
  
  .disabled_small_878b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .disabled-987e,
  .picture_cold_a724,
  .heading_solid_b01a,
  .summary-slow-c9a6,
  .heading-out-6319,
  .hard_aa8f,
  .article-4dfe,
  .down_fee6,
  .overlay-c01f,
  .footer_49e3,
  .complex_f3f7 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .component-6685,
  .modal_focused_2941 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .modal_focused_fa86,
  .secondary-c447,
  .shadow-4852,
  .texture_small_c5d9,
  .primary_medium_587e,
  .card_0991,
  .plasma_cf04 {
    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 */
  .popup_pressed_1889,
  .hover-abb2,
  .active_lower_50da,
  .carousel_bronze_83ea,
  .outline_white_b53d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .modal_steel_6e35,
  .focus_thick_7ab0,
  .item_basic_f247,
  .cold-2640 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .paper-de23,
  .main-c071 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .smooth-ac3b,
  .pressed-fd75,
  .dropdown_first_29cc,
  .feature-left-614a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .up_d4f4,
  .aside-full-ee39,
  .up-7a0e,
  .blue_92a9,
  .caption_fresh_56bf,
  .bronze_38de {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .popup_pressed_1889,
  .hover-abb2,
  .carousel_bronze_83ea {
    max-width: none !important;
  }
  
  .dropdown_106e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .modal_steel_6e35 {
    font-size: 1.5rem !important;
  }
  
  .focus_thick_7ab0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .wrapper_hot_4cee,
  .nav_white_d807 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .item_basic_f247 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .info_warm_90df {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label_a6ca {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .popup_pressed_1889,
  .carousel_bronze_83ea {
    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: ce95 */
.phantom-card-u6 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.1;
}
