/* ============================================
   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 (.form-299e) is a descendant of
   .simple_074c (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.hard-7a2d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".avatar-mini-a80a" 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.image_a819 so it can't cause
   horizontal overflow anyway. */
.feature-751e,
.hard_8545,
.container_cool_dedf,
.static-7552,
.list_dbd4,
.solid_55ae,
.small_bb1c,
.secondary-3ccc,
.blue-db64,
.component-435f,
.purple_344f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .rough-59e1 {
    padding: 8px 0;
  }
  
  .bronze_c84b img {
    height: 28px;
    width: auto;
  }
  
  .active_3aac {
    display: none !important;
  }
  
  .first-7db8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .first-7db8 svg {
    width: 14px;
    height: 14px;
  }
  
  .dropdown-stale-9041 {
    padding: 6px;
  }
  
  .small_d7a2 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .container_cool_dedf,
  .hard_8545,
  .static-7552,
  .list_dbd4,
  .header-b372,
  .grid_solid_cb6f,
  .tiny-3ed5,
  .overlay-smooth-ee15,
  .nav_9aee,
  .thick-936e,
  .component-glass-4d4d,
  .complex_096b {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .layout-252a,
  .tertiary-da22 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .message_lite_819e,
  .outline_wood_9ed5,
  .label-fb67,
  .pink-43ff,
  .button_7d3a,
  .white-362a,
  .card-3d5e {
    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 */
  .wrapper_hovered_d0ac,
  .easy-cecd,
  .nav-iron-3b4d,
  .hidden-pink-82ad,
  .simple-f745 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .widget_f7ef,
  .fresh-56f4,
  .banner-light-ec9f,
  .status_374b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .filter-7b96,
  .picture-glass-c29e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .pagination_676e,
  .wide_d1e6,
  .texture_a23a,
  .focus-67a3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .tag-paper-8d2a,
  .preview-958b,
  .article_99b0,
  .tooltip-d4b2,
  .texture-605e,
  .tabs_stone_52da {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .wrapper_hovered_d0ac,
  .easy-cecd,
  .hidden-pink-82ad {
    max-width: none !important;
  }
  
  .avatar-mini-a80a {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .widget_f7ef {
    font-size: 1.5rem !important;
  }
  
  .fresh-56f4 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .gradient-red-06cb,
  .gradient-9438 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .banner-light-ec9f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .caption-3293 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .row-fixed-4ad4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wrapper_hovered_d0ac,
  .hidden-pink-82ad {
    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: b385 */
.shadow-element-x6 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.0;
}
