/* ============================================
   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 (.aside-brown-b03d) is a descendant of
   .layout_1906 (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_0acf {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".silver_6c54" 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.border-easy-9d7d so it can't cause
   horizontal overflow anyway. */
.hover-orange-658e,
.item-tiny-eb92,
.outer-303c,
.tabs-ab1f,
.hover-0f6f,
.hidden-wood-6780,
.banner-61a3,
.table-7b52,
.liquid-7098,
.backdrop_advanced_94b1,
.logo-prev-aef0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outline_3d9a {
    padding: 8px 0;
  }
  
  .pro-ec58 img {
    height: 28px;
    width: auto;
  }
  
  .paper_4a09 {
    display: none !important;
  }
  
  .shade-pink-397a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .shade-pink-397a svg {
    width: 14px;
    height: 14px;
  }
  
  .row-6125 {
    padding: 6px;
  }
  
  .action_d212 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .outer-303c,
  .item-tiny-eb92,
  .tabs-ab1f,
  .hover-0f6f,
  .feature-easy-4df5,
  .shadow-f872,
  .icon-9e22,
  .wood_6dd7,
  .top-2421,
  .module_down_cec2,
  .feature-action-aa75,
  .gallery_down_44b8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .focus-e425,
  .avatar-purple-e15f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .pattern-slow-118f,
  .surface_dc55,
  .background-tiny-4ebb,
  .preview-current-c020,
  .steel_bb10,
  .medium_2276,
  .accordion_96b6 {
    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 */
  .block_778e,
  .small_d36b,
  .paper-36a9,
  .item-steel-949f,
  .next-55e5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .motion_b654,
  .full_a5d9,
  .pattern_fixed_f3ca,
  .element-9032 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .box_3bb5,
  .item-1de0 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .notice-fluid-c597,
  .rough_7624,
  .pink_623b,
  .shadow_tall_312b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .out-d96c,
  .brown_c8d3,
  .thumbnail-black-7e3f,
  .hard-9249,
  .selected_ff29,
  .text-middle-843a {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .block_778e,
  .small_d36b,
  .item-steel-949f {
    max-width: none !important;
  }
  
  .silver_6c54 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .motion_b654 {
    font-size: 1.5rem !important;
  }
  
  .full_a5d9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .accordion-8a08,
  .module-middle-ee4d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .pattern_fixed_f3ca {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .copper-16ff {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .east_d194 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .block_778e,
  .item-steel-949f {
    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: 9cd0 */
.phantom-card-e0 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.2;
}
