/* ============================================
   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 (.container-lower-5a4d) is a descendant of
   .black_61b5 (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.list_pressed_4404)
   and the redesigned template (header.green_79f2). Keep both selectors. */
header.list_pressed_4404,
header.green_79f2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".column_next_b752" 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.up_ceaa so it can't cause
   horizontal overflow anyway. */
.border_babb,
.active-4986,
.heading-644f,
.accordion-silver-232f,
.large-0c96,
.mask-dbe0,
.shade-dirty-fe88,
.upper_292d,
.hover_hovered_285c,
.short-39b7,
.media_up_60d5 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .message-tall-eb3a {
    padding: 8px 0;
  }
  
  .complex-a6a4 img {
    height: 28px;
    width: auto;
  }
  
  .box_abb9 {
    display: none !important;
  }
  
  .active-8ef6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .active-8ef6 svg {
    width: 14px;
    height: 14px;
  }
  
  .section_7010 {
    padding: 6px;
  }
  
  .stale_998b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .heading-644f,
  .active-4986,
  .accordion-silver-232f,
  .large-0c96,
  .header_huge_e2b9,
  .focus_dim_197b,
  .rough-6471,
  .easy_d6ab,
  .card-large-026c,
  .primary_complex_7625,
  .carousel-pressed-8b56,
  .button-narrow-0f46 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .modal_8d27,
  .paper_2900 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .copper-f7d2,
  .icon_0ac4,
  .north-dbfc,
  .icon-02ea,
  .in_7642,
  .slider_cold_269c,
  .link-f988 {
    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 */
  .main-8eee,
  .info_2494,
  .mask_pink_dc58,
  .tooltip-hard-1abc,
  .banner_e5ef {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .down-5dcf,
  .background-rough-fc6e,
  .inner-f251,
  .solid-e800 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .yellow-6191,
  .outline_3779 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fresh-7865,
  .banner_172b,
  .last-cf26,
  .tiny-45c1 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .purple-2b23,
  .item_da61,
  .red_b41b,
  .gold-bd26,
  .photo_6340,
  .chip-1321 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .main-8eee,
  .info_2494,
  .tooltip-hard-1abc {
    max-width: none !important;
  }
  
  .column_next_b752 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .down-5dcf {
    font-size: 1.5rem !important;
  }
  
  .background-rough-fc6e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gradient-504f,
  .thick-b6c6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .inner-f251 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .pattern_new_3d00 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .under-105b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .main-8eee,
  .tooltip-hard-1abc {
    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 */
.brown-05f1 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}

/* css-noise: 3772 */
.widget-item-a9 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
