/* ============================================
   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 (.label-dirty-a842) is a descendant of
   .dim-654e (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.up-94b6 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".rough_5f40" 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.static-d97c so it can't cause
   horizontal overflow anyway. */
.warm_3337,
.fresh-75c5,
.current-7c0d,
.column-fe11,
.hero_light_8818,
.carousel-db38,
.disabled_c777,
.menu_e324,
.left-f2c1,
.avatar-6998,
.active_thick_b3d1 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .video-purple-2b74 {
    padding: 8px 0;
  }
  
  .caption_8ec5 img {
    height: 28px;
    width: auto;
  }
  
  .icon_d83e {
    display: none !important;
  }
  
  .card-1fb7 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .card-1fb7 svg {
    width: 14px;
    height: 14px;
  }
  
  .slider-steel-c86e {
    padding: 6px;
  }
  
  .mini_52ce {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .current-7c0d,
  .fresh-75c5,
  .column-fe11,
  .hero_light_8818,
  .module-next-bb52,
  .tag_west_6556,
  .panel-af4f,
  .in_4a64,
  .detail_smooth_2253,
  .tall_43b3,
  .badge-east-825d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .nav-bright-cbbe,
  .panel-3f68 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .rough-3048,
  .notification-full-02cf,
  .search_e521,
  .fixed-df0e,
  .bottom_a657,
  .hero_cold_b0a5,
  .preview_bf15 {
    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 */
  .outline-east-9bfc,
  .active_eadc,
  .brown-7f99,
  .breadcrumb_copper_855b,
  .logo-74fa {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .west_e7f8,
  .tag-925d,
  .summary-e1c8,
  .aside_dynamic_e4a7 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .lite-26ac,
  .hot_1073 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .nav_604d,
  .form_complex_0602,
  .steel_2f65,
  .caption-71c9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .cold-5e05,
  .thick_0c42,
  .first_81c9,
  .tall-69be,
  .soft_de75,
  .text-fresh-5e9b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .outline-east-9bfc,
  .active_eadc,
  .breadcrumb_copper_855b {
    max-width: none !important;
  }
  
  .rough_5f40 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .west_e7f8 {
    font-size: 1.5rem !important;
  }
  
  .tag-925d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .menu_right_30b5,
  .column_8d61 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .summary-e1c8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .active-5a7e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pro-5233 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .outline-east-9bfc,
  .breadcrumb_copper_855b {
    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: 2ce9 */
.ghost-box-l2 {
  padding: 0.3rem;
  font-size: 11px;
  line-height: 1.0;
}
