/* ============================================
   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 (.main_rough_3a35) is a descendant of
   .thick_8d2e (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.mask-smooth-758f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame-narrow-a42d" 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.container_ef07 so it can't cause
   horizontal overflow anyway. */
.focus-right-2c12,
.table_tiny_6e95,
.easy_7216,
.label_advanced_36c7,
.dropdown_af07,
.lite_ec4b,
.disabled-bcdb,
.feature_active_dca8,
.chip-short-44e3,
.heading-1b45,
.full_17af {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .main_3c1c {
    padding: 8px 0;
  }
  
  .secondary_bright_b1b4 img {
    height: 28px;
    width: auto;
  }
  
  .hover_complex_c178 {
    display: none !important;
  }
  
  .article_31c2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .article_31c2 svg {
    width: 14px;
    height: 14px;
  }
  
  .secondary-orange-6866 {
    padding: 6px;
  }
  
  .right_0631 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .easy_7216,
  .table_tiny_6e95,
  .label_advanced_36c7,
  .dropdown_af07,
  .modal-hard-eac1,
  .notification_silver_756d,
  .modal_selected_d7dd,
  .container-ae16,
  .fixed-987b,
  .filter-red-51bb,
  .advanced-62f5 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .center_aa8f,
  .overlay-slow-c587 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .narrow_5ba2,
  .list-8d00,
  .menu_current_9d3a,
  .icon-solid-ae93,
  .last_059d,
  .dim-8515,
  .over_f658 {
    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 */
  .grid_south_8248,
  .menu_thick_6677,
  .status_dd17,
  .gallery_d1bd,
  .wrapper_1d49 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tooltip_easy_19c2,
  .banner-8420,
  .slider_old_b56a,
  .huge-bb16 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .slow-c2e1,
  .background_silver_c654 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tall-d887,
  .paragraph-40c7,
  .prev_09ae,
  .sidebar-a34b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .secondary-wood-6e6c,
  .description-5949,
  .form_e29b,
  .form_old_3378,
  .soft_466f,
  .section-ffa0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .grid_south_8248,
  .menu_thick_6677,
  .gallery_d1bd {
    max-width: none !important;
  }
  
  .frame-narrow-a42d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tooltip_easy_19c2 {
    font-size: 1.5rem !important;
  }
  
  .banner-8420 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .backdrop-4f44,
  .north_ea7a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .slider_old_b56a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .grid_focused_26f1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .description_dd37 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .grid_south_8248,
  .gallery_d1bd {
    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: 33dc */
.shadow-element-e9 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.0;
}
