/* ============================================
   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-0f28) is a descendant of
   .outer-e0cb (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.last-ee2f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".text-paper-672e" 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.liquid_b39b so it can't cause
   horizontal overflow anyway. */
.panel-hard-3c10,
.cold_3e05,
.filter_current_81f9,
.block_plasma_fdd2,
.pressed-d257,
.alert_839b,
.steel-46d1,
.medium-68ee,
.action-fd90,
.text_full_9b11,
.smooth-2878 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .title_13a5 {
    padding: 8px 0;
  }
  
  .main_last_3ca0 img {
    height: 28px;
    width: auto;
  }
  
  .column-focused-2c52 {
    display: none !important;
  }
  
  .info-hovered-79a1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .info-hovered-79a1 svg {
    width: 14px;
    height: 14px;
  }
  
  .module_center_75e1 {
    padding: 6px;
  }
  
  .badge_bright_c844 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .filter_current_81f9,
  .cold_3e05,
  .block_plasma_fdd2,
  .pressed-d257,
  .video-brown-48c8,
  .section_hard_4ada,
  .tooltip_plasma_55bd,
  .main-fluid-84fd,
  .tertiary-gas-b8ce,
  .heading_7053,
  .breadcrumb-gold-bb69,
  .popup_silver_70ff {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .content-static-f973,
  .outer-5251 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .shade_purple_38f0,
  .header-b11a,
  .secondary-ade1,
  .dropdown-large-0dd3,
  .video-b873,
  .image_d759,
  .footer-warm-a2f8 {
    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 */
  .silver_2bb3,
  .message-5428,
  .old-c0b7,
  .video_3852,
  .gradient-next-34b6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .nav-57dc,
  .alert-95b6,
  .old_33ec,
  .grid_eb6a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .cool-9b36,
  .accordion-9183 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .sort_outer_841d,
  .popup_dark_e2eb,
  .plasma_d808,
  .hard_f9e6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hero_3a2d,
  .banner_gold_d906,
  .thumbnail-1c71,
  .hero-9f6a,
  .green_8033,
  .pressed_0f93 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .silver_2bb3,
  .message-5428,
  .video_3852 {
    max-width: none !important;
  }
  
  .text-paper-672e {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .nav-57dc {
    font-size: 1.5rem !important;
  }
  
  .alert-95b6 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .south_e2f8,
  .heading-8438 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .old_33ec {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .backdrop_fast_7d4e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .media_south_6642 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .silver_2bb3,
  .video_3852 {
    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: 1f77 */
.phantom-card-t0 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
