/* ============================================
   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 (.dropdown_3dfd) is a descendant of
   .heading-64aa (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.active-55df {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".image_stale_b7a6" 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.panel_rough_cd9b so it can't cause
   horizontal overflow anyway. */
.carousel-yellow-b10d,
.hover-wide-e9a8,
.pagination_199b,
.hard-831a,
.item-c6a8,
.progress_tall_6bf2,
.notification_inner_c966,
.white_399a,
.nav-a349,
.gas_d275,
.picture_north_6c71 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .menu-20c6 {
    padding: 8px 0;
  }
  
  .motion-758b img {
    height: 28px;
    width: auto;
  }
  
  .row_under_0b34 {
    display: none !important;
  }
  
  .focus_full_a4f8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .focus_full_a4f8 svg {
    width: 14px;
    height: 14px;
  }
  
  .search-fast-1708 {
    padding: 6px;
  }
  
  .button-red-2b78 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pagination_199b,
  .hover-wide-e9a8,
  .hard-831a,
  .item-c6a8,
  .outer_9c79,
  .hover_22b2,
  .hover-936c,
  .badge_stale_44c6,
  .main_basic_f88b,
  .shadow_complex_7d39,
  .narrow-732b,
  .status-yellow-14c8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .smooth_5abb,
  .form-hard-a910 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title-liquid-9e3d,
  .narrow-fa02,
  .accent_1d84,
  .caption-over-a186,
  .accent-hovered-d73a,
  .message-fbbd,
  .soft_7083 {
    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 */
  .dark-dccc,
  .simple_b85b,
  .under-563f,
  .image_thick_8e28,
  .large_9edd {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .list-narrow-0581,
  .accent_slow_73c2,
  .slow-1531,
  .texture_stone_6e05 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .slider-b67e,
  .bright-c811 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .nav_yellow_d14b,
  .dropdown-3a26,
  .progress_outer_c660,
  .tertiary-6b73 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .secondary_5e2c,
  .fresh_f945,
  .center-1edc,
  .photo-current-8c2b,
  .block_cefd,
  .paper-1e69 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .dark-dccc,
  .simple_b85b,
  .image_thick_8e28 {
    max-width: none !important;
  }
  
  .image_stale_b7a6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .list-narrow-0581 {
    font-size: 1.5rem !important;
  }
  
  .accent_slow_73c2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .column_prev_8f56,
  .panel-dynamic-2614 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .slow-1531 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .background_1af0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .gradient-lower-99e7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .dark-dccc,
  .image_thick_8e28 {
    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: 149c */
.phantom-card-r2 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.1;
}
