/* ============================================
   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 (.image_4c3e) is a descendant of
   .easy-6470 (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.summary_south_6552 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".chip-outer-2cae" 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.paragraph-out-992f so it can't cause
   horizontal overflow anyway. */
.focused-470f,
.banner-fluid-ed37,
.tag_over_131b,
.hot_c0f1,
.list-815e,
.hover_purple_d1c9,
.highlight_1ad7,
.inner-6288,
.menu-f2df,
.smooth-2432,
.label_active_43e2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .middle_5fc4 {
    padding: 8px 0;
  }
  
  .input_full_e8d4 img {
    height: 28px;
    width: auto;
  }
  
  .popup_75fd {
    display: none !important;
  }
  
  .cool_8ad7 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cool_8ad7 svg {
    width: 14px;
    height: 14px;
  }
  
  .easy-1d91 {
    padding: 6px;
  }
  
  .motion-934c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tag_over_131b,
  .banner-fluid-ed37,
  .hot_c0f1,
  .list-815e,
  .disabled-purple-9d78,
  .container-tiny-ec56,
  .grid_hovered_2ae5,
  .pressed_0a73,
  .mini_a0db,
  .preview-d0fe,
  .label_west_466a,
  .grid-glass-c50f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .accent_53f3,
  .form-rough-7e75 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .layout_335f,
  .focus_66d0,
  .feature_easy_7e2b,
  .west_47bc,
  .status_inner_9c52,
  .photo_d102,
  .avatar-upper-4176 {
    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 */
  .chip_17a6,
  .static_856e,
  .first_ba27,
  .purple_c7a3,
  .brown_9101 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .center_5de3,
  .inner_cd6c,
  .selected_2d66,
  .steel_c091 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .column-hard-4785,
  .backdrop_stale_eb01 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .primary-hard-25c0,
  .hero_6f98,
  .title_center_f462,
  .feature-selected-fc81 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .card_wide_8f8a,
  .modal_2d1e,
  .logo_brown_9afd,
  .west-64fa,
  .detail-blue-22f7,
  .middle-036d {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .chip_17a6,
  .static_856e,
  .purple_c7a3 {
    max-width: none !important;
  }
  
  .chip-outer-2cae {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .center_5de3 {
    font-size: 1.5rem !important;
  }
  
  .inner_cd6c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .column-1000,
  .card-middle-6615 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .selected_2d66 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .out-9be1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .lite-980e {
    width: 140px !important;
    height: 140px !important;
  }
}

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