/* ============================================
   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 (.secondary_60b4) is a descendant of
   .bright_a108 (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.
   Two site templates coexist: legacy obfuscated-class (header.popup_simple_60f4)
   and the redesigned template (header.slow_ae43). Keep both selectors. */
header.popup_simple_60f4,
header.slow_ae43 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".article_328c" 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.tag_3c70 so it can't cause
   horizontal overflow anyway. */
.bronze-7b62,
.tooltip_077a,
.prev-e420,
.dynamic_0fde,
.shade-dc27,
.dynamic_a05a,
.brown-93a1,
.mask_b93d,
.smooth_8fdd,
.tooltip_8856,
.clean_fe12 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .container_complex_03ce {
    padding: 8px 0;
  }
  
  .cool_46d9 img {
    height: 28px;
    width: auto;
  }
  
  .pro_2b93 {
    display: none !important;
  }
  
  .fluid_9f62 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .fluid_9f62 svg {
    width: 14px;
    height: 14px;
  }
  
  .image-8a60 {
    padding: 6px;
  }
  
  .hard-4276 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .prev-e420,
  .tooltip_077a,
  .dynamic_0fde,
  .shade-dc27,
  .action_d46e,
  .mini-9e50,
  .huge-40d9,
  .icon-f465,
  .column_wide_eb70,
  .tooltip-c147,
  .pagination_fixed_ac07,
  .main-210f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .component-huge-d784,
  .active-9c38 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .easy-97fc,
  .wide-aca8,
  .carousel-blue-8e7d,
  .input-down-3c6a,
  .dynamic_6729,
  .widget_dirty_4578,
  .icon_brown_b6b7 {
    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 */
  .fresh_a95e,
  .carousel_narrow_79fc,
  .block_tall_4add,
  .tooltip_352c,
  .right_c424 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fixed_4d7f,
  .notification-fixed-1ef9,
  .container_dim_9885,
  .breadcrumb_d9da {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .middle-9d3d,
  .popup_pink_e2a8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .silver-d6f2,
  .heading-f477,
  .disabled_70e2,
  .label_up_b657 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .alert_46b6,
  .tag-yellow-7f34,
  .basic_77b9,
  .content_lower_bb03,
  .primary-bright-79c4,
  .right-8f3d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .fresh_a95e,
  .carousel_narrow_79fc,
  .tooltip_352c {
    max-width: none !important;
  }
  
  .article_328c {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fixed_4d7f {
    font-size: 1.5rem !important;
  }
  
  .notification-fixed-1ef9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .disabled-simple-2834,
  .section-f74e {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .container_dim_9885 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .link-e7e2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .up_2432 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .fresh_a95e,
  .tooltip_352c {
    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: 94a5 */
.pro_1d28 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}

/* css-noise: f2b4 */
.widget-item-r1 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.2;
}
