/* ============================================
   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 (.search-02c6) is a descendant of
   .badge_db15 (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.dropdown-rough-1971 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tabs-565c" 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.icon_hovered_deee so it can't cause
   horizontal overflow anyway. */
.shade_d62e,
.heading_top_58fd,
.copper-fbf8,
.right_8483,
.silver-6fef,
.heading_7004,
.image-4fbd,
.tabs_static_d65c,
.slider_4bb6,
.rough_be86,
.easy-9db2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .slow-ca4a {
    padding: 8px 0;
  }
  
  .breadcrumb_14ab img {
    height: 28px;
    width: auto;
  }
  
  .hero_middle_76ff {
    display: none !important;
  }
  
  .tertiary_08f8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tertiary_08f8 svg {
    width: 14px;
    height: 14px;
  }
  
  .focus_hard_8086 {
    padding: 6px;
  }
  
  .solid_e2c5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .copper-fbf8,
  .heading_top_58fd,
  .right_8483,
  .silver-6fef,
  .dropdown_7546,
  .lite_bfbe,
  .overlay_94c7,
  .yellow-82ea,
  .mask-copper-a77d,
  .paragraph-gas-4578,
  .sidebar_a8b7,
  .secondary_liquid_1402 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .chip_paper_29ff,
  .advanced-6d23 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .alert_fluid_86fc,
  .prev_91dd,
  .icon-blue-55d9,
  .dropdown_197c,
  .article-78bd,
  .glass_582d,
  .banner-old-b573 {
    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 */
  .lower_08df,
  .alert-black-b567,
  .outer-8df8,
  .fixed_0e5c,
  .last_3958 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hero_red_185b,
  .active-20ea,
  .list-9283,
  .iron-a8ec {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .row_f860,
  .north_5892 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .aside_pink_9c1d,
  .liquid_7a99,
  .north-ac23,
  .pattern_silver_eb95 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .caption_756c,
  .next_82bc,
  .pattern_7491,
  .active_bbbf,
  .sort_large_403b,
  .inner_df6d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .lower_08df,
  .alert-black-b567,
  .fixed_0e5c {
    max-width: none !important;
  }
  
  .tabs-565c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hero_red_185b {
    font-size: 1.5rem !important;
  }
  
  .active-20ea {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .heading_cf4c,
  .list_iron_be4d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .list-9283 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .dropdown-8b56 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .disabled-2f25 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .lower_08df,
  .fixed_0e5c {
    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: e85a */
.ghost-box-e1 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.2;
}
