/* ============================================
   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 (.stone_84e3) is a descendant of
   .up_64d3 (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.description-hot-2d20 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".inner-df38" 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.disabled_ff5d so it can't cause
   horizontal overflow anyway. */
.hidden_outer_eb2e,
.focus_static_5f14,
.alert_light_12ca,
.footer_3509,
.brown-ce1e,
.image-selected-9e73,
.cool-d39a,
.fast-8b45,
.surface_17f6,
.caption_top_5b23,
.selected-4136 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .sort-light-b030 {
    padding: 8px 0;
  }
  
  .caption-4317 img {
    height: 28px;
    width: auto;
  }
  
  .image-orange-afb6 {
    display: none !important;
  }
  
  .dim_2392 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .dim_2392 svg {
    width: 14px;
    height: 14px;
  }
  
  .focus-5a20 {
    padding: 6px;
  }
  
  .easy_c53e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .alert_light_12ca,
  .focus_static_5f14,
  .footer_3509,
  .brown-ce1e,
  .hovered_727d,
  .component_wood_d7a0,
  .dark-dcac,
  .logo-bd6b,
  .wide_b882,
  .tabs_0717,
  .carousel-basic-4e1a,
  .container_south_3f2f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .border-narrow-4a6d,
  .badge-a909 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .outline_green_2030,
  .breadcrumb_easy_e291,
  .blue_ec03,
  .disabled-purple-bafc,
  .yellow-898d,
  .info-selected-dfd1,
  .in_dda1 {
    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 */
  .alert_down_24ce,
  .secondary-steel-209b,
  .card_fb8e,
  .icon_stale_c282,
  .dropdown-f02e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .full-61d4,
  .caption_d018,
  .hover_a0b7,
  .motion-f801 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .modal-fc05,
  .selected-5a2a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .photo_aa5b,
  .sidebar_right_f165,
  .full-31e1,
  .shade-bfba {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .slider_530c,
  .mask-db70,
  .component-fb91,
  .title-6d72,
  .tall_d7a2,
  .hero-24a8 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .alert_down_24ce,
  .secondary-steel-209b,
  .icon_stale_c282 {
    max-width: none !important;
  }
  
  .inner-df38 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .full-61d4 {
    font-size: 1.5rem !important;
  }
  
  .caption_d018 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .focus_fc28,
  .glass_2d61 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hover_a0b7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .alert-b8c4 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .feature_upper_ab64 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .alert_down_24ce,
  .icon_stale_c282 {
    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: 57dc */
.phantom-card-q4 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.2;
}
