/* ============================================
   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 (.disabled-188c) is a descendant of
   .form_880d (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.footer_b8fd {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".info_1608" 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.search-bottom-8634 so it can't cause
   horizontal overflow anyway. */
.notice_a3e1,
.text_full_2a7f,
.clean_9715,
.lower-50b3,
.dropdown_030c,
.inner_03af,
.focus-0454,
.module_stone_dab1,
.modal-0ab8,
.media-1120,
.link-2fbc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outline-f596 {
    padding: 8px 0;
  }
  
  .box-521f img {
    height: 28px;
    width: auto;
  }
  
  .button-5663 {
    display: none !important;
  }
  
  .white-41d9 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .white-41d9 svg {
    width: 14px;
    height: 14px;
  }
  
  .hovered-5642 {
    padding: 6px;
  }
  
  .component-brown-914b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .clean_9715,
  .text_full_2a7f,
  .lower-50b3,
  .dropdown_030c,
  .breadcrumb_wood_2d7b,
  .active-14e8,
  .hidden_north_c191,
  .steel-8447,
  .widget_a5f7,
  .preview_f63c,
  .tooltip_9ffc,
  .rough-ed5d {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .orange_ed15,
  .picture-yellow-af9c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .sidebar_liquid_87ff,
  .content-60cf,
  .primary_under_6d51,
  .footer-green-4796,
  .upper-3e52,
  .photo_65a5,
  .dark-97d5 {
    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 */
  .pink_2246,
  .hard_faa3,
  .cool-5276,
  .caption_29cc,
  .green-68b1 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .logo-fluid-b040,
  .photo-aaaf,
  .purple-776d,
  .media_75a0 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .white_3da7,
  .button-smooth-2516 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .bronze-a8a4,
  .lite_4644,
  .notice_small_077b,
  .short_908c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .wide-68b1,
  .tooltip-d938,
  .photo_9443,
  .alert-e82e,
  .image_16b8,
  .status_fresh_5416 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pink_2246,
  .hard_faa3,
  .caption_29cc {
    max-width: none !important;
  }
  
  .info_1608 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .logo-fluid-b040 {
    font-size: 1.5rem !important;
  }
  
  .photo-aaaf {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gradient_light_9958,
  .hard_96aa {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .purple-776d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .fluid_6f1f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label_f859 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pink_2246,
  .caption_29cc {
    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: 5073 */
.phantom-card-m2 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.2;
}
