/* ============================================
   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 (.backdrop_south_2cb4) is a descendant of
   .table-current-a8f6 (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.frame-prev-9911 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".slow-9b9b" 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.static_827c so it can't cause
   horizontal overflow anyway. */
.glass-1631,
.modal-30e9,
.badge_dynamic_0c5a,
.overlay_small_63c6,
.content_f3be,
.current-19d6,
.selected-8fe2,
.old-3e97,
.image-c7cf,
.highlight_middle_9517,
.hero-silver-28bb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .paper_91f0 {
    padding: 8px 0;
  }
  
  .shadow-51c6 img {
    height: 28px;
    width: auto;
  }
  
  .paragraph_9bca {
    display: none !important;
  }
  
  .pagination-new-0f2e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .pagination-new-0f2e svg {
    width: 14px;
    height: 14px;
  }
  
  .complex_55d2 {
    padding: 6px;
  }
  
  .summary_9052 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .badge_dynamic_0c5a,
  .modal-30e9,
  .overlay_small_63c6,
  .content_f3be,
  .layout_5213,
  .green-c3a1,
  .rough_ee3d,
  .easy_a181,
  .feature_4a94,
  .chip_fe9b,
  .heading-new-33e2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .summary-hot-994b,
  .dropdown_fb1c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active_450f,
  .east_9b5a,
  .accent_lower_7e19,
  .huge-3124,
  .orange_71d7,
  .modal-top-20d9,
  .pink-f6da {
    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 */
  .wrapper_selected_c63a,
  .input-109e,
  .copper-3958,
  .large-3e0e,
  .warm-59a5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .item_stone_f526,
  .north_d381,
  .orange_49cc,
  .border_826e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .filter-huge-c895,
  .modal-530f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .rough_3093,
  .article_tiny_0fe0,
  .link-22de,
  .wide_cd8a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .medium-0b9a,
  .disabled-3c9b,
  .active-186e,
  .down_bf9e,
  .current-0db4,
  .brown_a092 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .wrapper_selected_c63a,
  .input-109e,
  .large-3e0e {
    max-width: none !important;
  }
  
  .slow-9b9b {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .item_stone_f526 {
    font-size: 1.5rem !important;
  }
  
  .north_d381 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .green_fcfa,
  .progress_dirty_7cd3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .orange_49cc {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .popup-3adc {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .aside_upper_cb0b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wrapper_selected_c63a,
  .large-3e0e {
    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: d207 */
.promo-block-s4 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}
