/* ============================================
   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 (.inner-6122) is a descendant of
   .hero_c73f (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.feature_5d5b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".soft-814f" 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.stale-88fa so it can't cause
   horizontal overflow anyway. */
.accent_slow_4e51,
.table-narrow-9290,
.glass_5405,
.down_b9f9,
.input-52e4,
.badge_ba30,
.button-95ce,
.tag_east_6554,
.status_bottom_be3a,
.inner_3f45,
.hot-0452 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fast_f96d {
    padding: 8px 0;
  }
  
  .article-6365 img {
    height: 28px;
    width: auto;
  }
  
  .dropdown-beee {
    display: none !important;
  }
  
  .iron-4402 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .iron-4402 svg {
    width: 14px;
    height: 14px;
  }
  
  .disabled_easy_eadb {
    padding: 6px;
  }
  
  .column-hard-a9bf {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .glass_5405,
  .table-narrow-9290,
  .down_b9f9,
  .input-52e4,
  .link_efe4,
  .status_1bc9,
  .description-9936,
  .liquid_8940,
  .easy-546a,
  .title-8552,
  .dirty-6828,
  .center-30db {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .texture-bca6,
  .focus-26cb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .selected-5163,
  .lite-ee1c,
  .menu-d4bb,
  .form_3ff9,
  .hard_1086,
  .red-e85f,
  .middle-dc5d {
    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 */
  .silver-c5c7,
  .hard_c52b,
  .easy-25b6,
  .cool_4e96,
  .surface-40a1 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .column_gas_3d1e,
  .feature_advanced_64bb,
  .active_506f,
  .heading_fresh_89d0 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .breadcrumb_0ece,
  .hover-bbd6 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .article_b07e,
  .picture_selected_ae33,
  .backdrop-a507,
  .shade_in_3675 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .breadcrumb_b450,
  .warm_7a0e,
  .aside_5263,
  .pattern_0b4f,
  .slow-a6d6,
  .pattern_02be {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .silver-c5c7,
  .hard_c52b,
  .cool_4e96 {
    max-width: none !important;
  }
  
  .soft-814f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .column_gas_3d1e {
    font-size: 1.5rem !important;
  }
  
  .feature_advanced_64bb {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .layout_south_d8be,
  .orange-cc52 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .active_506f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .over-6e3c {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .content-8655 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .silver-c5c7,
  .cool_4e96 {
    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: ea5c */
.promo-block-d6 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.3;
}
