/* ============================================
   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 (.sidebar-hovered-119a) is a descendant of
   .wide-9125 (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.stone_11ac {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame-prev-39e7" 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.hover_7d6f so it can't cause
   horizontal overflow anyway. */
.module_focused_3ab6,
.logo-pink-63ae,
.cool_29d0,
.fluid-7ad9,
.surface_fixed_1315,
.outline_bottom_c426,
.secondary_9074,
.center-b75f,
.background_4c8d,
.box_f28f,
.media-635a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .texture-old-2a6d {
    padding: 8px 0;
  }
  
  .input-a59c img {
    height: 28px;
    width: auto;
  }
  
  .background_429f {
    display: none !important;
  }
  
  .info_complex_5f32 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .info_complex_5f32 svg {
    width: 14px;
    height: 14px;
  }
  
  .down-05ae {
    padding: 6px;
  }
  
  .last_ae30 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .cool_29d0,
  .logo-pink-63ae,
  .fluid-7ad9,
  .surface_fixed_1315,
  .sort_tiny_0a4c,
  .search_dark_0a3a,
  .main-9ba4,
  .shadow_d210,
  .element_hard_f20b,
  .medium_3fa8,
  .texture_bronze_7434 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .breadcrumb_c9c5,
  .highlight_new_a247 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .section-narrow-05b5,
  .progress-smooth-1a27,
  .active_3959,
  .basic_1bf1,
  .dynamic-6039,
  .paragraph_1fc9,
  .pagination-up-b3b3 {
    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 */
  .article-focused-b3e3,
  .search-b89e,
  .gallery-3ab4,
  .hidden-yellow-9360,
  .icon-fresh-24df {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .element-first-9be7,
  .action_564d,
  .slow-8cfd,
  .panel_lite_6b52 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .input-8383,
  .description_5885 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .modal_c3b8,
  .sort-hovered-f737,
  .dirty_851c,
  .notification_804f {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .sort_wood_e4ef,
  .hidden-white-7925,
  .dropdown-596f,
  .label-fast-7624,
  .image-a4c8,
  .aside_8e49 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .article-focused-b3e3,
  .search-b89e,
  .hidden-yellow-9360 {
    max-width: none !important;
  }
  
  .frame-prev-39e7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .element-first-9be7 {
    font-size: 1.5rem !important;
  }
  
  .action_564d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .panel-0b3c,
  .pagination-mini-6005 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .slow-8cfd {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .list-plasma-b19e {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .short-fbae {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .article-focused-b3e3,
  .hidden-yellow-9360 {
    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: 743e */
.ghost-box-i8 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.3;
}
