/* ============================================
   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 (.article-3f85) is a descendant of
   .orange_9fdf (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.gradient_old_c305 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".huge-66d3" 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.old_7a47 so it can't cause
   horizontal overflow anyway. */
.surface_6750,
.gradient-86cf,
.top_68dd,
.overlay_bright_ae04,
.sort-active-9e5d,
.element-cafa,
.heading-hot-3fe4,
.status-north-4c7e,
.secondary-cca5,
.primary_32a3,
.caption_simple_1c72 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .sidebar_bronze_c4e2 {
    padding: 8px 0;
  }
  
  .motion_5dcf img {
    height: 28px;
    width: auto;
  }
  
  .top-d993 {
    display: none !important;
  }
  
  .pro-2151 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .pro-2151 svg {
    width: 14px;
    height: 14px;
  }
  
  .title-brown-2c37 {
    padding: 6px;
  }
  
  .inner-9bec {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .top_68dd,
  .gradient-86cf,
  .overlay_bright_ae04,
  .sort-active-9e5d,
  .aside-complex-82dd,
  .notice-fixed-1c08,
  .media_complex_27eb,
  .hover-stale-66fb,
  .blue-91f4,
  .layout_d518,
  .cool_e213 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .component-purple-c323,
  .right-f4ea {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .red_b8ae,
  .backdrop-c997,
  .title_upper_5abf,
  .notification_silver_8898,
  .label-68d1,
  .breadcrumb-bottom-ae24,
  .texture-6e2f {
    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 */
  .silver_bf6f,
  .steel_61e3,
  .menu_small_6efa,
  .focus_hot_2571,
  .gradient-43c0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .logo_light_c517,
  .container_dark_5e55,
  .smooth_231e,
  .notice-large-1d2a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .mask_e03d,
  .modal-465a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .section-b012,
  .secondary_40b9,
  .container_iron_0d01,
  .detail-lower-07cf {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .orange_f262,
  .large-b2f1,
  .mini_b9a3,
  .avatar-7e5a,
  .preview_4a50,
  .input-506c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .silver_bf6f,
  .steel_61e3,
  .focus_hot_2571 {
    max-width: none !important;
  }
  
  .huge-66d3 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .logo_light_c517 {
    font-size: 1.5rem !important;
  }
  
  .container_dark_5e55 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .thumbnail-e0a6,
  .banner_inner_47de {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .smooth_231e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .sidebar_inner_9c5e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label-lite-b813 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .silver_bf6f,
  .focus_hot_2571 {
    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: 67c0 */
.promo-block-n1 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.0;
}
