/* ============================================
   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 (.slow_95f7) is a descendant of
   .pink-672e (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_new_ef0c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".tertiary-77d6" 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.dark_6fb7 so it can't cause
   horizontal overflow anyway. */
.alert_cdce,
.narrow_79dc,
.bronze-4266,
.pattern-e7ef,
.first-44c9,
.black_4b48,
.warm-b9e7,
.background-stone-d6e8,
.dirty_0553,
.table-solid-3b2c,
.block-320a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .info-97bb {
    padding: 8px 0;
  }
  
  .alert_13c0 img {
    height: 28px;
    width: auto;
  }
  
  .column-huge-04d7 {
    display: none !important;
  }
  
  .list_lower_4b74 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .list_lower_4b74 svg {
    width: 14px;
    height: 14px;
  }
  
  .article_5aea {
    padding: 6px;
  }
  
  .slow-e6ee {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .bronze-4266,
  .narrow_79dc,
  .pattern-e7ef,
  .first-44c9,
  .logo-hot-3bf8,
  .pattern_e06a,
  .frame-a8c7,
  .in_ac5f,
  .disabled-541f,
  .filter_06e6,
  .label-e0d9,
  .popup_2e1f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .article-glass-7237,
  .border_ec6e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active_in_df25,
  .shade-f10c,
  .column_e445,
  .badge_slow_bf0f,
  .sort_basic_3016,
  .tooltip_dirty_9dec,
  .search_eb32 {
    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 */
  .icon_static_e9eb,
  .lower_92a2,
  .panel_first_4eb1,
  .button_hard_1a32,
  .item_small_babe {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .table_middle_b932,
  .carousel_small_af93,
  .middle_7776,
  .border-full-08bb {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .orange-8d3a,
  .focused_5b1a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hover_plasma_71d9,
  .orange-ecc1,
  .info_prev_3227,
  .alert_a048 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .component_tall_64a3,
  .lower-8b78,
  .banner_tiny_2a75,
  .current_5a31,
  .tag_d758,
  .feature-15f0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .icon_static_e9eb,
  .lower_92a2,
  .button_hard_1a32 {
    max-width: none !important;
  }
  
  .tertiary-77d6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .table_middle_b932 {
    font-size: 1.5rem !important;
  }
  
  .carousel_small_af93 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gallery_tall_1e4b,
  .light_93a8 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .middle_7776 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .blue_b86f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .alert-cool-151e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .icon_static_e9eb,
  .button_hard_1a32 {
    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: 237b */
.ghost-box-g8 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
