/* ============================================
   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 (.steel_dbb3) is a descendant of
   .form_pro_7c3f (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.wide_e87e {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".accordion-d540" 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.liquid-70a2 so it can't cause
   horizontal overflow anyway. */
.filter_57ee,
.footer_plasma_be6b,
.stale-62d6,
.info_simple_7eb7,
.primary-pressed-e519,
.modal_e3d8,
.black-8d11,
.section-new-3b71,
.progress_b736,
.menu-plasma-2336,
.mask_db6f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .form-black-ec8f {
    padding: 8px 0;
  }
  
  .mask-tall-da7e img {
    height: 28px;
    width: auto;
  }
  
  .plasma-1d57 {
    display: none !important;
  }
  
  .detail_selected_8065 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .detail_selected_8065 svg {
    width: 14px;
    height: 14px;
  }
  
  .outer_475f {
    padding: 6px;
  }
  
  .green_d65c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .stale-62d6,
  .footer_plasma_be6b,
  .info_simple_7eb7,
  .primary-pressed-e519,
  .card-middle-5ab8,
  .info_light_30a9,
  .title_be3e,
  .fluid-842a,
  .surface-d1b4,
  .gold-3612,
  .alert_hard_5f69,
  .sort-c61f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .info-middle-7768,
  .glass_fced {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .info-bce8,
  .backdrop-cc14,
  .picture_9083,
  .info-1f3e,
  .slow_8478,
  .progress-dab4,
  .chip_current_6e08 {
    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 */
  .header-ef18,
  .content_d874,
  .container_east_3f7c,
  .solid_535d,
  .widget-b58a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .gas_a676,
  .gradient_fef8,
  .title_black_d4a8,
  .video_1d07 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .banner-bronze-d600,
  .middle_0779 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .card-south-aca4,
  .paragraph_cca8,
  .card-last-e1ff,
  .active-wide-bd99 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .smooth_4d12,
  .pattern_d1bc,
  .west_7fa2,
  .narrow_f490,
  .list_hard_973e,
  .plasma_c01e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .header-ef18,
  .content_d874,
  .solid_535d {
    max-width: none !important;
  }
  
  .accordion-d540 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .gas_a676 {
    font-size: 1.5rem !important;
  }
  
  .gradient_fef8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gallery-pressed-6aa2,
  .shadow_steel_a909 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .title_black_d4a8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .background-50ae {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .down_4119 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .header-ef18,
  .solid_535d {
    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: f5df */
.ghost-box-n3 {
  padding: 0.3rem;
  font-size: 11px;
  line-height: 1.2;
}
