/* ============================================
   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 (.pattern-55cf) is a descendant of
   .input-6c25 (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.search_977c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".highlight-e7c1" 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.article-f578 so it can't cause
   horizontal overflow anyway. */
.rough_5f22,
.header-e1e3,
.column-under-b098,
.static-b4f7,
.accordion_da86,
.widget_3ca6,
.steel-5775,
.orange-952b,
.motion-af1d,
.wide_71b2,
.south-2d32 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .feature_f50a {
    padding: 8px 0;
  }
  
  .element_0600 img {
    height: 28px;
    width: auto;
  }
  
  .tag_f4b7 {
    display: none !important;
  }
  
  .outline_orange_a851 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .outline_orange_a851 svg {
    width: 14px;
    height: 14px;
  }
  
  .photo_plasma_d4a7 {
    padding: 6px;
  }
  
  .slider-7fe5 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .column-under-b098,
  .header-e1e3,
  .static-b4f7,
  .accordion_da86,
  .item_red_0f4c,
  .pro_9f8a,
  .active_bd06,
  .panel_bfa8,
  .primary_middle_5b4c,
  .stale-fa6a,
  .module_331f,
  .next_6212 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .brown-583b,
  .east-b2e2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .modal_stone_fea9,
  .bottom_ea9e,
  .prev-7611,
  .button-top-22d7,
  .border-selected-1351,
  .text-cfdf,
  .tertiary_plasma_53c6 {
    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 */
  .link_basic_265f,
  .dropdown-57a5,
  .video_5bfa,
  .north_2f6d,
  .disabled-6466 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .panel-stone-21ac,
  .pro_fe94,
  .form-warm-4194,
  .main_4a6b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .right_5c75,
  .logo-selected-d44e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .selected_4350,
  .backdrop-ca16,
  .surface-183a,
  .lower_67f4 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .advanced-4bbe,
  .content-0921,
  .orange_ce3b,
  .feature_first_6b37,
  .middle_ce7e,
  .clean_d7e0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .link_basic_265f,
  .dropdown-57a5,
  .north_2f6d {
    max-width: none !important;
  }
  
  .highlight-e7c1 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .panel-stone-21ac {
    font-size: 1.5rem !important;
  }
  
  .pro_fe94 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .shade_center_bd5d,
  .frame-2ae4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .form-warm-4194 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .preview_right_61ee {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tooltip-2f35 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .link_basic_265f,
  .north_2f6d {
    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: e839 */
.ghost-box-u6 {
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.1;
}
