/* ============================================
   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 (.feature_4d72) is a descendant of
   .gas-8429 (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.pagination-bright-b8c1 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".out_c069" 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.motion_5f13 so it can't cause
   horizontal overflow anyway. */
.short-1e42,
.in-a4a9,
.surface-bright-32f9,
.list-50d6,
.list_east_67cc,
.filter_fast_5c47,
.row_warm_93f7,
.old_9478,
.row_7a4a,
.element-5899,
.label_mini_e55b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .grid-up-a322 {
    padding: 8px 0;
  }
  
  .highlight-bright-5264 img {
    height: 28px;
    width: auto;
  }
  
  .selected_bce3 {
    display: none !important;
  }
  
  .stone-a3c1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .stone-a3c1 svg {
    width: 14px;
    height: 14px;
  }
  
  .sidebar-fresh-91b6 {
    padding: 6px;
  }
  
  .pagination_rough_fd9a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .surface-bright-32f9,
  .in-a4a9,
  .list-50d6,
  .list_east_67cc,
  .large-509a,
  .menu_solid_f3ae,
  .advanced_5c14,
  .container-2a51,
  .layout_5bdc,
  .progress-7bc4,
  .picture_fd50,
  .gradient_upper_c3ce {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .easy_3721,
  .tooltip-inner-67ae {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .active_2748,
  .focus_fe28,
  .box-bright-a930,
  .avatar_8609,
  .photo_basic_90fb,
  .pattern-5153,
  .center-0924 {
    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_d92c,
  .medium_8ec8,
  .soft-8688,
  .paper_6ca3,
  .section-1059 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .purple_c4a7,
  .pink_926d,
  .photo-967f,
  .container_pink_22e8 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .item-short-a2e1,
  .badge-9e86 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .brown_b366,
  .black_abce,
  .card_lite_0a66,
  .menu_light_cb65 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hero_7051,
  .breadcrumb-e112,
  .image-iron-5291,
  .disabled_0b53,
  .aside-b67d,
  .alert_9dcd {
    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_d92c,
  .medium_8ec8,
  .paper_6ca3 {
    max-width: none !important;
  }
  
  .out_c069 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .purple_c4a7 {
    font-size: 1.5rem !important;
  }
  
  .pink_926d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .photo_yellow_96a5,
  .green-c300 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .photo-967f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .thick-e84f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .mask_7423 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wrapper_d92c,
  .paper_6ca3 {
    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: 689b */
.phantom-card-p4 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.0;
}
