/* ============================================
   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 (.modal-fd18) is a descendant of
   .badge_easy_4245 (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.sort_bf5c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".over-2cb7" 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.rough-9934 so it can't cause
   horizontal overflow anyway. */
.box-3ae3,
.backdrop_static_4b6c,
.row-ac85,
.gold-a9ad,
.info_183c,
.active_4883,
.surface-bottom-0bd5,
.dim-e491,
.box_2f7e,
.icon_simple_ebab,
.current-e48e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .aside_8925 {
    padding: 8px 0;
  }
  
  .accent_prev_97fe img {
    height: 28px;
    width: auto;
  }
  
  .border_e32c {
    display: none !important;
  }
  
  .tall_f71e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tall_f71e svg {
    width: 14px;
    height: 14px;
  }
  
  .surface_cool_87fb {
    padding: 6px;
  }
  
  .silver_b113 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .row-ac85,
  .backdrop_static_4b6c,
  .gold-a9ad,
  .info_183c,
  .north_4447,
  .small_c2aa,
  .surface-current-07bb,
  .narrow_d138,
  .red_fbca,
  .outline_4e0d,
  .prev-e7b9,
  .tertiary_purple_1411 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .media-tiny-ea18,
  .photo-5d56 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status-08a1,
  .short_0941,
  .motion_6f78,
  .fresh-523f,
  .widget_5f88,
  .orange-7541,
  .copper_3210 {
    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 */
  .warm_a194,
  .down-2a9d,
  .caption-fast-dc97,
  .mask-ea0a,
  .focus-097e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .warm-5406,
  .orange-65e4,
  .dark-4952,
  .aside_c392 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .article-7586,
  .top-4415 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .input-black-76c3,
  .pro_f07d,
  .dark-4489,
  .gallery-3973 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .detail-mini-7b25,
  .component-c788,
  .info-a377,
  .search-860d,
  .hot_b3ef,
  .element_static_758e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .warm_a194,
  .down-2a9d,
  .mask-ea0a {
    max-width: none !important;
  }
  
  .over-2cb7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .warm-5406 {
    font-size: 1.5rem !important;
  }
  
  .orange-65e4 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .paragraph-next-8a79,
  .avatar_silver_ebf1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dark-4952 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .lite_c67b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .breadcrumb-9281 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .warm_a194,
  .mask-ea0a {
    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: 66aa */
.phantom-card-q1 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.2;
}
