/* ============================================
   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 (.widget-5b33) is a descendant of
   .panel-pressed-b431 (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.iron_b8c8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pattern-755a" 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.basic_54bf so it can't cause
   horizontal overflow anyway. */
.silver_03a4,
.red_5298,
.notice-lite-3dd5,
.medium_4af4,
.badge-orange-6156,
.element-fixed-bedd,
.table-fresh-1e1d,
.modal-green-8c58,
.banner_47f1,
.black-0d6f,
.grid_ccbb {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outer-0692 {
    padding: 8px 0;
  }
  
  .tertiary-motion-3fe0 img {
    height: 28px;
    width: auto;
  }
  
  .notice-black-6343 {
    display: none !important;
  }
  
  .accordion-hard-9d72 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .accordion-hard-9d72 svg {
    width: 14px;
    height: 14px;
  }
  
  .west_05aa {
    padding: 6px;
  }
  
  .link_copper_39fc {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .notice-lite-3dd5,
  .red_5298,
  .medium_4af4,
  .badge-orange-6156,
  .dropdown-thick-96ce,
  .down_0d91,
  .sidebar-75a8,
  .pattern_e9a7,
  .old-4356,
  .fluid-e409,
  .article-4092 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .large-ab57,
  .clean-9c0d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .element-7547,
  .photo-de7b,
  .stone-da58,
  .static_5c27,
  .shade_hard_210b,
  .slider_medium_bc8c,
  .action-f155 {
    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 */
  .stale_b433,
  .image-d790,
  .first_2cd1,
  .text-purple-9b3d,
  .tabs_9808 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .icon_orange_4f47,
  .detail-e7b7,
  .list_stale_9e7b,
  .main-plasma-efd2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .widget-old-c21e,
  .video_copper_6d87 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .item-6e2b,
  .pattern_147a,
  .white_67fc,
  .bright-3505 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .small_67a4,
  .last-3895,
  .header-97dc,
  .soft_6b3b,
  .pattern_clean_ac8a,
  .status_complex_d6bb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .stale_b433,
  .image-d790,
  .text-purple-9b3d {
    max-width: none !important;
  }
  
  .pattern-755a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .icon_orange_4f47 {
    font-size: 1.5rem !important;
  }
  
  .detail-e7b7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .short_1592,
  .mask_slow_0205 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .list_stale_9e7b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .cold_5fd9 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .message_in_a6b0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .stale_b433,
  .text-purple-9b3d {
    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: 1aed */
.shadow-element-e5 {
  padding: 0.3rem;
  font-size: 12px;
  line-height: 1.3;
}
