/* ============================================
   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 (.focus_feb0) is a descendant of
   .box-inner-fe1d (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.border-bottom-a0a2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".notification-1ca5" 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.background-yellow-89cb so it can't cause
   horizontal overflow anyway. */
.wood_e412,
.grid_0e7e,
.banner_f247,
.yellow_60c7,
.feature-7777,
.notice_024e,
.detail_76da,
.table-cold-5c88,
.search-dda3,
.preview-5c67,
.silver-8b05 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .module-200a {
    padding: 8px 0;
  }
  
  .paragraph_4fdc img {
    height: 28px;
    width: auto;
  }
  
  .fast-bc46 {
    display: none !important;
  }
  
  .old_c925 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .old_c925 svg {
    width: 14px;
    height: 14px;
  }
  
  .fresh_364e {
    padding: 6px;
  }
  
  .copper-25b2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .banner_f247,
  .grid_0e7e,
  .yellow_60c7,
  .feature-7777,
  .new-031c,
  .orange-40c3,
  .aside_west_c29d,
  .easy-8cc2,
  .text-47fc,
  .outer_9816,
  .component-gas-0686,
  .photo-simple-03c0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .paragraph_809b,
  .shade_fefb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .accent-inner-59d3,
  .north-860c,
  .highlight_c465,
  .form-medium-2b44,
  .east_ecec,
  .accordion-a737,
  .element_8b70 {
    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-bright-5793,
  .focused_2659,
  .progress-full-914c,
  .disabled_west_27cb,
  .action_7e43 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .under_cde5,
  .picture-db5e,
  .dim_6ff7,
  .photo_narrow_7357 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .huge-a140,
  .paragraph-3804 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .wrapper_8812,
  .search_bottom_139c,
  .sidebar_copper_a93e,
  .hidden_basic_fe97 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fluid-3ec6,
  .medium_c3fd,
  .stale_2305,
  .dropdown_6e00,
  .lite-c399,
  .active-a417 {
    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-bright-5793,
  .focused_2659,
  .disabled_west_27cb {
    max-width: none !important;
  }
  
  .notification-1ca5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .under_cde5 {
    font-size: 1.5rem !important;
  }
  
  .picture-db5e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .mini_1dc4,
  .header-fixed-91e8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dim_6ff7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .layout-medium-a708 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .active_6b0f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .slider-bright-5793,
  .disabled_west_27cb {
    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: 224e */
.shadow-element-p6 {
  padding: 0.4rem;
  font-size: 10px;
  line-height: 1.0;
}
