/* ============================================
   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 (.footer-9bd3) is a descendant of
   .purple-294c (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.image_dbfa {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dropdown-4a03" 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.list_60ed so it can't cause
   horizontal overflow anyway. */
.progress-3390,
.lite_0deb,
.top-7db4,
.pink_b66b,
.search_9837,
.tooltip_31f8,
.action-9bc6,
.overlay_6c40,
.tabs-c975,
.mask_inner_4b88,
.dropdown-left-e9a8 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .gradient_mini_a94b {
    padding: 8px 0;
  }
  
  .gradient-cool-48bb img {
    height: 28px;
    width: auto;
  }
  
  .slow-0c11 {
    display: none !important;
  }
  
  .notice-pro-98f2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .notice-pro-98f2 svg {
    width: 14px;
    height: 14px;
  }
  
  .badge-fd9c {
    padding: 6px;
  }
  
  .dirty-7e9b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .top-7db4,
  .lite_0deb,
  .pink_b66b,
  .search_9837,
  .image-hard-e447,
  .row-down-7b2c,
  .clean_a5d8,
  .progress-aec1,
  .highlight_f545,
  .west-8515,
  .surface-out-80b8,
  .north-6d1c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .input_4bcc,
  .wrapper-b85b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .advanced_f5c7,
  .panel-0c4f,
  .breadcrumb_f9b1,
  .tooltip_3f41,
  .tabs-df7c,
  .filter_lite_81cd,
  .border_e345 {
    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 */
  .bottom_b924,
  .dirty_fa69,
  .gradient_db5e,
  .slider_10da,
  .backdrop_c457 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .shadow-2b0c,
  .module_hard_f97e,
  .pattern_center_1ad4,
  .footer_7521 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .dropdown_3e87,
  .south_6fc8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .static-1a58,
  .tag-8f7c,
  .yellow_1b60,
  .avatar-2bf2 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .message-mini-f17c,
  .hero_lower_dfc0,
  .dynamic_b6f4,
  .chip_mini_858a,
  .overlay-fresh-ec6c,
  .right_4a7c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .bottom_b924,
  .dirty_fa69,
  .slider_10da {
    max-width: none !important;
  }
  
  .dropdown-4a03 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .shadow-2b0c {
    font-size: 1.5rem !important;
  }
  
  .module_hard_f97e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .stale_df46,
  .border-ea58 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .pattern_center_1ad4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .main_focused_5d04 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .menu-6700 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bottom_b924,
  .slider_10da {
    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: 52ea */
.promo-block-g0 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.2;
}
