/* ============================================
   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 (.element-solid-7339) is a descendant of
   .slider-7e9d (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.filter-4720 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".accordion-f169" 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.input_a440 so it can't cause
   horizontal overflow anyway. */
.disabled-upper-3664,
.hovered-afac,
.left-3de9,
.accent_upper_3d40,
.solid_0991,
.component_north_1144,
.active-lower-7819,
.current-b777,
.copper_d416,
.menu-focused-c53f,
.thumbnail-5b36 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .table_gas_ad67 {
    padding: 8px 0;
  }
  
  .wrapper_5cf4 img {
    height: 28px;
    width: auto;
  }
  
  .paragraph_bea2 {
    display: none !important;
  }
  
  .gradient_4d20 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .gradient_4d20 svg {
    width: 14px;
    height: 14px;
  }
  
  .cool-de40 {
    padding: 6px;
  }
  
  .brown-453e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .left-3de9,
  .hovered-afac,
  .accent_upper_3d40,
  .solid_0991,
  .surface-fast-30aa,
  .texture_0ddd,
  .new_acea,
  .shade-0b99,
  .medium-37eb,
  .accordion-8844,
  .medium_25e8,
  .up-8e26 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .video_e11e,
  .tabs_up_1172 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .border-gas-7324,
  .carousel_72cf,
  .text-left-74c7,
  .info-d724,
  .medium_35ec,
  .complex_5da1,
  .outline-b4d8 {
    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 */
  .input-selected-7330,
  .column-75a7,
  .widget-ed39,
  .warm-f11c,
  .outer-e092 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .paragraph_old_545b,
  .popup-39d0,
  .gradient-e23a,
  .overlay_basic_aa28 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .up-3355,
  .cool_2895 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .red-996b,
  .list_2310,
  .bronze_f408,
  .label_47d4 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .summary-96c0,
  .menu_af25,
  .message-880a,
  .thick-9289,
  .filter_28e1,
  .solid-a2db {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .input-selected-7330,
  .column-75a7,
  .warm-f11c {
    max-width: none !important;
  }
  
  .accordion-f169 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .paragraph_old_545b {
    font-size: 1.5rem !important;
  }
  
  .popup-39d0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .shade_small_bd5f,
  .focus_e9f3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .gradient-e23a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .shade-mini-4bce {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .steel-64a2 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .input-selected-7330,
  .warm-f11c {
    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: e8cf */
.shadow-element-l5 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.3;
}
