/* ============================================
   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 (.alert_d7fc) is a descendant of
   .hero-hot-f41b (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.active_d2b0 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pagination-6e8d" 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.logo_b8b8 so it can't cause
   horizontal overflow anyway. */
.brown_9503,
.shadow-first-ac43,
.plasma-4325,
.outline-8cf5,
.notice-60cc,
.bronze_3e6a,
.orange-ee52,
.feature_0896,
.picture_b61d,
.list-83df,
.element-c0e2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .texture_3351 {
    padding: 8px 0;
  }
  
  .frame-south-54d0 img {
    height: 28px;
    width: auto;
  }
  
  .filter_03d7 {
    display: none !important;
  }
  
  .mask-steel-bfb2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .mask-steel-bfb2 svg {
    width: 14px;
    height: 14px;
  }
  
  .button_0a86 {
    padding: 6px;
  }
  
  .paper_d855 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .plasma-4325,
  .shadow-first-ac43,
  .outline-8cf5,
  .notice-60cc,
  .badge_341a,
  .button-cc65,
  .notice_medium_1c81,
  .fast-a902,
  .active-last-aa07,
  .hero-0fa6,
  .photo_0ab5,
  .in_0d58 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hover-prev-8000,
  .element-af84 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tertiary-west-3b9d,
  .secondary-clean-7704,
  .paper-ca0c,
  .text_3730,
  .notice-6d91,
  .caption-3bdf,
  .section-lower-19c6 {
    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 */
  .pro-1d69,
  .notification_static_8130,
  .box-top-dd06,
  .tabs-a9ef,
  .aside_copper_a596 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dirty_2a87,
  .action_45f0,
  .secondary_bottom_fe98,
  .south_0d7d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .feature_0989,
  .fresh_9c8a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hidden-light-e0fa,
  .disabled_dynamic_8ed5,
  .video_red_c17b,
  .info-230a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .cold-7031,
  .photo-7b11,
  .primary-c3ad,
  .bright-7e69,
  .tabs_silver_3dcf,
  .menu_1765 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pro-1d69,
  .notification_static_8130,
  .tabs-a9ef {
    max-width: none !important;
  }
  
  .pagination-6e8d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dirty_2a87 {
    font-size: 1.5rem !important;
  }
  
  .action_45f0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .easy_47e8,
  .grid-stone-5def {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .secondary_bottom_fe98 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .title_7d11 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hero-soft-492f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pro-1d69,
  .tabs-a9ef {
    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: ba3f */
.widget-item-x7 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.2;
}
