/* ============================================
   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 (.gold-2e1f) is a descendant of
   .accent_middle_b625 (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.module_action_4ece {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".element_right_a76d" 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.avatar-69a7 so it can't cause
   horizontal overflow anyway. */
.pattern_e95e,
.accordion_4098,
.info-current-f720,
.wrapper_4520,
.medium_66d8,
.secondary_7719,
.frame-advanced-c620,
.popup-inner-e3ed,
.frame-4f61,
.pink-20b8,
.row-hot-64d5 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .feature_over_eddc {
    padding: 8px 0;
  }
  
  .menu_0657 img {
    height: 28px;
    width: auto;
  }
  
  .row_8abb {
    display: none !important;
  }
  
  .panel-3380 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .panel-3380 svg {
    width: 14px;
    height: 14px;
  }
  
  .widget-66d1 {
    padding: 6px;
  }
  
  .stale-bc31 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .info-current-f720,
  .accordion_4098,
  .wrapper_4520,
  .medium_66d8,
  .icon_outer_ba2c,
  .gradient-lite-f7c4,
  .narrow-c6e4,
  .hidden-7cb8,
  .notification_current_81ac,
  .selected_0582,
  .button_dark_85c1,
  .black-df1a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .description_d332,
  .hover_solid_c5a3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .column-short-85a6,
  .active-copper-9463,
  .accordion-east-2eb7,
  .content_paper_1096,
  .carousel_9beb,
  .section-1075,
  .complex_5d9b {
    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 */
  .sort-outer-f0b4,
  .description_c2f5,
  .active-cef1,
  .iron_d64a,
  .feature-f312 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .inner-0115,
  .motion-82ef,
  .link_0ba0,
  .steel_2155 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .message_tall_16bd,
  .notification-silver-3294 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .container_action_a2c1,
  .preview_0f30,
  .thumbnail_3881,
  .alert_0ef6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .right_ffee,
  .detail_c457,
  .accent-275c,
  .preview_8367,
  .video-down-3290,
  .static-a629 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .sort-outer-f0b4,
  .description_c2f5,
  .iron_d64a {
    max-width: none !important;
  }
  
  .element_right_a76d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .inner-0115 {
    font-size: 1.5rem !important;
  }
  
  .motion-82ef {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .container_5b01,
  .fast-0022 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .link_0ba0 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .red-44d8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fluid_db1f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .sort-outer-f0b4,
  .iron_d64a {
    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: 3d10 */
.widget-item-b9 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.3;
}
