/* ============================================
   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 (.thumbnail-9c0f) is a descendant of
   .image_61ee (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.pro-d99a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".banner_east_0203" 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.active_solid_724f so it can't cause
   horizontal overflow anyway. */
.status_c292,
.dirty_0592,
.accent-full-fef9,
.input-a18d,
.frame-outer-e660,
.disabled_c6da,
.dim-87d7,
.active-outer-3031,
.tag-2775,
.basic_80e0,
.input_7f5e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .smooth_44e9 {
    padding: 8px 0;
  }
  
  .item_b6aa img {
    height: 28px;
    width: auto;
  }
  
  .notice_e9e2 {
    display: none !important;
  }
  
  .icon-dark-9015 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .icon-dark-9015 svg {
    width: 14px;
    height: 14px;
  }
  
  .over_9b5e {
    padding: 6px;
  }
  
  .easy-34e5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .accent-full-fef9,
  .dirty_0592,
  .input-a18d,
  .frame-outer-e660,
  .gallery-tiny-4dfe,
  .dark-7a23,
  .button-077d,
  .frame_3b94,
  .tag_dc3a,
  .module-center-2b51,
  .last-e106,
  .stale-f8a5 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .next-6ff6,
  .stone-517a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status-a25c,
  .footer_silver_3ea3,
  .content_44fa,
  .selected-3868,
  .article_out_b385,
  .purple_4299,
  .hero_1d2f {
    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 */
  .paragraph_blue_5886,
  .old_7b00,
  .detail-fresh-e564,
  .plasma-1983,
  .status_5270 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .grid_gas_a608,
  .tall_02e2,
  .secondary_left_c052,
  .solid-c185 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tabs_d230,
  .video-f9ac {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dirty_e776,
  .frame-c905,
  .blue_6b8a,
  .highlight-10df {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .chip_fd1c,
  .tertiary_fast_4830,
  .top_9bf4,
  .sidebar-a752,
  .image_94cb,
  .stone_c018 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .paragraph_blue_5886,
  .old_7b00,
  .plasma-1983 {
    max-width: none !important;
  }
  
  .banner_east_0203 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .grid_gas_a608 {
    font-size: 1.5rem !important;
  }
  
  .tall_02e2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .tabs-25f2,
  .column-56ca {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .secondary_left_c052 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .article-abfb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .motion_d22d {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .paragraph_blue_5886,
  .plasma-1983 {
    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: d0a3 */
.ghost-box-o2 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
