/* ============================================
   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 (.avatar_cold_bc4b) is a descendant of
   .border_advanced_b34c (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.in-7c20 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".table_6795" 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-4bcd so it can't cause
   horizontal overflow anyway. */
.text_bottom_ff15,
.link_selected_0473,
.icon-a290,
.gradient-b0d1,
.row_0845,
.element_new_934f,
.row_54ad,
.border-tall-5d28,
.iron-1436,
.block-3ec4,
.outer_2a13 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .description-hard-34ba {
    padding: 8px 0;
  }
  
  .solid_4f28 img {
    height: 28px;
    width: auto;
  }
  
  .frame-north-15d8 {
    display: none !important;
  }
  
  .notice-outer-77b2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .notice-outer-77b2 svg {
    width: 14px;
    height: 14px;
  }
  
  .icon_87ae {
    padding: 6px;
  }
  
  .complex_1ba2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .icon-a290,
  .link_selected_0473,
  .gradient-b0d1,
  .row_0845,
  .nav_7af9,
  .info_prev_6f25,
  .clean_0c78,
  .section_fa43,
  .row_6b11,
  .layout-under-ba96,
  .summary-bottom-7645,
  .tooltip_cool_e9c3 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .filter-inner-b10a,
  .white_b0b8 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .top_cbc5,
  .section_bottom_d4dd,
  .iron_b4f5,
  .upper-68c6,
  .link_fixed_1e28,
  .backdrop_ef3d,
  .south_835c {
    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 */
  .search_huge_d5fc,
  .block-0cd0,
  .notice_7997,
  .frame_tiny_577b,
  .badge_huge_3a4b {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .accordion_thick_b1a1,
  .hero_smooth_6275,
  .carousel-3745,
  .outline-fluid-bade {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .thumbnail_d151,
  .title_first_d657 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .wrapper-6991,
  .west_fa2d,
  .nav-a4c3,
  .component-3865 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .status_c5ef,
  .gallery-78c6,
  .pattern-d5c0,
  .paragraph-4f90,
  .secondary-90b9,
  .over_aabe {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .search_huge_d5fc,
  .block-0cd0,
  .frame_tiny_577b {
    max-width: none !important;
  }
  
  .table_6795 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .accordion_thick_b1a1 {
    font-size: 1.5rem !important;
  }
  
  .hero_smooth_6275 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .huge_197e,
  .white_97fe {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .carousel-3745 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .complex_ad99 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .picture_4851 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .search_huge_d5fc,
  .frame_tiny_577b {
    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: c620 */
.shadow-element-p1 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.0;
}
