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

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper-down-52bf" 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.notification-blue-6ad0 so it can't cause
   horizontal overflow anyway. */
.backdrop_7df6,
.item-2199,
.shadow_basic_d771,
.avatar_e3f7,
.hero_dec8,
.primary-basic-a832,
.box-3763,
.dirty_1600,
.article_6dfc,
.in_2db0,
.blue-5c9f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .modal_738e {
    padding: 8px 0;
  }
  
  .warm_fc01 img {
    height: 28px;
    width: auto;
  }
  
  .tertiary_first_0f60 {
    display: none !important;
  }
  
  .secondary-plasma-573a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .secondary-plasma-573a svg {
    width: 14px;
    height: 14px;
  }
  
  .short_325f {
    padding: 6px;
  }
  
  .plasma_ceea {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .shadow_basic_d771,
  .item-2199,
  .avatar_e3f7,
  .hero_dec8,
  .gold_4a5b,
  .focus_hovered_0e40,
  .status_liquid_ffef,
  .center-e86f,
  .primary_1dd8,
  .dropdown-complex-dc5e,
  .layout-up-043a,
  .text_clean_aab2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .short_2400,
  .summary_adb1 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .smooth_a49b,
  .card-6721,
  .container-2c2e,
  .video-mini-36e0,
  .outline-orange-8c03,
  .cold-0f2c,
  .paragraph_gold_aaa0 {
    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 */
  .narrow_be93,
  .modal-fd04,
  .button-smooth-7fea,
  .list-lower-67be,
  .huge-a66c {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .nav-dirty-dd4c,
  .logo_selected_a535,
  .secondary-hard-4649,
  .active-huge-cc36 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .sort_clean_02ee,
  .secondary-dark-c39a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tag-down-4a3c,
  .card-0cb1,
  .highlight-39fe,
  .row_black_88aa {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .accent_d50e,
  .panel-2d58,
  .pagination-liquid-e9d2,
  .message_smooth_4354,
  .carousel_motion_1cf0,
  .complex_1282 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .narrow_be93,
  .modal-fd04,
  .list-lower-67be {
    max-width: none !important;
  }
  
  .wrapper-down-52bf {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .nav-dirty-dd4c {
    font-size: 1.5rem !important;
  }
  
  .logo_selected_a535 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .banner-60e0,
  .paragraph-f32b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .secondary-hard-4649 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .west_575f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .feature-5ba8 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .narrow_be93,
  .list-lower-67be {
    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: 2dee */
.ghost-box-i7 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.1;
}
