/* ============================================
   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 (.paragraph-dd20) is a descendant of
   .nav-dd8c (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.simple-c9d7 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".filter-fluid-e505" 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.outer-a866 so it can't cause
   horizontal overflow anyway. */
.over-f823,
.surface-2a5f,
.search_north_258b,
.top-3ade,
.disabled_e641,
.message-static-2fbd,
.mask-0208,
.frame_copper_4f3c,
.notification-plasma-06b2,
.media-e002,
.surface_49e1 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .orange-ab4b {
    padding: 8px 0;
  }
  
  .badge_bright_dc74 img {
    height: 28px;
    width: auto;
  }
  
  .form_simple_92b3 {
    display: none !important;
  }
  
  .video-white-26f2 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .video-white-26f2 svg {
    width: 14px;
    height: 14px;
  }
  
  .hovered_549c {
    padding: 6px;
  }
  
  .background_purple_cf5c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .search_north_258b,
  .surface-2a5f,
  .top-3ade,
  .disabled_e641,
  .pro_ca29,
  .popup-1b25,
  .modal-7ac6,
  .widget-east-6ae3,
  .primary_d5af,
  .overlay_9a2e,
  .glass-e9e8,
  .primary_black_3347 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .east_4081,
  .green_3c61 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .mask-8e55,
  .container_static_fedd,
  .item_next_4ac7,
  .accent_f954,
  .pink-8b5b,
  .paper-16f3,
  .border-9b16 {
    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 */
  .huge_2de3,
  .dynamic_aaa6,
  .feature-small-9ca4,
  .hard_c71d,
  .avatar-2cce {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .hero_04c5,
  .basic_f0f7,
  .column-rough-f772,
  .hovered-aecc {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .border_fast_9ee8,
  .gallery_20e1 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .footer_6296,
  .column-7181,
  .button_middle_4531,
  .clean_aaed {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .shade-iron-205c,
  .middle_9822,
  .out-8e7b,
  .video-3b6c,
  .paragraph_focused_8785,
  .badge-b46f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .huge_2de3,
  .dynamic_aaa6,
  .hard_c71d {
    max-width: none !important;
  }
  
  .filter-fluid-e505 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .hero_04c5 {
    font-size: 1.5rem !important;
  }
  
  .basic_f0f7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .row_mini_b9e2,
  .label_fixed_ea8a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .column-rough-f772 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .background_focused_02d8 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .paper_46d0 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .huge_2de3,
  .hard_c71d {
    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: 25cd */
.ghost-box-l8 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.2;
}
