/* ============================================
   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_slow_d129) is a descendant of
   .progress-full-9334 (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.bronze-d900 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame-d1dd" 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.pattern_cb21 so it can't cause
   horizontal overflow anyway. */
.pro_46c8,
.accent-72e6,
.shadow-upper-609c,
.list-motion-7997,
.right-36a4,
.alert-46e1,
.first_0c18,
.focus-211f,
.slider-2b00,
.static_a4e3,
.module_iron_cd15 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .avatar_north_81c5 {
    padding: 8px 0;
  }
  
  .shade_bfc2 img {
    height: 28px;
    width: auto;
  }
  
  .overlay_fast_7331 {
    display: none !important;
  }
  
  .surface_cold_33ad {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .surface_cold_33ad svg {
    width: 14px;
    height: 14px;
  }
  
  .video-narrow-ba32 {
    padding: 6px;
  }
  
  .grid_1a4f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .shadow-upper-609c,
  .accent-72e6,
  .list-motion-7997,
  .right-36a4,
  .secondary_upper_20ea,
  .slider_3c19,
  .title-d279,
  .title_action_690c,
  .detail-8ce5,
  .fluid-a753,
  .steel-4b31 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .detail-c220,
  .pink_674e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gradient-d78e,
  .media_upper_2afe,
  .row-center-43b6,
  .pattern-dim-0de9,
  .badge_681a,
  .plasma_f987,
  .highlight-static-a907 {
    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 */
  .up_90b4,
  .list-fc9c,
  .card_05f8,
  .media-2dc6,
  .basic_85de {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .notification-stone-600d,
  .gold_68a2,
  .left-f18d,
  .narrow-847d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .feature-194c,
  .thick-a02a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .iron-d62e,
  .over_39b7,
  .complex_a607,
  .hovered_a338 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dark-faa1,
  .mask_complex_70cf,
  .accordion-tall-8f62,
  .hovered_071f,
  .copper-357d,
  .dropdown_motion_800e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .up_90b4,
  .list-fc9c,
  .media-2dc6 {
    max-width: none !important;
  }
  
  .frame-d1dd {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .notification-stone-600d {
    font-size: 1.5rem !important;
  }
  
  .gold_68a2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .avatar_outer_f967,
  .text-5b01 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .left-f18d {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .dynamic_9476 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .west-2308 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .up_90b4,
  .media-2dc6 {
    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: 61af */
.phantom-card-b9 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.0;
}
