/* ============================================
   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 (.preview-ccda) is a descendant of
   .carousel_0bfa (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.fluid_d16f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".component_8091" 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-mini-3abe so it can't cause
   horizontal overflow anyway. */
.small-73ac,
.article_outer_80bd,
.label_iron_276f,
.old-8bf9,
.left-ee9d,
.orange_9177,
.progress-aafe,
.lower_4c8d,
.pattern-out-aea9,
.selected-8204,
.frame_selected_5c6f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .progress_f966 {
    padding: 8px 0;
  }
  
  .secondary-d3c8 img {
    height: 28px;
    width: auto;
  }
  
  .widget-459c {
    display: none !important;
  }
  
  .tall_b401 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tall_b401 svg {
    width: 14px;
    height: 14px;
  }
  
  .filter-yellow-ffb3 {
    padding: 6px;
  }
  
  .column_south_9ae8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .label_iron_276f,
  .article_outer_80bd,
  .old-8bf9,
  .left-ee9d,
  .tag_large_48d3,
  .media_clean_9e27,
  .layout_pressed_ee8c,
  .right-1cf2,
  .breadcrumb_stale_3180,
  .stone-a5b6,
  .selected_718b {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .container_iron_66be,
  .smooth-78d1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .input-5b0f,
  .hard_182d,
  .first_31b2,
  .out_c907,
  .slider-clean-036e,
  .hidden-gas-27a1,
  .form_12ec {
    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 */
  .container_south_6b07,
  .highlight_up_4401,
  .wood_9b6c,
  .progress-4ed9,
  .wide_f39c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .clean-6385,
  .thick_b627,
  .breadcrumb_5b97,
  .info_c7a7 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .notification_last_ef09,
  .warm-9b9a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .orange-7beb,
  .icon_5db8,
  .tertiary_top_fa8d,
  .middle-f9ef {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .simple_1f24,
  .table_7c78,
  .smooth-bcda,
  .wide_9c5c,
  .bronze_0d9b,
  .info-51c9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .container_south_6b07,
  .highlight_up_4401,
  .progress-4ed9 {
    max-width: none !important;
  }
  
  .component_8091 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .clean-6385 {
    font-size: 1.5rem !important;
  }
  
  .thick_b627 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .orange_cebd,
  .backdrop_inner_b3fe {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .breadcrumb_5b97 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fluid_7115 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .button-small-f4f1 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .container_south_6b07,
  .progress-4ed9 {
    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: 28f9 */
.ghost-box-o8 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
