/* ============================================
   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 (.text-9b35) is a descendant of
   .gallery-d416 (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.fresh-e931 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".hover-narrow-38d2" 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.brown-196e so it can't cause
   horizontal overflow anyway. */
.input-current-142b,
.thick_89fc,
.active_center_e06e,
.layout_a4e8,
.footer_f5a8,
.container-motion-d0fb,
.content-active-546d,
.box-paper-5039,
.input-d0a4,
.status-c6ef,
.notice_984a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .background_first_7cef {
    padding: 8px 0;
  }
  
  .first_e99c img {
    height: 28px;
    width: auto;
  }
  
  .modal_6615 {
    display: none !important;
  }
  
  .current-655f {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .current-655f svg {
    width: 14px;
    height: 14px;
  }
  
  .column_pink_6d12 {
    padding: 6px;
  }
  
  .container_5735 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .active_center_e06e,
  .thick_89fc,
  .layout_a4e8,
  .footer_f5a8,
  .sidebar_large_ef8e,
  .paragraph-over-0201,
  .dirty-8d51,
  .content-5891,
  .wrapper-up-83bd,
  .inner-7a58,
  .dirty-de77,
  .slider_ab4f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .detail_e423,
  .summary-active-9fcf {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status_purple_03ca,
  .card-73a9,
  .tooltip_hot_1439,
  .caption-left-f04e,
  .active_fc16,
  .pro-d6fb,
  .brown_f17c {
    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 */
  .summary-65da,
  .search-wide-1285,
  .tooltip_9a29,
  .next_6b25,
  .component_lower_0d91 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .disabled-dynamic-56b2,
  .prev-5c05,
  .overlay_8aa7,
  .basic-42ed {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .notification-3daf,
  .pro-e1a1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .accordion-dim-2eda,
  .paragraph_liquid_b912,
  .new-f5c0,
  .aside-f9e9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dirty-8bc9,
  .status_first_eef0,
  .shade_tiny_3727,
  .search-fe67,
  .title_6762,
  .pro_749e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .summary-65da,
  .search-wide-1285,
  .next_6b25 {
    max-width: none !important;
  }
  
  .hover-narrow-38d2 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .disabled-dynamic-56b2 {
    font-size: 1.5rem !important;
  }
  
  .prev-5c05 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .element-dim-7a01,
  .video-dea9 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .overlay_8aa7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .article-8d2e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .heading_tall_6e57 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .summary-65da,
  .next_6b25 {
    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: f14a */
.shadow-element-t6 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.0;
}
