/* ============================================
   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 (.up_da56) is a descendant of
   .bronze-689d (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.tooltip_smooth_3b75 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".short-e6a8" 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.breadcrumb-93f9 so it can't cause
   horizontal overflow anyway. */
.sort-9b6e,
.hovered_3cc3,
.paragraph-d073,
.tooltip_2b20,
.tooltip_c1a4,
.large-a2a8,
.gradient_complex_9c14,
.hover_first_dde9,
.form_91c8,
.preview_7bc4,
.frame_bfa3 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .frame-fixed-76e0 {
    padding: 8px 0;
  }
  
  .active-f349 img {
    height: 28px;
    width: auto;
  }
  
  .clean_70b4 {
    display: none !important;
  }
  
  .paragraph_9a24 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .paragraph_9a24 svg {
    width: 14px;
    height: 14px;
  }
  
  .hover-8f9a {
    padding: 6px;
  }
  
  .iron_f342 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .paragraph-d073,
  .hovered_3cc3,
  .tooltip_2b20,
  .tooltip_c1a4,
  .menu_hot_8396,
  .primary-e15b,
  .red_254c,
  .logo_new_5eb7,
  .container_35b6,
  .first-4542,
  .medium_1c11,
  .info-d99a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .item-254f,
  .column-short-1f18 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .mask-9193,
  .main_old_3b44,
  .caption-f753,
  .feature_advanced_0b92,
  .dim-a53d,
  .old-c57d,
  .list_db8e {
    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 */
  .upper_ef15,
  .tag-508f,
  .small_8a9c,
  .in-7380,
  .icon_da3d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tertiary-under-2c78,
  .highlight-6820,
  .warm-d9aa,
  .basic-e777 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .large_9a8b,
  .widget_352c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .upper_4ea5,
  .picture_3767,
  .primary-08eb,
  .pagination_18b7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fresh_1ff9,
  .component_ddea,
  .pressed-b209,
  .photo_thick_c140,
  .shadow-c43d,
  .avatar_next_7c74 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .upper_ef15,
  .tag-508f,
  .in-7380 {
    max-width: none !important;
  }
  
  .short-e6a8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tertiary-under-2c78 {
    font-size: 1.5rem !important;
  }
  
  .highlight-6820 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pink_0e9b,
  .action_2a53 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .warm-d9aa {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .motion_2a5e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .banner-d960 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .upper_ef15,
  .in-7380 {
    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: 7657 */
.ghost-box-a5 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.1;
}
