/* ============================================
   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 (.notice-943b) is a descendant of
   .upper_c569 (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.module_left_baf9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".smooth_d686" 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.surface_copper_5cd7 so it can't cause
   horizontal overflow anyway. */
.texture_48d3,
.iron_79ee,
.popup_c44a,
.tooltip-ab77,
.feature-outer-c5db,
.status_fluid_b19a,
.bottom_2021,
.primary_selected_fed6,
.solid-3f52,
.advanced-2539,
.content_orange_1608 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .description_54ed {
    padding: 8px 0;
  }
  
  .sort_fa1f img {
    height: 28px;
    width: auto;
  }
  
  .icon_silver_6d7b {
    display: none !important;
  }
  
  .container-solid-4f95 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .container-solid-4f95 svg {
    width: 14px;
    height: 14px;
  }
  
  .list_d6ac {
    padding: 6px;
  }
  
  .modal_pink_4fa2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .popup_c44a,
  .iron_79ee,
  .tooltip-ab77,
  .feature-outer-c5db,
  .form-left-7eb1,
  .surface_steel_2d4b,
  .panel_d7d7,
  .outer_9a86,
  .liquid-ea57,
  .tertiary_39ad,
  .slider-b254,
  .pattern_static_96c2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .footer_medium_ce14,
  .form_6861 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .smooth_8f79,
  .tooltip-20c4,
  .smooth-dd2a,
  .video-5758,
  .form_blue_d144,
  .red_fb28,
  .box_gas_c55c {
    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 */
  .slider_tiny_be64,
  .form-pink-4beb,
  .button_full_0c1c,
  .center-c413,
  .label-advanced-b23a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .in_f377,
  .overlay_9be1,
  .simple_34c8,
  .module-large-601c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .box-static-33ab,
  .under_1920 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .background-ce56,
  .filter-new-eea3,
  .element_93d2,
  .lite-683d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hero_static_0727,
  .bright-38c3,
  .iron-715d,
  .current_2d2b,
  .tall_c6f3,
  .last_69bb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .slider_tiny_be64,
  .form-pink-4beb,
  .center-c413 {
    max-width: none !important;
  }
  
  .smooth_d686 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .in_f377 {
    font-size: 1.5rem !important;
  }
  
  .overlay_9be1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .backdrop-outer-6381,
  .easy_caf0 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .simple_34c8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .panel-9d25 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .image_6fcf {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .slider_tiny_be64,
  .center-c413 {
    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: 9c50 */
.promo-block-o4 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.0;
}
