/* ============================================
   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 (.large-4017) is a descendant of
   .current_cdfd (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.outline_74d0 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".steel_c994" 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-6632 so it can't cause
   horizontal overflow anyway. */
.copper-c6f5,
.article-rough-d792,
.mask_cbc5,
.first-7192,
.breadcrumb_under_2c3c,
.purple-d763,
.progress_ac90,
.clean-6494,
.surface_0691,
.element_dynamic_cdad,
.active_4bc8 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .gold-890f {
    padding: 8px 0;
  }
  
  .description-copper-077b img {
    height: 28px;
    width: auto;
  }
  
  .item-rough-3bfc {
    display: none !important;
  }
  
  .soft_e3ad {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .soft_e3ad svg {
    width: 14px;
    height: 14px;
  }
  
  .modal_south_3a13 {
    padding: 6px;
  }
  
  .picture-ff77 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .mask_cbc5,
  .article-rough-d792,
  .first-7192,
  .breadcrumb_under_2c3c,
  .iron_d549,
  .icon_next_57b2,
  .detail-0c58,
  .focused_95cf,
  .highlight-dd84,
  .bronze_3f4d,
  .layout_9e25,
  .item-ecd0 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .alert-motion-d3dc,
  .progress_large_4beb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .badge-basic-84dd,
  .table_ed4f,
  .paragraph-right-1f90,
  .block_f628,
  .gallery-fluid-07d4,
  .media_warm_074b,
  .notification_black_ec6e {
    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 */
  .feature_82d4,
  .menu-bffd,
  .shadow_3276,
  .breadcrumb-action-8fa5,
  .lite-3c91 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .surface_09b6,
  .south_258f,
  .action-ae4a,
  .hovered_0ba7 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .primary-7fe5,
  .paragraph_7c19 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .stale_e7ac,
  .hover-2c66,
  .dynamic_ad8a,
  .yellow_48e1 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .surface_306c,
  .current_ea6f,
  .popup-2f88,
  .progress-bronze-8e60,
  .dim_6aa6,
  .info-focused-30b0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .feature_82d4,
  .menu-bffd,
  .breadcrumb-action-8fa5 {
    max-width: none !important;
  }
  
  .steel_c994 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .surface_09b6 {
    font-size: 1.5rem !important;
  }
  
  .south_258f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .lite_bcbd,
  .upper-a6de {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .action-ae4a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .heading_0e41 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pressed_0688 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .feature_82d4,
  .breadcrumb-action-8fa5 {
    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: 8f22 */
.ghost-box-r7 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}
