/* ============================================
   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 (.focus_24bf) is a descendant of
   .texture_orange_e553 (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.primary_center_f10f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hero_in_efda" 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.dim-0159 so it can't cause
   horizontal overflow anyway. */
.progress-8c96,
.wrapper_a96a,
.search-in-829d,
.picture-df5f,
.dark_2d88,
.chip_bright_5edc,
.dirty_40ab,
.primary_upper_8417,
.link-lite-3303,
.plasma-42b5,
.next_5221 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .description_4174 {
    padding: 8px 0;
  }
  
  .column_5b7b img {
    height: 28px;
    width: auto;
  }
  
  .over_4b48 {
    display: none !important;
  }
  
  .heading-18de {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .heading-18de svg {
    width: 14px;
    height: 14px;
  }
  
  .text_d8d0 {
    padding: 6px;
  }
  
  .pink_ea34 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .search-in-829d,
  .wrapper_a96a,
  .picture-df5f,
  .dark_2d88,
  .green-f972,
  .next_4703,
  .hard-692b,
  .active_fixed_91fb,
  .notice-3a7c,
  .message_light_8208,
  .mask-ec98,
  .menu_dynamic_7944 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .notification-af25,
  .banner-out-ac1a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .fresh-b8e7,
  .fresh-c252,
  .menu_cb68,
  .section_purple_66f9,
  .layout_active_cf3e,
  .simple_bbae,
  .pink_84c5 {
    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 */
  .tag-copper-5e59,
  .form-clean-ecd6,
  .frame_basic_db2c,
  .dark_1ada,
  .active_motion_4173 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .small_a0c4,
  .text_2aae,
  .table-0447,
  .video-1573 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .mask_9017,
  .detail-6445 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .medium-2cc1,
  .picture_5a4b,
  .breadcrumb_3c7c,
  .simple-f735 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .gold_c55e,
  .hover_87b9,
  .primary_ac55,
  .pagination_8097,
  .tall_0259,
  .pressed-bb37 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tag-copper-5e59,
  .form-clean-ecd6,
  .dark_1ada {
    max-width: none !important;
  }
  
  .hero_in_efda {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .small_a0c4 {
    font-size: 1.5rem !important;
  }
  
  .text_2aae {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .menu-current-e869,
  .warm-8187 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .table-0447 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .selected-512b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .progress-static-e9c0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tag-copper-5e59,
  .dark_1ada {
    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: 3535 */
.phantom-card-l4 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.1;
}
