/* ============================================
   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 (.primary-6263) is a descendant of
   .blue-ef60 (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.summary_8a79 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".inner_0faa" 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.nav-solid-7a40 so it can't cause
   horizontal overflow anyway. */
.heading-fresh-c9eb,
.active-ae06,
.label-steel-44c1,
.progress-motion-6491,
.gallery_13d1,
.logo_bfe1,
.liquid-28d3,
.badge_b4fb,
.active_hot_bc6e,
.text_warm_7b8d,
.texture-first-e3eb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outline-ae08 {
    padding: 8px 0;
  }
  
  .dropdown-black-a709 img {
    height: 28px;
    width: auto;
  }
  
  .detail_6584 {
    display: none !important;
  }
  
  .title-7d4d {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .title-7d4d svg {
    width: 14px;
    height: 14px;
  }
  
  .upper_d72a {
    padding: 6px;
  }
  
  .wrapper-steel-cf8d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .label-steel-44c1,
  .active-ae06,
  .progress-motion-6491,
  .gallery_13d1,
  .surface_outer_b708,
  .hard-ca6c,
  .smooth_4d1d,
  .mask_9f6d,
  .background-2018,
  .component-bronze-00d9,
  .search-motion-4b74 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .panel_ea0b,
  .middle-c7b1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .background-4ecc,
  .focus-5c9e,
  .clean-0dfe,
  .content_0eb5,
  .title_8719,
  .gallery-78ec,
  .gallery-smooth-9775 {
    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 */
  .mask-6b6b,
  .wide_1ff2,
  .breadcrumb-soft-7a06,
  .sidebar-3ea7,
  .fast_c24c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hovered-8373,
  .west_9273,
  .link-lite-885c,
  .logo-north-b9f3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .element_medium_4eaa,
  .popup-mini-adf1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .dark-c660,
  .chip-8f7a,
  .rough_9bae,
  .form_fresh_5312 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .surface-center-61df,
  .sidebar_large_2d9c,
  .photo_cool_8a4c,
  .item_wide_3b14,
  .in-c60c,
  .blue_c780 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .mask-6b6b,
  .wide_1ff2,
  .sidebar-3ea7 {
    max-width: none !important;
  }
  
  .inner_0faa {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hovered-8373 {
    font-size: 1.5rem !important;
  }
  
  .west_9273 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .fluid_981a,
  .mask-92a3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .link-lite-885c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .liquid_73d0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .highlight_tall_a1b6 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mask-6b6b,
  .sidebar-3ea7 {
    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: 083b */
.promo-block-f4 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.2;
}
