/* ============================================
   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 (.section_c44f) is a descendant of
   .upper-9eb3 (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.panel-down-b386 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".block_2b1d" 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.chip-pro-a8d8 so it can't cause
   horizontal overflow anyway. */
.clean_fda1,
.tag-complex-2a67,
.west_4006,
.column_a8ee,
.input_advanced_23bd,
.hard-4c87,
.hover-cfae,
.lite_eab3,
.menu-warm-5a6f,
.secondary-1706,
.layout_3d4f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hero-motion-d49e {
    padding: 8px 0;
  }
  
  .caption-7ea6 img {
    height: 28px;
    width: auto;
  }
  
  .item_new_ff18 {
    display: none !important;
  }
  
  .blue_a7e4 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .blue_a7e4 svg {
    width: 14px;
    height: 14px;
  }
  
  .easy_46fc {
    padding: 6px;
  }
  
  .summary_blue_760c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .west_4006,
  .tag-complex-2a67,
  .column_a8ee,
  .input_advanced_23bd,
  .paragraph_copper_6fcb,
  .dark_6b7b,
  .disabled_85e2,
  .wide-b377,
  .lower_ea31,
  .info_paper_a732,
  .paragraph_5e24 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .pressed_0cd8,
  .nav-5ebf {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tertiary_b49a,
  .blue-bad4,
  .text_simple_f3ca,
  .mini-c322,
  .list-tall-5a20,
  .short-436e,
  .hover-top-b099 {
    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 */
  .hover_4918,
  .easy-f790,
  .content_1a2d,
  .title_3f14,
  .focus_50cf {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .info-hot-140d,
  .container-huge-c136,
  .cool-d954,
  .main_hard_1f32 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .row_up_4915,
  .hot-d7b4 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .aside_bb17,
  .border_center_8e21,
  .light-27be,
  .info-073e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .highlight-simple-fccd,
  .easy_024a,
  .caption-focused-6d4d,
  .main_2492,
  .thumbnail_complex_b4f5,
  .border-motion-e800 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .hover_4918,
  .easy-f790,
  .title_3f14 {
    max-width: none !important;
  }
  
  .block_2b1d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .info-hot-140d {
    font-size: 1.5rem !important;
  }
  
  .container-huge-c136 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .text-slow-3676,
  .wrapper_9bbd {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .cool-d954 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .preview_8447 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hover-e431 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .hover_4918,
  .title_3f14 {
    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: 47cc */
.widget-item-i3 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
