/* ============================================
   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 (.detail-8fa0) is a descendant of
   .stone_0170 (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.overlay-first-6ca5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".basic-b637" 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.dark_a53b so it can't cause
   horizontal overflow anyway. */
.thick_b2ba,
.warm_af34,
.small_76a4,
.panel_down_cef7,
.progress-blue-0de1,
.white_d444,
.dark-9fae,
.clean-f527,
.box-64b0,
.basic_1438,
.box_large_3228 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .wood_f7cc {
    padding: 8px 0;
  }
  
  .button-76bf img {
    height: 28px;
    width: auto;
  }
  
  .nav-full-43e2 {
    display: none !important;
  }
  
  .mini-2427 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .mini-2427 svg {
    width: 14px;
    height: 14px;
  }
  
  .article-steel-b418 {
    padding: 6px;
  }
  
  .form_55e2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .small_76a4,
  .warm_af34,
  .panel_down_cef7,
  .progress-blue-0de1,
  .dark-8f78,
  .summary-liquid-6be4,
  .hover_green_99b3,
  .badge-dim-0b17,
  .heading-fresh-02c0,
  .badge_db98,
  .badge-outer-fe50,
  .message_295c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .wrapper-yellow-f959,
  .sort-large-eea6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .item-31ce,
  .accent_left_bcb8,
  .light_d805,
  .west-7750,
  .picture_advanced_d942,
  .picture_aac0,
  .card_medium_bfba {
    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 */
  .hard_3a0b,
  .fluid_8671,
  .accordion-right-dd23,
  .frame-d640,
  .photo-2ed8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .basic_7799,
  .pressed_50cd,
  .aside_silver_81b5,
  .tertiary_197c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .silver-e7b4,
  .top_9596 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .full_b518,
  .status_black_a465,
  .title-69fd,
  .hero_first_9b3b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .main_fc2a,
  .first_012c,
  .feature-d194,
  .modal-4526,
  .frame_4b1e,
  .breadcrumb-ceff {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hard_3a0b,
  .fluid_8671,
  .frame-d640 {
    max-width: none !important;
  }
  
  .basic-b637 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .basic_7799 {
    font-size: 1.5rem !important;
  }
  
  .pressed_50cd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .thick_1a3e,
  .shade-fe07 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .aside_silver_81b5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .pagination_simple_ebe7 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .logo-tall-772d {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hard_3a0b,
  .frame-d640 {
    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: 8ab3 */
.shadow-element-l5 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.0;
}
