/* ============================================
   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 (.easy_fc99) is a descendant of
   .list_plasma_cff4 (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.accordion-soft-185a {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".middle_8145" 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.silver_de0a so it can't cause
   horizontal overflow anyway. */
.surface_bada,
.tag_green_6ed1,
.accordion_b4ed,
.brown_af4e,
.large-72e0,
.media-black-ad07,
.detail_9ac5,
.slider-first-7896,
.wrapper-prev-d92f,
.layout-e47d,
.module_6c2d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fast-6f06 {
    padding: 8px 0;
  }
  
  .search-under-da3b img {
    height: 28px;
    width: auto;
  }
  
  .notice_147e {
    display: none !important;
  }
  
  .message_in_c7d1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .message_in_c7d1 svg {
    width: 14px;
    height: 14px;
  }
  
  .module-24ac {
    padding: 6px;
  }
  
  .fresh_de43 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .accordion_b4ed,
  .tag_green_6ed1,
  .brown_af4e,
  .large-72e0,
  .popup-easy-d3f3,
  .hover_red_7989,
  .liquid-ce60,
  .shadow-ddb7,
  .accent-f241,
  .card_1520,
  .dirty-d057 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .article-next-abca,
  .info_motion_50d7 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .search_dark_0b58,
  .shade-9bcd,
  .chip_78e8,
  .module_7eaa,
  .huge_3d22,
  .breadcrumb-957d,
  .background-a148 {
    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 */
  .caption-47d4,
  .gallery-down-bd69,
  .panel-narrow-2f30,
  .container_rough_31ba,
  .banner-272f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .paragraph_active_019f,
  .top-cece,
  .simple_3c11,
  .logo_2a23 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .banner-west-abbd,
  .advanced_d431 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .header-4d5b,
  .chip-190d,
  .old-57c7,
  .medium_7e65 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .component_fdd7,
  .cold_53d0,
  .table_full_6aa4,
  .container-bb6d,
  .pagination-cb42,
  .up_3d0a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .caption-47d4,
  .gallery-down-bd69,
  .container_rough_31ba {
    max-width: none !important;
  }
  
  .middle_8145 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .paragraph_active_019f {
    font-size: 1.5rem !important;
  }
  
  .top-cece {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .summary_71b6,
  .component_first_3093 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .simple_3c11 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .accent_liquid_1e46 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .container-c9c3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .caption-47d4,
  .container_rough_31ba {
    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: 3c66 */
.widget-item-o4 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.3;
}
