/* ============================================
   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 (.detail-outer-68ba) is a descendant of
   .badge_0df2 (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.widget_ef2f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".orange-be8f" 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.breadcrumb_bf0c so it can't cause
   horizontal overflow anyway. */
.icon-2f9f,
.east-9e3b,
.upper_46d0,
.chip-a369,
.link_stone_bde8,
.gold-1842,
.background-prev-91c4,
.table-hovered-6baf,
.plasma_84d4,
.gradient-8971,
.heading-action-160d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pro_d7ce {
    padding: 8px 0;
  }
  
  .short_6bcf img {
    height: 28px;
    width: auto;
  }
  
  .secondary_bd70 {
    display: none !important;
  }
  
  .message-036c {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .message-036c svg {
    width: 14px;
    height: 14px;
  }
  
  .section-65b0 {
    padding: 6px;
  }
  
  .article-orange-9f33 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .upper_46d0,
  .east-9e3b,
  .chip-a369,
  .link_stone_bde8,
  .info_0873,
  .menu-narrow-be05,
  .under-bd93,
  .solid_36b6,
  .wrapper-68c1,
  .dropdown_smooth_7b94,
  .pro-d94f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outline-center-c11b,
  .block_52c1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .black-be0f,
  .wrapper_8dfb,
  .section-8c63,
  .menu-silver-e725,
  .icon_under_0b13,
  .fresh-5abf,
  .banner_2289 {
    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 */
  .avatar_985d,
  .wrapper_b78e,
  .accent-fast-dc6f,
  .copper-504e,
  .hover_6e74 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .new_649e,
  .notice_f6f0,
  .dirty_250c,
  .text_dynamic_4e58 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .middle-4f5d,
  .caption_first_1f6e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .grid_ebba,
  .new_8ff8,
  .bottom-a2ac,
  .list_east_364e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .center-cf71,
  .gradient_steel_913e,
  .fixed_99d8,
  .breadcrumb-over-ef89,
  .layout_28f7,
  .search_7af6 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .avatar_985d,
  .wrapper_b78e,
  .copper-504e {
    max-width: none !important;
  }
  
  .orange-be8f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .new_649e {
    font-size: 1.5rem !important;
  }
  
  .notice_f6f0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .wrapper_88c4,
  .photo-center-02a3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dirty_250c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .column_a229 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .secondary-1d2c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .avatar_985d,
  .copper-504e {
    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: 292b */
.promo-block-g9 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.2;
}
