/* ============================================
   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 (.hero_22f2) is a descendant of
   .layout_9ec4 (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.warm-c8fe {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".badge-hovered-66c5" 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_c603 so it can't cause
   horizontal overflow anyway. */
.badge_0ba4,
.outline_d98e,
.right_2ce4,
.white-103a,
.button_copper_3fb3,
.slow-c16a,
.outline_42bd,
.east-6e35,
.background_3e7f,
.gas_d977,
.disabled_8cad {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .paragraph_d191 {
    padding: 8px 0;
  }
  
  .notification_medium_940b img {
    height: 28px;
    width: auto;
  }
  
  .steel-62d8 {
    display: none !important;
  }
  
  .outline_top_ed92 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .outline_top_ed92 svg {
    width: 14px;
    height: 14px;
  }
  
  .hovered_54c6 {
    padding: 6px;
  }
  
  .hover-a78a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .right_2ce4,
  .outline_d98e,
  .white-103a,
  .button_copper_3fb3,
  .pattern_yellow_dfe2,
  .button_medium_6076,
  .inner_7b32,
  .menu_focused_544b,
  .right_9e6f,
  .tabs-8d79,
  .last-2fd6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .fluid-60ec,
  .gallery-smooth-6443 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .summary-static-7563,
  .layout-middle-67f0,
  .background_glass_6cc6,
  .secondary_4a39,
  .dark-7d0b,
  .caption-north-c9cb,
  .avatar_4fe1 {
    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 */
  .hard-1ff2,
  .image-51f9,
  .breadcrumb_a274,
  .accordion_iron_9856,
  .carousel-64e8 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .first-38d0,
  .search_brown_01cd,
  .disabled_cdb7,
  .wrapper_full_2023 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .shade-fdb7,
  .menu-dark-8965 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .right-71e0,
  .large_045b,
  .hard_96fc,
  .container_glass_5204 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .title_c4b7,
  .green_a77c,
  .accordion_lower_de8e,
  .icon-right-eec0,
  .lite_f15a,
  .link_f1bb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hard-1ff2,
  .image-51f9,
  .accordion_iron_9856 {
    max-width: none !important;
  }
  
  .badge-hovered-66c5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .first-38d0 {
    font-size: 1.5rem !important;
  }
  
  .search_brown_01cd {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .backdrop_slow_78da,
  .disabled-red-29da {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .disabled_cdb7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .red-9083 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .notice_tall_c7ac {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hard-1ff2,
  .accordion_iron_9856 {
    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: 9080 */
.shadow-element-k2 {
  padding: 0.1rem;
  font-size: 12px;
  line-height: 1.1;
}
