/* ============================================
   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 (.menu-3ebf) is a descendant of
   .surface_slow_1893 (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.feature_selected_5d9d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".wide_c120" 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.button_upper_58b4 so it can't cause
   horizontal overflow anyway. */
.warm_c4b3,
.banner_basic_70f0,
.action-1a83,
.footer_8bdc,
.list-in-786d,
.shadow_fixed_0fcd,
.focused_8c5f,
.old_0094,
.slow-d28c,
.hovered-fe76,
.chip_wide_6c09 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .wide-54bf {
    padding: 8px 0;
  }
  
  .overlay_df53 img {
    height: 28px;
    width: auto;
  }
  
  .easy_ad93 {
    display: none !important;
  }
  
  .prev_6e7b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .prev_6e7b svg {
    width: 14px;
    height: 14px;
  }
  
  .fixed-5735 {
    padding: 6px;
  }
  
  .message-579c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .action-1a83,
  .banner_basic_70f0,
  .footer_8bdc,
  .list-in-786d,
  .grid-1d49,
  .footer-0f4e,
  .icon_9efa,
  .in_6b42,
  .bronze_288f,
  .link-outer-df9a,
  .mask_soft_3fcd,
  .row-a18c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tabs_bottom_3553,
  .media_iron_b543 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .blue_7824,
  .notice_action_3af2,
  .card-medium-fa3c,
  .section_glass_c741,
  .mask_e821,
  .panel_copper_9976,
  .widget-396d {
    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 */
  .full_4a05,
  .input_fa10,
  .last_c25b,
  .thick_b135,
  .in_8e14 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dropdown_5de0,
  .mask_4047,
  .accent_1856,
  .heading-dynamic-1afb {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .lite_a17b,
  .new-6f82 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .link-f5b1,
  .banner-rough-db36,
  .popup_367a,
  .smooth-15fc {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .detail-e834,
  .old-fb04,
  .progress-steel-9363,
  .heading-62ce,
  .box-d1ab,
  .fixed_9077 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .full_4a05,
  .input_fa10,
  .thick_b135 {
    max-width: none !important;
  }
  
  .wide_c120 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dropdown_5de0 {
    font-size: 1.5rem !important;
  }
  
  .mask_4047 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .summary-soft-9ed9,
  .component_hard_d80c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .accent_1856 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .chip-4cd5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .background_c2ae {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .full_4a05,
  .thick_b135 {
    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: 37eb */
.promo-block-l5 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
