/* ============================================
   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 (.mini-97e6) is a descendant of
   .hero-old-942d (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.focus-west-c11d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".module_5ed9" 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.inner-b0cd so it can't cause
   horizontal overflow anyway. */
.element_6644,
.iron-2815,
.fast_c6f7,
.slow-b038,
.orange_7eaa,
.accordion-gold-b923,
.summary-8851,
.fresh_37b3,
.cool-192f,
.outer_ceb3,
.backdrop-lower-c33c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .wrapper_8cd5 {
    padding: 8px 0;
  }
  
  .card_small_66b1 img {
    height: 28px;
    width: auto;
  }
  
  .message_in_3a25 {
    display: none !important;
  }
  
  .next_9c61 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .next_9c61 svg {
    width: 14px;
    height: 14px;
  }
  
  .fast_e1b5 {
    padding: 6px;
  }
  
  .bottom_8662 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .fast_c6f7,
  .iron-2815,
  .slow-b038,
  .orange_7eaa,
  .label_yellow_8667,
  .heading_thick_b8bc,
  .filter-6dca,
  .menu-020d,
  .feature-b839,
  .widget-d29c,
  .header_a76a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .thumbnail_pro_518a,
  .list-4939 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .column-new-f12c,
  .table-tall-411e,
  .table-c0d5,
  .column_b444,
  .bottom-3a3c,
  .icon_4a54,
  .narrow-f9a1 {
    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 */
  .down-247c,
  .texture_east_61ed,
  .out-d103,
  .shade_huge_41bc,
  .mask_wide_8e3c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .prev-a743,
  .mask_silver_133e,
  .pro-b578,
  .advanced_7449 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .component_advanced_e2d5,
  .picture_7bb8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .heading-cool-b75c,
  .link_pressed_6035,
  .accent-f296,
  .menu_black_5aab {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .footer_5d26,
  .basic_ad33,
  .summary-purple-bb5e,
  .dim-691e,
  .top_211a,
  .link-hard-2edc {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .down-247c,
  .texture_east_61ed,
  .shade_huge_41bc {
    max-width: none !important;
  }
  
  .module_5ed9 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .prev-a743 {
    font-size: 1.5rem !important;
  }
  
  .mask_silver_133e {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .outline-b6b1,
  .tooltip-short-14a4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .pro-b578 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .widget-narrow-d90d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .input_dim_b568 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .down-247c,
  .shade_huge_41bc {
    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: e26c */
.promo-block-x7 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.3;
}
