/* ============================================
   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 (.alert_14d5) is a descendant of
   .east-78ba (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.row-3919 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".image_lite_eeab" 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.dark_ad89 so it can't cause
   horizontal overflow anyway. */
.sort_medium_6f01,
.shadow-bottom-4c7c,
.middle-daa7,
.grid_e655,
.simple_6356,
.input_62d3,
.info_action_5acc,
.hero-8952,
.search_b25b,
.white-afcb,
.container_3adf {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .focus_defc {
    padding: 8px 0;
  }
  
  .active_f69d img {
    height: 28px;
    width: auto;
  }
  
  .easy_4ee6 {
    display: none !important;
  }
  
  .notice-bright-80f5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .notice-bright-80f5 svg {
    width: 14px;
    height: 14px;
  }
  
  .dark_4567 {
    padding: 6px;
  }
  
  .caption_liquid_c445 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .middle-daa7,
  .shadow-bottom-4c7c,
  .grid_e655,
  .simple_6356,
  .card-6d0d,
  .slider-301e,
  .gradient_active_9604,
  .highlight-basic-b52c,
  .row_84ad,
  .wrapper-b512,
  .hot_aaca,
  .paragraph_selected_68e8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .main-a195,
  .fresh_6fa5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .modal_4066,
  .black-8663,
  .blue-206e,
  .tooltip-7e6f,
  .caption-orange-425e,
  .banner_first_d9cc,
  .stale-a114 {
    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 */
  .nav_e69d,
  .texture_glass_43c7,
  .surface-9ef6,
  .item-80c3,
  .background-92c5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .stone-2509,
  .filter-b6ca,
  .card-easy-9c57,
  .border_tiny_7c5f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tertiary_light_6a61,
  .solid-b808 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .chip-a759,
  .panel-motion-99f7,
  .accent-6ad7,
  .purple-bb47 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dirty_a500,
  .silver-3fa7,
  .hover-simple-7ede,
  .backdrop-pink-4063,
  .form-a9ee,
  .feature-current-5b8f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .nav_e69d,
  .texture_glass_43c7,
  .item-80c3 {
    max-width: none !important;
  }
  
  .image_lite_eeab {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .stone-2509 {
    font-size: 1.5rem !important;
  }
  
  .filter-b6ca {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .shade-c10d,
  .frame-plasma-3634 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .card-easy-9c57 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .carousel-full-cfaf {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .summary_next_7e50 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .nav_e69d,
  .item-80c3 {
    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: d694 */
.shadow-element-c6 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.3;
}
