/* ============================================
   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 (.row-7a00) is a descendant of
   .brown_da61 (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.wrapper_wood_cc27 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper_d3ee" 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_6488 so it can't cause
   horizontal overflow anyway. */
.title_6900,
.north_c202,
.active-1c8f,
.background-9d81,
.input_fe06,
.label_b2d4,
.aside_down_d693,
.orange_0e54,
.box_2385,
.menu_e173,
.accent_fa5a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .gas-e93b {
    padding: 8px 0;
  }
  
  .top_4c61 img {
    height: 28px;
    width: auto;
  }
  
  .column_up_a8e0 {
    display: none !important;
  }
  
  .liquid-0188 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .liquid-0188 svg {
    width: 14px;
    height: 14px;
  }
  
  .chip_bronze_c27d {
    padding: 6px;
  }
  
  .pattern-16cd {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .active-1c8f,
  .north_c202,
  .background-9d81,
  .input_fe06,
  .rough-16d8,
  .module_paper_c2c7,
  .hover_fast_07d5,
  .message_5a70,
  .simple-c6b2,
  .full-5d2b,
  .description-3a43,
  .overlay-5d2d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .badge_old_6522,
  .filter_5334 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .breadcrumb_full_a125,
  .cool_00a3,
  .container-3605,
  .south_e9d5,
  .complex_3f97,
  .soft-b9e7,
  .avatar_west_590d {
    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_old_73b5,
  .accordion-b58a,
  .north_02b3,
  .complex_fb7d,
  .iron_73fd {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .description-7d11,
  .link_white_4928,
  .blue_5911,
  .row-large-fe18 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .accent_e036,
  .dynamic_b07f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .gradient_d002,
  .video-action-cd30,
  .carousel_south_26ea,
  .picture_6be4 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dropdown_orange_38be,
  .sort_d1d6,
  .paper-1936,
  .static_3e96,
  .popup_active_7d69,
  .sort-cbeb {
    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_old_73b5,
  .accordion-b58a,
  .complex_fb7d {
    max-width: none !important;
  }
  
  .wrapper_d3ee {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .description-7d11 {
    font-size: 1.5rem !important;
  }
  
  .link_white_4928 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .focus-c741,
  .action_09cb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .blue_5911 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .popup_light_64cb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .old_5e56 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .caption_old_73b5,
  .complex_fb7d {
    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: eac4 */
.widget-item-v0 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.1;
}
