/* ============================================
   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 (.filter_d7f7) is a descendant of
   .chip-easy-7379 (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.button-7ce3 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".article_easy_4ec9" 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.shade_ffa8 so it can't cause
   horizontal overflow anyway. */
.accordion_hovered_ce75,
.down-bc16,
.tooltip-north-f00a,
.feature_c632,
.sidebar_under_bcc4,
.motion-a3c1,
.tall-f693,
.fluid-3899,
.layout-dirty-1cf2,
.texture-copper-658c,
.text_36ee {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .pagination-inner-ecd1 {
    padding: 8px 0;
  }
  
  .green-2e90 img {
    height: 28px;
    width: auto;
  }
  
  .breadcrumb-left-86c5 {
    display: none !important;
  }
  
  .full-3782 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .full-3782 svg {
    width: 14px;
    height: 14px;
  }
  
  .tertiary_fresh_6869 {
    padding: 6px;
  }
  
  .black_0c26 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tooltip-north-f00a,
  .down-bc16,
  .feature_c632,
  .sidebar_under_bcc4,
  .huge_f2cf,
  .banner_upper_e1b4,
  .dropdown_advanced_25a7,
  .border_basic_dfec,
  .message_6a23,
  .status-ea9d,
  .accordion_dark_5dac {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .wide-c4a0,
  .summary-8cb6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .module-lite-ee78,
  .yellow-3c9f,
  .background-up-b035,
  .modal_lower_b37b,
  .soft-cae5,
  .huge_d131,
  .backdrop-paper-2aaa {
    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 */
  .tabs-narrow-0f0c,
  .gradient-da19,
  .accordion-762c,
  .table-upper-f416,
  .primary_080f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .copper-e008,
  .shade_left_c7b6,
  .easy-c809,
  .icon_gold_00e2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .summary-8370,
  .widget_61bc {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .description-liquid-3ac8,
  .status-white-88df,
  .module-d116,
  .link_3d9f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .heading-3676,
  .narrow-78b6,
  .iron_0f12,
  .carousel-silver-e0b5,
  .stale_892c,
  .info-new-4a95 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tabs-narrow-0f0c,
  .gradient-da19,
  .table-upper-f416 {
    max-width: none !important;
  }
  
  .article_easy_4ec9 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .copper-e008 {
    font-size: 1.5rem !important;
  }
  
  .shade_left_c7b6 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .cold_dc29,
  .disabled_285c {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .easy-c809 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .bottom-629f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .fluid_93dd {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tabs-narrow-0f0c,
  .table-upper-f416 {
    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: 2f93 */
.ghost-box-g0 {
  padding: 0.3rem;
  font-size: 13px;
  line-height: 1.0;
}
