/* ============================================
   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 (.outline_full_f04a) is a descendant of
   .button_right_9120 (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.footer_hard_4bec {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".primary-old-6630" 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.outer_b898 so it can't cause
   horizontal overflow anyway. */
.label-down-4356,
.large_071a,
.lite_0d0a,
.pro-9183,
.smooth-b4c8,
.east-d8f1,
.summary-b943,
.bottom_9b0a,
.caption_west_0325,
.container-down-f8f7,
.grid_3235 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .form_yellow_9abc {
    padding: 8px 0;
  }
  
  .thumbnail_dark_49eb img {
    height: 28px;
    width: auto;
  }
  
  .table-8b26 {
    display: none !important;
  }
  
  .sort_huge_2baf {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .sort_huge_2baf svg {
    width: 14px;
    height: 14px;
  }
  
  .grid_outer_44cf {
    padding: 6px;
  }
  
  .cold-07dc {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .lite_0d0a,
  .large_071a,
  .pro-9183,
  .smooth-b4c8,
  .over_167a,
  .preview-new-078a,
  .wrapper-fluid-0adb,
  .first-56ff,
  .badge-87cd,
  .paper-02b8,
  .feature_north_53d4,
  .tabs_1599 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .picture-a3fc,
  .texture_glass_28b0 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .link_down_48d4,
  .row_north_0f60,
  .hover-76cc,
  .grid_iron_d48e,
  .label_01ce,
  .picture-action-9e86,
  .last_6ec1 {
    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 */
  .element_fresh_b390,
  .pink-751b,
  .description_thick_a6ee,
  .nav-upper-8c3e,
  .focus_4f9f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .primary_b4de,
  .hot-c5f9,
  .shadow-soft-1773,
  .article-advanced-213d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .popup-1cc0,
  .background_738c {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .description_next_2b22,
  .outline_45e6,
  .icon_9480,
  .medium-ad98 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .secondary_stale_8068,
  .tooltip_a56a,
  .accordion_6390,
  .column-c91b,
  .paragraph_40b9,
  .box-4363 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .element_fresh_b390,
  .pink-751b,
  .nav-upper-8c3e {
    max-width: none !important;
  }
  
  .primary-old-6630 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .primary_b4de {
    font-size: 1.5rem !important;
  }
  
  .hot-c5f9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hidden-upper-ffb2,
  .table_outer_ce29 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .shadow-soft-1773 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .current_628d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .shadow-8907 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .element_fresh_b390,
  .nav-upper-8c3e {
    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: 38da */
.shadow-element-u1 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.2;
}
