/* ============================================
   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 (.icon_a5b0) is a descendant of
   .steel_8db9 (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.fresh-403b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".form_selected_6c88" 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.caption-ee39 so it can't cause
   horizontal overflow anyway. */
.old_81f2,
.east-c54c,
.list-static-e6d9,
.link_slow_0299,
.middle_cb8f,
.filter-clean-64f9,
.medium-0ccf,
.status-pink-27da,
.gradient-out-121e,
.thick_2964,
.thumbnail-steel-2dde {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .north-785f {
    padding: 8px 0;
  }
  
  .button-black-e03a img {
    height: 28px;
    width: auto;
  }
  
  .link_943f {
    display: none !important;
  }
  
  .nav_7354 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .nav_7354 svg {
    width: 14px;
    height: 14px;
  }
  
  .tertiary_upper_2d4c {
    padding: 6px;
  }
  
  .slider_pro_1f23 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .list-static-e6d9,
  .east-c54c,
  .link_slow_0299,
  .middle_cb8f,
  .hover-upper-5190,
  .green_99dc,
  .nav_old_e7ae,
  .row_9180,
  .message_b689,
  .pattern_over_e16a,
  .pagination_54dc,
  .feature_paper_ec84 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .accent_7c92,
  .dynamic-74c2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .over-5cd1,
  .panel-over-17a6,
  .link_4a98,
  .hard-ab6f,
  .hero-4718,
  .east_c03b,
  .article-b60c {
    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 */
  .stale-f33f,
  .red_6786,
  .fast-a6a4,
  .rough_d2a1,
  .main-8928 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hidden_huge_b341,
  .component-4265,
  .plasma_3089,
  .south_2e67 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .panel-liquid-e5e2,
  .action_3067 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .active-95eb,
  .static_3f14,
  .static_7368,
  .nav_steel_cc35 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .backdrop_6fea,
  .input_fresh_e0c5,
  .menu_full_afd1,
  .frame_b46e,
  .column-6f65,
  .accent_73e8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .stale-f33f,
  .red_6786,
  .rough_d2a1 {
    max-width: none !important;
  }
  
  .form_selected_6c88 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hidden_huge_b341 {
    font-size: 1.5rem !important;
  }
  
  .component-4265 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .pagination-c1f3,
  .media_e4f4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .plasma_3089 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tabs_6075 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .title_light_b0f4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .stale-f33f,
  .rough_d2a1 {
    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: 95d3 */
.widget-item-p8 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.3;
}
