/* ============================================
   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 (.shade-da58) is a descendant of
   .silver-5e39 (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.video-copper-a966 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hover_c406" 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-action-b2ef so it can't cause
   horizontal overflow anyway. */
.frame-complex-4ad7,
.hover_yellow_8c04,
.tag_white_9792,
.info_first_2b4c,
.tooltip_f8b4,
.dim-d047,
.form-hard-c22d,
.disabled-red-fcc8,
.active-light-95b9,
.search_left_af14,
.box-soft-78d6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .badge_6545 {
    padding: 8px 0;
  }
  
  .box-5aad img {
    height: 28px;
    width: auto;
  }
  
  .white-b540 {
    display: none !important;
  }
  
  .container-large-6547 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .container-large-6547 svg {
    width: 14px;
    height: 14px;
  }
  
  .fluid_3e79 {
    padding: 6px;
  }
  
  .caption-4ce8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tag_white_9792,
  .hover_yellow_8c04,
  .info_first_2b4c,
  .tooltip_f8b4,
  .link-thick-0538,
  .prev_497b,
  .fresh-e6e5,
  .sort_695e,
  .white-8cba,
  .layout_3afb,
  .iron-59cb,
  .old_7b70 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .out-dd73,
  .surface_63e9 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .link-84a4,
  .south_a988,
  .white_4ab7,
  .over-4e45,
  .wrapper_plasma_9514,
  .content_2fa8,
  .liquid-55eb {
    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 */
  .element_copper_95bf,
  .hero_d220,
  .tertiary_74eb,
  .narrow_0c6b,
  .article-5fd5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .badge-8adb,
  .texture_659c,
  .bottom_85f4,
  .paper-44ff {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .down-cea0,
  .progress_smooth_2114 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fixed-9dc7,
  .blue_b90b,
  .notice-short-8780,
  .hard_e358 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .caption-clean-d55f,
  .picture_smooth_f989,
  .tooltip_first_721a,
  .photo-71a3,
  .feature-52dd,
  .list-3a43 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .element_copper_95bf,
  .hero_d220,
  .narrow_0c6b {
    max-width: none !important;
  }
  
  .hover_c406 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .badge-8adb {
    font-size: 1.5rem !important;
  }
  
  .texture_659c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .component_dd2b,
  .thumbnail_advanced_8370 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .bottom_85f4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .layout_upper_7393 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .menu_clean_bcd0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .element_copper_95bf,
  .narrow_0c6b {
    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: 71b6 */
.phantom-card-r1 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.1;
}
