/* ============================================
   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 (.component-static-9399) is a descendant of
   .popup_fluid_ec9f (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.sort_bottom_eb73 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".pattern-north-f544" 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.shade-3031 so it can't cause
   horizontal overflow anyway. */
.pressed_bf2d,
.huge-72c6,
.wood_0bce,
.message_plasma_8cf6,
.table_cool_39db,
.tall-6be9,
.lower-6a7d,
.element_efa2,
.in_1bc9,
.simple-9d75,
.detail_62e1 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .header-c8ed {
    padding: 8px 0;
  }
  
  .button_silver_280a img {
    height: 28px;
    width: auto;
  }
  
  .article_c305 {
    display: none !important;
  }
  
  .media-thick-d75e {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .media-thick-d75e svg {
    width: 14px;
    height: 14px;
  }
  
  .background-114e {
    padding: 6px;
  }
  
  .liquid-e094 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .wood_0bce,
  .huge-72c6,
  .message_plasma_8cf6,
  .table_cool_39db,
  .south-2597,
  .block-out-95fa,
  .modal_c694,
  .active-c8a1,
  .focus-red-17ba,
  .section-b622,
  .wide_dcc9,
  .green-c6ff {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .stone-3f40,
  .warm_654d {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hidden_6723,
  .slider_1d92,
  .footer-0846,
  .focused_658f,
  .white_a59c,
  .aside_7d06,
  .yellow_80bc {
    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 */
  .backdrop-south-c8ae,
  .border_ae85,
  .component-fa78,
  .nav_db33,
  .photo-out-5e78 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .smooth_905d,
  .thumbnail-rough-a59f,
  .text-0fa2,
  .huge_34ba {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .lite-0cee,
  .slider-f2fe {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .highlight_center_12bf,
  .slider-glass-f8b6,
  .banner-slow-ecd0,
  .pro-c8b8 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .element_north_adf4,
  .frame-solid-fbed,
  .dark_ad04,
  .icon_b054,
  .frame-yellow-c81a,
  .accent_f2b0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .backdrop-south-c8ae,
  .border_ae85,
  .nav_db33 {
    max-width: none !important;
  }
  
  .pattern-north-f544 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .smooth_905d {
    font-size: 1.5rem !important;
  }
  
  .thumbnail-rough-a59f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .section-iron-c0a0,
  .small-3387 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .text-0fa2 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .alert_a75d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .caption-702b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .backdrop-south-c8ae,
  .nav_db33 {
    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: d26f */
.ghost-box-r9 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.3;
}
