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

/* Fix for any potential overflow elements */
/* NOTE: ".upper_492a" 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.label_5847 so it can't cause
   horizontal overflow anyway. */
.modal_bc0d,
.plasma_f2d3,
.section_57f0,
.tooltip_red_4cc2,
.hover_f14b,
.top-6e8d,
.tertiary-5d77,
.next_01f9,
.bronze-a43f,
.modal-top-80c2,
.paragraph_dfb5 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .picture-huge-0fc0 {
    padding: 8px 0;
  }
  
  .gradient_f799 img {
    height: 28px;
    width: auto;
  }
  
  .input_plasma_1a86 {
    display: none !important;
  }
  
  .main_6eb5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .main_6eb5 svg {
    width: 14px;
    height: 14px;
  }
  
  .box-ff0f {
    padding: 6px;
  }
  
  .border_narrow_de30 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .section_57f0,
  .plasma_f2d3,
  .tooltip_red_4cc2,
  .hover_f14b,
  .section-prev-dbac,
  .column-51a8,
  .text_dba8,
  .row-9670,
  .down-f12a,
  .shade-east-4dc3,
  .header-cf65,
  .up_3264 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .shade-8d90,
  .progress_530e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .row-6f84,
  .link-19f5,
  .panel-bright-4824,
  .secondary_west_ff33,
  .backdrop-0500,
  .frame-c698,
  .section-9dcc {
    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 */
  .last_ea54,
  .in-545c,
  .header-99e0,
  .logo-f716,
  .west_1eda {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .in_1d1a,
  .search-plasma-2958,
  .tooltip-c41b,
  .slider-large-fe44 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .block_bbed,
  .container-07de {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .gradient_a1e3,
  .component_86be,
  .modal_d3d0,
  .lower-39f4 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .simple_926a,
  .tertiary-pro-9ba2,
  .west-bbeb,
  .inner_ce8a,
  .footer-3644,
  .slider-13b4 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .last_ea54,
  .in-545c,
  .logo-f716 {
    max-width: none !important;
  }
  
  .upper_492a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .in_1d1a {
    font-size: 1.5rem !important;
  }
  
  .search-plasma-2958 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .yellow-dfcb,
  .pink_3827 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tooltip-c41b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .full_ef52 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .backdrop_prev_0b34 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .last_ea54,
  .logo-f716 {
    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: 5b2f */
.promo-block-x3 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.2;
}
