/* ============================================
   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 (.plasma-490a) is a descendant of
   .widget-narrow-bf73 (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.banner_soft_4e19 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".status-new-7456" 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.stale_e0c2 so it can't cause
   horizontal overflow anyway. */
.nav_dim_e50d,
.backdrop-gas-ff91,
.pagination-4281,
.pagination_65a9,
.hero-4c58,
.gold-6773,
.box_e50a,
.summary-pink-4ee3,
.fluid-812d,
.column-copper-ff32,
.section-green-4908 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .notice_9451 {
    padding: 8px 0;
  }
  
  .static_c8bb img {
    height: 28px;
    width: auto;
  }
  
  .header_9ada {
    display: none !important;
  }
  
  .west-ac91 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .west-ac91 svg {
    width: 14px;
    height: 14px;
  }
  
  .smooth_922b {
    padding: 6px;
  }
  
  .wrapper-651e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pagination-4281,
  .backdrop-gas-ff91,
  .pagination_65a9,
  .hero-4c58,
  .article_over_cce8,
  .tertiary_fixed_ae92,
  .liquid_d816,
  .tabs_9148,
  .breadcrumb-brown-0c39,
  .notice-4822,
  .shade_north_d5b6,
  .photo_mini_5062 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .tertiary-upper-c243,
  .left-2012 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tabs-huge-bc74,
  .grid-next-7d29,
  .dirty_3204,
  .tag_tiny_b4c4,
  .box-lite-ee53,
  .tertiary_5d1a,
  .new-0091 {
    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 */
  .advanced-891a,
  .new_c775,
  .content-f03d,
  .outline_2c42,
  .hover_9170 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .component_5bf4,
  .up_ebd3,
  .notice_3aa8,
  .header_cold_75a2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .primary-109e,
  .paragraph-clean-bc20 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .paper_1f09,
  .row_6265,
  .notice-b011,
  .popup-soft-ea9e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .alert-719a,
  .outline-east-8131,
  .glass_50bf,
  .slider-bronze-3bf5,
  .main-348f,
  .banner_a91f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .advanced-891a,
  .new_c775,
  .outline_2c42 {
    max-width: none !important;
  }
  
  .status-new-7456 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .component_5bf4 {
    font-size: 1.5rem !important;
  }
  
  .up_ebd3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hover-f6d5,
  .list_3364 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .notice_3aa8 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .block_a972 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .photo_small_8150 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .advanced-891a,
  .outline_2c42 {
    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: e513 */
.shadow-element-u6 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.3;
}
