/* ============================================
   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 (.upper-1ed9) is a descendant of
   .mask-e57a (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.breadcrumb_536f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".shadow_e84b" 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.out_0fe4 so it can't cause
   horizontal overflow anyway. */
.paragraph-d059,
.title_0154,
.surface_left_24c0,
.inner-b00e,
.tooltip_middle_d06a,
.surface_lower_0669,
.soft_f7d2,
.mask-9258,
.footer_hovered_0fd3,
.paragraph_wide_efa3,
.layout_small_4725 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .action_c6cd {
    padding: 8px 0;
  }
  
  .tabs-847e img {
    height: 28px;
    width: auto;
  }
  
  .container_lite_e7dc {
    display: none !important;
  }
  
  .sidebar-6016 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .sidebar-6016 svg {
    width: 14px;
    height: 14px;
  }
  
  .header-lite-bcf2 {
    padding: 6px;
  }
  
  .button_29fe {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .surface_left_24c0,
  .title_0154,
  .inner-b00e,
  .tooltip_middle_d06a,
  .hard_e603,
  .title-pro-c0fa,
  .tiny-7305,
  .complex_153e,
  .chip-55c5,
  .new_d2e5,
  .column_115f,
  .gas-06e3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .highlight_hard_4116,
  .description-next-e09d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .surface-narrow-20d0,
  .pattern-down-78a0,
  .column_right_cbf6,
  .label-focused-5d91,
  .secondary_459f,
  .in-f45e,
  .logo_bright_d8c6 {
    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 */
  .blue-92b1,
  .accent-red-ac15,
  .input-hot-67cd,
  .frame_pink_0174,
  .block-bbec {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .accent_5686,
  .summary-middle-2f9e,
  .photo-right-80cd,
  .paragraph_soft_f8a4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .item_glass_050f,
  .dark-96a3 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .avatar-a645,
  .backdrop_full_fca8,
  .blue-d1f7,
  .hero-a0ec {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .menu-light-18a2,
  .summary_light_327d,
  .lite-9e8e,
  .photo_2177,
  .lower-b5c7,
  .shade-old-087d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .blue-92b1,
  .accent-red-ac15,
  .frame_pink_0174 {
    max-width: none !important;
  }
  
  .shadow_e84b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .accent_5686 {
    font-size: 1.5rem !important;
  }
  
  .summary-middle-2f9e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .wrapper-medium-1527,
  .hot-c7a7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .photo-right-80cd {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .message_bed6 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .top-6536 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .blue-92b1,
  .frame_pink_0174 {
    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: 3492 */
.shadow-element-j6 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.3;
}
