/* ============================================
   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 (.carousel_purple_0f13) is a descendant of
   .aside-70af (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.dim_6743 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".focused-9714" 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.column_f751 so it can't cause
   horizontal overflow anyway. */
.section-4e8f,
.input_top_8dcb,
.feature_over_40c8,
.complex_bde2,
.thumbnail-lower-b96d,
.tertiary_under_373e,
.tertiary_c239,
.tiny-b3b8,
.pagination_2b87,
.static-4672,
.full_28f2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .aside-yellow-e31f {
    padding: 8px 0;
  }
  
  .icon_cold_62b6 img {
    height: 28px;
    width: auto;
  }
  
  .iron-7b00 {
    display: none !important;
  }
  
  .bottom-d264 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .bottom-d264 svg {
    width: 14px;
    height: 14px;
  }
  
  .grid_af73 {
    padding: 6px;
  }
  
  .narrow_8e9c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .feature_over_40c8,
  .input_top_8dcb,
  .complex_bde2,
  .thumbnail-lower-b96d,
  .title_ded1,
  .dropdown-0c0d,
  .under-2661,
  .slow-a67f,
  .secondary-upper-d333,
  .section_c1aa,
  .bright_eff6,
  .banner-2d4c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .dropdown-small-d432,
  .breadcrumb_c60c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .input-ec6f,
  .thumbnail-521b,
  .fast_f7ac,
  .current_6873,
  .hero_bronze_ad02,
  .frame_aa92,
  .texture_black_b10a {
    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 */
  .menu_cold_b191,
  .list-green-5b44,
  .active_da4e,
  .stale-5147,
  .right-0c8f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .simple_7ad5,
  .wrapper_91cc,
  .hero-46dc,
  .hero-out-8847 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .element-medium-67ce,
  .hero-f2c7 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .under-cefa,
  .under-a237,
  .nav_8517,
  .thick-a2e3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .overlay-9c78,
  .accent_df9d,
  .picture-063b,
  .accent_hot_eed0,
  .red_6a6f,
  .carousel-bc78 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .menu_cold_b191,
  .list-green-5b44,
  .stale-5147 {
    max-width: none !important;
  }
  
  .focused-9714 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .simple_7ad5 {
    font-size: 1.5rem !important;
  }
  
  .wrapper_91cc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hard-f617,
  .sort-4dde {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hero-46dc {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tooltip_basic_d910 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hard-c874 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .menu_cold_b191,
  .stale-5147 {
    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: 2c7e */
.phantom-card-o4 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
