/* ============================================
   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 (.liquid_216d) is a descendant of
   .fixed-657c (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.under-ad07 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame_tall_c6c5" 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.stale-aba9 so it can't cause
   horizontal overflow anyway. */
.notification_b610,
.input_cool_122c,
.up-26f6,
.surface-north-8621,
.tag_34a0,
.message_purple_5cc9,
.nav_fb49,
.pink-e35d,
.layout_small_b189,
.large_21f7,
.last_2ce2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .column-9f77 {
    padding: 8px 0;
  }
  
  .box-glass-d9e9 img {
    height: 28px;
    width: auto;
  }
  
  .container_f266 {
    display: none !important;
  }
  
  .video-92ba {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .video-92ba svg {
    width: 14px;
    height: 14px;
  }
  
  .fresh-5dd7 {
    padding: 6px;
  }
  
  .frame-mini-b76a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .up-26f6,
  .input_cool_122c,
  .surface-north-8621,
  .tag_34a0,
  .left_a1ec,
  .table-paper-e116,
  .content-66de,
  .info-fluid-1db8,
  .main-84df,
  .wide-8e20,
  .advanced-659c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .feature-huge-fd56,
  .logo_lower_f65f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .texture_red_b56e,
  .banner_purple_083d,
  .heading_c7ae,
  .accent_d25e,
  .nav-basic-deee,
  .paragraph-4faf,
  .block_43a2 {
    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 */
  .main-9f5e,
  .caption_over_becc,
  .full-bd0c,
  .focused-2e1b,
  .silver-f91a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .over-bbfb,
  .glass_9ce6,
  .filter-up-2470,
  .in-4b1b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .header-80ac,
  .top-6a2f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .frame-motion-be05,
  .summary-1b9c,
  .avatar-2ed9,
  .active-79f5 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .column_903e,
  .red_a3de,
  .mask-fc96,
  .popup_dark_c4f0,
  .main_b283,
  .card_white_86c3 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .main-9f5e,
  .caption_over_becc,
  .focused-2e1b {
    max-width: none !important;
  }
  
  .frame_tall_c6c5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .over-bbfb {
    font-size: 1.5rem !important;
  }
  
  .glass_9ce6 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .footer-5e7c,
  .highlight_medium_c454 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .filter-up-2470 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .backdrop_active_d188 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label_f594 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .main-9f5e,
  .focused-2e1b {
    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: c201 */
.shadow-element-z0 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
