/* ============================================
   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 (.caption-4e92) is a descendant of
   .logo-short-e9ff (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.alert_bronze_d21d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".short-1cad" 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.photo-hovered-5e4c so it can't cause
   horizontal overflow anyway. */
.hot_dfac,
.summary-886b,
.banner_old_a5ec,
.dropdown_north_27f6,
.simple-1895,
.banner_static_1e1c,
.south-7e48,
.full-3aed,
.wide_93ef,
.popup-lower-8bdd,
.frame_pressed_1ebe {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .basic_fe97 {
    padding: 8px 0;
  }
  
  .video-ed77 img {
    height: 28px;
    width: auto;
  }
  
  .texture_ff24 {
    display: none !important;
  }
  
  .rough_4bf5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .rough_4bf5 svg {
    width: 14px;
    height: 14px;
  }
  
  .fluid-5784 {
    padding: 6px;
  }
  
  .pagination-motion-eef5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .banner_old_a5ec,
  .summary-886b,
  .dropdown_north_27f6,
  .simple-1895,
  .secondary-static-1c0d,
  .hot-eb9a,
  .simple_8ae8,
  .avatar-dce3,
  .media_south_1538,
  .soft-652a,
  .footer-f046,
  .north-8ec9 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .dropdown-dirty-0362,
  .new-8cfe {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .summary-706c,
  .header_stone_3a44,
  .image_slow_8c0a,
  .main_tiny_aa7c,
  .notice-12e5,
  .input-prev-f18e,
  .title_0faf {
    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 */
  .huge_4939,
  .list_silver_551f,
  .surface_green_6c0f,
  .avatar-warm-64ed,
  .gradient-top-3103 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .progress_focused_1349,
  .title_green_c711,
  .dropdown_right_8398,
  .preview_b941 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .backdrop-short-4e2d,
  .avatar-aabf {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .backdrop-over-0c4a,
  .slider_7395,
  .chip-2d93,
  .pagination-over-1647 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tertiary_soft_aa3c,
  .filter-white-6d58,
  .thumbnail_out_02ba,
  .link_white_1e97,
  .lite-dad2,
  .hero_red_ab14 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .huge_4939,
  .list_silver_551f,
  .avatar-warm-64ed {
    max-width: none !important;
  }
  
  .short-1cad {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .progress_focused_1349 {
    font-size: 1.5rem !important;
  }
  
  .title_green_c711 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .box_current_c7e6,
  .container_steel_e8d1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .dropdown_right_8398 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .yellow_26e3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .narrow-91cb {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .huge_4939,
  .avatar-warm-64ed {
    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: 528c */
.shadow-element-x5 {
  padding: 0.2rem;
  font-size: 13px;
  line-height: 1.0;
}
