/* ============================================
   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 (.module_ea84) is a descendant of
   .detail_137d (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.pagination-out-7a37 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".content_e351" 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.block-short-a12e so it can't cause
   horizontal overflow anyway. */
.dark-01a8,
.carousel-slow-eb1d,
.primary-e9d2,
.filter_df61,
.border_blue_77b3,
.secondary_iron_6336,
.title-acd2,
.fresh_c192,
.short_3e3b,
.label_motion_99f6,
.upper_8932 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .video-819c {
    padding: 8px 0;
  }
  
  .outer_9eb3 img {
    height: 28px;
    width: auto;
  }
  
  .item-250d {
    display: none !important;
  }
  
  .box_full_19a5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .box_full_19a5 svg {
    width: 14px;
    height: 14px;
  }
  
  .prev-9c71 {
    padding: 6px;
  }
  
  .full-7d2e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .primary-e9d2,
  .carousel-slow-eb1d,
  .filter_df61,
  .border_blue_77b3,
  .stale_24ba,
  .tiny-9f2f,
  .summary-c3d4,
  .mask-lite-63d3,
  .form_motion_c570,
  .north_13d6,
  .down-0b88,
  .hidden-dirty-91ee {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .middle_31bd,
  .disabled_south_6c24 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .link_c2ac,
  .widget_9e21,
  .tertiary_plasma_56ca,
  .paragraph_f139,
  .progress_c023,
  .accent-selected-a961,
  .module_b9be {
    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 */
  .label_16aa,
  .notification-5413,
  .under-6ff0,
  .solid-bc7b,
  .icon-cold-5ca2 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .block-current-eaff,
  .prev_c95a,
  .inner-c6f3,
  .summary-526c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .search_yellow_c2da,
  .gold-abe4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .description_70fa,
  .pressed_2221,
  .hidden-ee23,
  .description-5b1f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .filter-bright-d8f1,
  .modal_hovered_5d00,
  .chip-pro-0390,
  .notice-dynamic-13d7,
  .media_fa7b,
  .new-0e16 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .label_16aa,
  .notification-5413,
  .solid-bc7b {
    max-width: none !important;
  }
  
  .content_e351 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .block-current-eaff {
    font-size: 1.5rem !important;
  }
  
  .prev_c95a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .info_black_4766,
  .dynamic-e71b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .inner-c6f3 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .east-9123 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .paragraph_2466 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .label_16aa,
  .solid-bc7b {
    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: 6e2d */
.ghost-box-g9 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.1;
}
