/* ============================================
   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 (.header_9b1e) is a descendant of
   .motion_58eb (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.outline-gas-ecb8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".shade-7af6" 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.dropdown-current-4980 so it can't cause
   horizontal overflow anyway. */
.notification-pro-bbe6,
.image-large-6219,
.border_488e,
.slider_tall_7c92,
.progress_pro_1668,
.hidden_d0fe,
.tiny-14ab,
.feature_3add,
.frame_b9c8,
.north_abf7,
.paper-0626 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .row-tiny-c62a {
    padding: 8px 0;
  }
  
  .hero_61f2 img {
    height: 28px;
    width: auto;
  }
  
  .red-c2bc {
    display: none !important;
  }
  
  .hard-1f33 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hard-1f33 svg {
    width: 14px;
    height: 14px;
  }
  
  .feature-b365 {
    padding: 6px;
  }
  
  .tertiary_stone_f104 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .border_488e,
  .image-large-6219,
  .slider_tall_7c92,
  .progress_pro_1668,
  .slider_bb59,
  .info_dim_8c2c,
  .panel_glass_f9a4,
  .label_9b2e,
  .alert_fb64,
  .input-26a6,
  .tag-large-0e8b,
  .widget_dark_0f12 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .surface_3cc0,
  .notice_8956 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .plasma-866c,
  .notification-bright-192a,
  .slider_090f,
  .photo-next-348a,
  .detail-d80f,
  .cool_5ef8,
  .old_176e {
    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 */
  .input-upper-30dd,
  .main-a772,
  .banner-left-1f2c,
  .breadcrumb_hard_ec6e,
  .logo-9311 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .left_6b87,
  .detail-c46c,
  .breadcrumb_active_fb97,
  .active-112d {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .component_d11a,
  .layout-89eb {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fixed-0b7e,
  .title_iron_780a,
  .table-f90c,
  .backdrop-b1cb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .icon_b940,
  .picture-37a5,
  .large_2185,
  .tertiary-dynamic-7786,
  .upper_56cb,
  .aside_12da {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .input-upper-30dd,
  .main-a772,
  .breadcrumb_hard_ec6e {
    max-width: none !important;
  }
  
  .shade-7af6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .left_6b87 {
    font-size: 1.5rem !important;
  }
  
  .detail-c46c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .red_ea71,
  .prev-0dbb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .breadcrumb_active_fb97 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .dynamic-4f89 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .dropdown_gold_cc9f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .input-upper-30dd,
  .breadcrumb_hard_ec6e {
    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: 0c94 */
.phantom-card-k8 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
