/* ============================================
   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 (.left-2587) is a descendant of
   .soft-573f (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.cold-f33b {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".disabled_slow_207a" 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.wood_b258 so it can't cause
   horizontal overflow anyway. */
.full_e7d6,
.accent-cold-615e,
.paragraph_f9c2,
.heading-0fbf,
.tooltip_clean_6a51,
.caption-inner-95f1,
.selected-4a01,
.feature_900f,
.overlay-1a83,
.icon-5217,
.active-d2a9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .out_2a1e {
    padding: 8px 0;
  }
  
  .picture-narrow-fde9 img {
    height: 28px;
    width: auto;
  }
  
  .left-86fe {
    display: none !important;
  }
  
  .grid_static_d15a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .grid_static_d15a svg {
    width: 14px;
    height: 14px;
  }
  
  .focused_49c1 {
    padding: 6px;
  }
  
  .link_6938 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .paragraph_f9c2,
  .accent-cold-615e,
  .heading-0fbf,
  .tooltip_clean_6a51,
  .disabled-north-067b,
  .glass-f465,
  .description_prev_5858,
  .filter-f620,
  .detail-ac9c,
  .search_dark_1f15,
  .notification_5421,
  .input-paper-d881 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .icon-simple-8777,
  .chip_8d7f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .fluid-0293,
  .easy-f297,
  .preview_b031,
  .highlight_1dc6,
  .tabs-c4bd,
  .breadcrumb_outer_16ac,
  .backdrop_177b {
    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 */
  .bright-7da9,
  .black_196d,
  .card_eb71,
  .black_3510,
  .image-ade5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .text-ba71,
  .border_upper_1d7a,
  .feature_red_f4c4,
  .dynamic_9a97 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .box_3c55,
  .solid_f76a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .menu-9788,
  .shadow-d806,
  .media-1619,
  .block_dim_2ab8 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tag_cfd6,
  .link_wide_25d4,
  .logo-d915,
  .module-under-bca8,
  .menu-green-934e,
  .module_7d13 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .bright-7da9,
  .black_196d,
  .black_3510 {
    max-width: none !important;
  }
  
  .disabled_slow_207a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .text-ba71 {
    font-size: 1.5rem !important;
  }
  
  .border_upper_1d7a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .label-c9c2,
  .label-active-d625 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .feature_red_f4c4 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .hard-2b62 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .caption_next_1c10 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bright-7da9,
  .black_3510 {
    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: c3a1 */
.phantom-card-n6 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
