/* ============================================
   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 (.complex_7776) is a descendant of
   .accordion_e06e (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.chip-ab35 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".lite_7fc8" 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.huge_1ac5 so it can't cause
   horizontal overflow anyway. */
.secondary-hovered-e6c0,
.popup-08cd,
.complex-9b11,
.gold-d02e,
.heading_8907,
.picture-e7a8,
.solid-c1b9,
.accent_f75b,
.modal_advanced_50e1,
.heading-blue-e3a7,
.cool_92ac {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pressed_b3b0 {
    padding: 8px 0;
  }
  
  .warm-8328 img {
    height: 28px;
    width: auto;
  }
  
  .row-white-5fea {
    display: none !important;
  }
  
  .label-b7ca {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .label-b7ca svg {
    width: 14px;
    height: 14px;
  }
  
  .dim-35f8 {
    padding: 6px;
  }
  
  .static-b63c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .complex-9b11,
  .popup-08cd,
  .gold-d02e,
  .heading_8907,
  .panel-ea71,
  .soft-6f25,
  .section_9cb7,
  .component_008a,
  .caption-93d6,
  .button_0844,
  .center_8bd2,
  .summary-paper-b758 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .image-simple-c3be,
  .west-aeef {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .popup_out_f83b,
  .action_50e4,
  .box-lower-4d39,
  .card-1be0,
  .selected-025f,
  .motion_e650,
  .layout-first-bbc5 {
    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_39d2,
  .breadcrumb-next-7da5,
  .middle_7cdd,
  .north_333d,
  .gas_c7bb {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .section-wide-35e3,
  .pro-478c,
  .tag-bronze-2588,
  .purple-5217 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .over_deeb,
  .shadow_3a11 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .info_medium_fe56,
  .texture_2d21,
  .feature_a6bf,
  .table_b7d7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .box-76ff,
  .row_e82c,
  .hover-67b6,
  .outline-ffe9,
  .highlight-full-cf83,
  .notice_dark_eaa9 {
    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_39d2,
  .breadcrumb-next-7da5,
  .north_333d {
    max-width: none !important;
  }
  
  .lite_7fc8 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .section-wide-35e3 {
    font-size: 1.5rem !important;
  }
  
  .pro-478c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .easy-2b0c,
  .top_9d73 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tag-bronze-2588 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .silver_f47e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .detail-hot-d4bd {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .bright_39d2,
  .north_333d {
    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: a79f */
.widget-item-a8 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.0;
}
