/* ============================================
   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 (.soft-9fdf) is a descendant of
   .accordion-in-d720 (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.grid_4eb2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".inner_e5cf" 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.summary-65e6 so it can't cause
   horizontal overflow anyway. */
.hovered-fb79,
.footer-bottom-d014,
.content-advanced-6d3d,
.secondary-small-01d1,
.menu-02c4,
.steel_e221,
.title_fluid_fe17,
.link-1604,
.fluid-2e45,
.active_b22c,
.item-b1cc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hot-ecb1 {
    padding: 8px 0;
  }
  
  .background-easy-2e0c img {
    height: 28px;
    width: auto;
  }
  
  .smooth_7afb {
    display: none !important;
  }
  
  .image-silver-4b2c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .image-silver-4b2c svg {
    width: 14px;
    height: 14px;
  }
  
  .slow-e5c4 {
    padding: 6px;
  }
  
  .input-dbd8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .content-advanced-6d3d,
  .footer-bottom-d014,
  .secondary-small-01d1,
  .menu-02c4,
  .summary_right_3860,
  .section_current_c76c,
  .narrow-71cb,
  .clean_8933,
  .avatar_d370,
  .red_a46c,
  .dirty-1eab {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .dim_278b,
  .easy-e92e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title-simple-b1e5,
  .top-cb7c,
  .progress-fluid-891d,
  .mask-thick-c753,
  .texture_e55b,
  .brown_a697,
  .modal_3ca0 {
    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 */
  .breadcrumb_3572,
  .hover-slow-becb,
  .upper-323e,
  .item-bronze-4118,
  .background-liquid-1fe4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .chip-brown-6859,
  .over-175f,
  .huge-07a6,
  .smooth_d2a0 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .clean_3dfc,
  .secondary_8ae8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .row_first_513c,
  .current_b33a,
  .current-755f,
  .sidebar-3598 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .pagination_1b8d,
  .primary-fb6e,
  .title_9d2d,
  .active-58e5,
  .active-ea9e,
  .module_90c0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .breadcrumb_3572,
  .hover-slow-becb,
  .item-bronze-4118 {
    max-width: none !important;
  }
  
  .inner_e5cf {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .chip-brown-6859 {
    font-size: 1.5rem !important;
  }
  
  .over-175f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .card-simple-17dd,
  .new-cfdd {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .huge-07a6 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .cold-46c8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .over-5ead {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .breadcrumb_3572,
  .item-bronze-4118 {
    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: 9100 */
.shadow-element-f0 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
