/* ============================================
   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 (.shadow_43fb) is a descendant of
   .shade-hot-c6e4 (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.selected-2877 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper_bb55" 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.border-gas-a682 so it can't cause
   horizontal overflow anyway. */
.tooltip-hot-6c62,
.border_f73b,
.cold_dfb8,
.pattern-ca55,
.hero_static_f88d,
.black_f31d,
.row_500d,
.narrow-90fa,
.thick-0433,
.tertiary_lite_af09,
.active_f44f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .title-current-efc4 {
    padding: 8px 0;
  }
  
  .avatar-ed30 img {
    height: 28px;
    width: auto;
  }
  
  .warm-5186 {
    display: none !important;
  }
  
  .logo_ccd9 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .logo_ccd9 svg {
    width: 14px;
    height: 14px;
  }
  
  .disabled-hard-17f0 {
    padding: 6px;
  }
  
  .notice_advanced_819e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .cold_dfb8,
  .border_f73b,
  .pattern-ca55,
  .hero_static_f88d,
  .highlight_9abb,
  .huge_63dc,
  .bright-6507,
  .pattern_fast_3127,
  .module-wide-326c,
  .list-9b35,
  .table-slow-517a,
  .hot_a0e5 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .popup-hard-6912,
  .highlight_orange_c9bc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .menu-in-53d9,
  .progress_63fc,
  .prev_f283,
  .pagination_074b,
  .liquid_fe79,
  .gallery_72c1,
  .table-under-e933 {
    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 */
  .list-next-6481,
  .sidebar-pressed-8861,
  .picture-narrow-48c9,
  .gradient-fixed-bd96,
  .notice-last-7a36 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .lower_aa98,
  .status-clean-1eb6,
  .row_light_b4bd,
  .table_right_9ba9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .new-d158,
  .cool_4728 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .smooth-7b62,
  .gradient-b358,
  .image-up-2d83,
  .highlight_simple_7ebf {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .fresh-41aa,
  .background_complex_4ecd,
  .west_5c34,
  .slider-dynamic-a0a8,
  .thumbnail-6b90,
  .static-5849 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .list-next-6481,
  .sidebar-pressed-8861,
  .gradient-fixed-bd96 {
    max-width: none !important;
  }
  
  .wrapper_bb55 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .lower_aa98 {
    font-size: 1.5rem !important;
  }
  
  .status-clean-1eb6 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .active-fresh-cca8,
  .list_8aac {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .row_light_b4bd {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .focus_38ef {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gas-448b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .list-next-6481,
  .gradient-fixed-bd96 {
    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: b438 */
.shadow-element-t4 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.3;
}
