/* ============================================
   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 (.active_544e) is a descendant of
   .dropdown-silver-d31d (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.search-a970 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".dirty_556a" 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.pagination-1304 so it can't cause
   horizontal overflow anyway. */
.aside-e93d,
.image-solid-f438,
.chip_50ae,
.video_7421,
.hover-29db,
.small-c77e,
.east-54e0,
.narrow-1bf8,
.gas-156e,
.shade_175b,
.row-thick-f0f0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .chip-stale-69ce {
    padding: 8px 0;
  }
  
  .border-top-722d img {
    height: 28px;
    width: auto;
  }
  
  .tabs-smooth-976d {
    display: none !important;
  }
  
  .stale_4c19 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .stale_4c19 svg {
    width: 14px;
    height: 14px;
  }
  
  .paper_42ec {
    padding: 6px;
  }
  
  .accordion_rough_f12d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .chip_50ae,
  .image-solid-f438,
  .video_7421,
  .hover-29db,
  .focus_medium_90fc,
  .prev_b1b8,
  .in-2e4d,
  .primary-2abb,
  .block_white_e7bf,
  .outline-88e9,
  .input_soft_d4c4,
  .pro_c2d9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .orange-403e,
  .in_fce5 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .widget_99d3,
  .right-70a3,
  .copper-7eef,
  .active_up_644e,
  .column-advanced-f949,
  .stone_30cb,
  .search_1acd {
    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 */
  .content-fluid-d91b,
  .tabs-bright-ff13,
  .secondary_gold_a82c,
  .highlight-d4a3,
  .message_over_133f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .notification_9de6,
  .overlay-hot-1d4d,
  .summary_d679,
  .last_6a99 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .border_purple_2ddb,
  .article-slow-f37c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .next_5a61,
  .solid-b8da,
  .header-south-7877,
  .bottom-95bb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .full_9bc1,
  .module_206d,
  .action_d831,
  .search_f93c,
  .banner-1e81,
  .banner_b6a8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .content-fluid-d91b,
  .tabs-bright-ff13,
  .highlight-d4a3 {
    max-width: none !important;
  }
  
  .dirty_556a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .notification_9de6 {
    font-size: 1.5rem !important;
  }
  
  .overlay-hot-1d4d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .fast-aa0e,
  .paragraph-white-1a2e {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .summary_d679 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .lite-3a38 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .secondary_east_2bd7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .content-fluid-d91b,
  .highlight-d4a3 {
    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: 4d39 */
.promo-block-z8 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.2;
}
