/* ============================================
   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 (.form-hard-0f63) is a descendant of
   .sort-83d1 (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.content-15f5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".active-red-b7aa" 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.fixed_512c so it can't cause
   horizontal overflow anyway. */
.static-26b1,
.shadow_7b6e,
.filter-3db6,
.box-left-2587,
.list-fc80,
.title_7af9,
.dirty-51ca,
.box-thick-5ecd,
.in_7717,
.layout_e519,
.banner-large-e814 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .logo_light_8407 {
    padding: 8px 0;
  }
  
  .warm_41d6 img {
    height: 28px;
    width: auto;
  }
  
  .pressed-5dac {
    display: none !important;
  }
  
  .lite_e945 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .lite_e945 svg {
    width: 14px;
    height: 14px;
  }
  
  .basic_514e {
    padding: 6px;
  }
  
  .aside-static-ab8d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .filter-3db6,
  .shadow_7b6e,
  .box-left-2587,
  .list-fc80,
  .content-89bf,
  .gradient-white-9222,
  .primary_406e,
  .footer_4294,
  .mask-a9d8,
  .first_3f6b,
  .modal_under_c5e8,
  .south-9449 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .aside-gas-3c34,
  .popup_cool_0183 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tertiary_dac6,
  .complex-8997,
  .box-bf74,
  .easy_aefb,
  .paragraph-copper-d721,
  .brown-065e,
  .current_27f4 {
    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 */
  .mask_05f8,
  .tiny-0ba5,
  .shadow_wood_80c2,
  .lower_51b9,
  .light_08f7 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .filter-short-90e6,
  .image_9c79,
  .dropdown-tall-4b18,
  .row-48c3 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tiny_63b9,
  .outline-cold-60cf {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .breadcrumb-f27e,
  .easy-4989,
  .section-stale-eb20,
  .status-selected-92f7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .glass_b3e6,
  .narrow-267c,
  .middle_e292,
  .plasma-6ded,
  .badge-solid-ef7a,
  .tabs-last-8388 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .mask_05f8,
  .tiny-0ba5,
  .lower_51b9 {
    max-width: none !important;
  }
  
  .active-red-b7aa {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .filter-short-90e6 {
    font-size: 1.5rem !important;
  }
  
  .image_9c79 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .purple-4ede,
  .hero_32e1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dropdown-tall-4b18 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .silver-617e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .complex_6854 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .mask_05f8,
  .lower_51b9 {
    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: 3048 */
.phantom-card-t9 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.2;
}
