/* ============================================
   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 (.list_current_3d3a) is a descendant of
   .left-0f41 (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.
   Two site templates coexist: legacy obfuscated-class (header.surface-8272)
   and the redesigned template (header.slider-solid-1d82). Keep both selectors. */
header.surface-8272,
header.slider-solid-1d82 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".aside-9c7a" 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.full_2467 so it can't cause
   horizontal overflow anyway. */
.paragraph_stone_ee9c,
.plasma_9fc8,
.up_7ada,
.under-a1ec,
.solid_20e2,
.slider_0f7c,
.cold_3a20,
.down_aaa3,
.in-de3c,
.input_fast_0727,
.breadcrumb-4df4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .panel_light_f0e5 {
    padding: 8px 0;
  }
  
  .sidebar-fixed-475d img {
    height: 28px;
    width: auto;
  }
  
  .silver_e9c2 {
    display: none !important;
  }
  
  .hard-a2cb {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hard-a2cb svg {
    width: 14px;
    height: 14px;
  }
  
  .solid-a118 {
    padding: 6px;
  }
  
  .chip-lite-c3cc {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .up_7ada,
  .plasma_9fc8,
  .under-a1ec,
  .solid_20e2,
  .filter_59f1,
  .black-850c,
  .hovered-d34b,
  .disabled_center_f585,
  .notification_red_ed6e,
  .hovered-fd44,
  .title-1153,
  .background-0dc4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .sort_8119,
  .backdrop-medium-750b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .link-silver-4a39,
  .article_811d,
  .iron_1805,
  .wrapper-center-9805,
  .card-143e,
  .title_a65c,
  .out-ca09 {
    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 */
  .fluid-649b,
  .menu-bronze-2d8d,
  .search-lower-f03b,
  .hidden_bottom_bf0f,
  .layout_dark_da9c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .popup_ca16,
  .highlight-lower-19b3,
  .secondary_narrow_fcbf,
  .preview-6d54 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .description-cool-1baa,
  .stone_d3bf {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .primary_dc02,
  .layout-3e09,
  .video-f974,
  .feature_orange_d0ee {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .easy-cfd6,
  .action_90e6,
  .inner-6186,
  .info-7dc7,
  .chip_b051,
  .bright-49a1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .fluid-649b,
  .menu-bronze-2d8d,
  .hidden_bottom_bf0f {
    max-width: none !important;
  }
  
  .aside-9c7a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .popup_ca16 {
    font-size: 1.5rem !important;
  }
  
  .highlight-lower-19b3 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .yellow-1abe,
  .tertiary-3714 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .secondary_narrow_fcbf {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .badge-small-c34a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .sidebar_e84f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .fluid-649b,
  .hidden_bottom_bf0f {
    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: 94a5 */
.center_12b9 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}

/* css-noise: d62e */
.phantom-card-t7 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.2;
}
