/* ============================================
   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 (.disabled_1913) is a descendant of
   .next-9653 (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.mask-narrow-63ee {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".thumbnail_44c3" 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.info-2ae8 so it can't cause
   horizontal overflow anyway. */
.shadow-gold-bbb7,
.picture_669e,
.gas_9965,
.label_713c,
.article-ef6e,
.in-6394,
.outline-selected-3471,
.notice-mini-9e74,
.modal-purple-b0f7,
.widget-ea43,
.header_dd50 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .accordion-light-7831 {
    padding: 8px 0;
  }
  
  .warm_f104 img {
    height: 28px;
    width: auto;
  }
  
  .green-5b9f {
    display: none !important;
  }
  
  .motion-8f72 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .motion-8f72 svg {
    width: 14px;
    height: 14px;
  }
  
  .search_solid_a4db {
    padding: 6px;
  }
  
  .yellow_c07d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .gas_9965,
  .picture_669e,
  .label_713c,
  .article-ef6e,
  .light_67af,
  .search-98bf,
  .complex-7024,
  .button_5daf,
  .full-6088,
  .hero_wide_ee4e,
  .widget_49d8,
  .focus-96f5 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .solid-862d,
  .filter-054b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .north-34bf,
  .pagination_c9f6,
  .column_warm_5b5c,
  .footer-mini-c97e,
  .black-dbfa,
  .backdrop_feae,
  .element-warm-2a96 {
    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 */
  .hero_6d52,
  .paper-75ca,
  .center-ac3d,
  .filter_dynamic_426b,
  .list_black_b05d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .logo-west-9606,
  .description-red-4ff5,
  .advanced-c4bf,
  .tooltip_upper_54af {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .notification_basic_638c,
  .panel_71bc {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .modal_cold_137c,
  .notice-4445,
  .form_6c98,
  .selected_d170 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .content_d30c,
  .tiny_61cf,
  .summary_dynamic_eb1d,
  .backdrop_9bd4,
  .backdrop-1407,
  .row-complex-dc13 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hero_6d52,
  .paper-75ca,
  .filter_dynamic_426b {
    max-width: none !important;
  }
  
  .thumbnail_44c3 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .logo-west-9606 {
    font-size: 1.5rem !important;
  }
  
  .description-red-4ff5 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .shadow_92a0,
  .icon_1ee1 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .advanced-c4bf {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .filter-out-79b0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .frame-feef {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hero_6d52,
  .filter_dynamic_426b {
    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: d41a */
.phantom-card-r5 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.1;
}
