/* ============================================
   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 (.accent-easy-ab14) is a descendant of
   .tertiary-action-9bb2 (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.texture_iron_d291 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".notice_39ea" 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.block-west-7278 so it can't cause
   horizontal overflow anyway. */
.disabled_faf0,
.article-black-b5b6,
.tooltip-842e,
.message-static-558e,
.short_80d7,
.progress-05c0,
.notification_current_1bf3,
.footer-9200,
.element_out_99f5,
.aside-slow-148a,
.rough_f471 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .secondary-7cf2 {
    padding: 8px 0;
  }
  
  .silver_7744 img {
    height: 28px;
    width: auto;
  }
  
  .feature_easy_6861 {
    display: none !important;
  }
  
  .smooth-7d35 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .smooth-7d35 svg {
    width: 14px;
    height: 14px;
  }
  
  .table-plasma-3c2d {
    padding: 6px;
  }
  
  .component-lite-77d0 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tooltip-842e,
  .article-black-b5b6,
  .message-static-558e,
  .short_80d7,
  .bottom_a9ab,
  .center-e021,
  .hard_8323,
  .inner-3910,
  .layout-prev-2652,
  .section_yellow_7f3f,
  .sidebar-21ee,
  .center-3250 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .last_f25b,
  .tabs_east_a0f3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .accordion_bfd8,
  .short-2c1c,
  .stone_1e86,
  .tall_1c2a,
  .slider-simple-6fa1,
  .hover_0695,
  .shade-dirty-4bc0 {
    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 */
  .feature_27f9,
  .active-447c,
  .slow_9ba0,
  .next-52e7,
  .west-3c46 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .row-dynamic-097c,
  .widget-16fc,
  .breadcrumb_5560,
  .progress-9ec9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .in_83ba,
  .up-4e56 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .smooth-6189,
  .title_e8c1,
  .item_first_eb1a,
  .image-old-8a75 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .popup_iron_f623,
  .iron-a1e6,
  .north-063c,
  .title-green-05a1,
  .media_2e3a,
  .light-b250 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .feature_27f9,
  .active-447c,
  .next-52e7 {
    max-width: none !important;
  }
  
  .notice_39ea {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .row-dynamic-097c {
    font-size: 1.5rem !important;
  }
  
  .widget-16fc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .button_large_50d2,
  .yellow-9c18 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .breadcrumb_5560 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .container-pink-8773 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .grid_15b3 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .feature_27f9,
  .next-52e7 {
    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: 23aa */
.widget-item-v1 {
  padding: 0.4rem;
  font-size: 14px;
  line-height: 1.2;
}
