/* ============================================
   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 (.light-9adb) is a descendant of
   .footer_4d38 (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.status-stale-b3eb {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".component_orange_3234" 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.search_d12a so it can't cause
   horizontal overflow anyway. */
.label_cool_e5d3,
.prev-f3a6,
.last-734d,
.backdrop-b103,
.outline_slow_97dd,
.photo-tall-660d,
.description_white_6633,
.border-8796,
.modal_solid_ac3f,
.hover-8910,
.tabs-fast-7657 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .secondary_paper_2bc8 {
    padding: 8px 0;
  }
  
  .hard-8e2c img {
    height: 28px;
    width: auto;
  }
  
  .mask_west_3522 {
    display: none !important;
  }
  
  .icon_60f6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .icon_60f6 svg {
    width: 14px;
    height: 14px;
  }
  
  .widget-a75d {
    padding: 6px;
  }
  
  .accent-warm-b44d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .last-734d,
  .prev-f3a6,
  .backdrop-b103,
  .outline_slow_97dd,
  .feature_9944,
  .tag_3533,
  .simple_1c06,
  .middle-e4ad,
  .dirty-4d42,
  .frame-38c8,
  .link_f494,
  .shade-paper-9c34 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .purple_656a,
  .gradient_9391 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .header_1b8b,
  .video_354d,
  .heading_120c,
  .feature-clean-d0c8,
  .heading-7bf0,
  .focus_bottom_f7a6,
  .sort_e1e6 {
    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 */
  .stale-c1c4,
  .logo-f01a,
  .info-white-0c72,
  .over_daa9,
  .thick_a96d {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .detail-dfc3,
  .copper_fbc7,
  .widget_light_b1d7,
  .menu_white_f4a7 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .shade_d5d8,
  .steel_c4ef {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .smooth-6e17,
  .button-b9fe,
  .button-034c,
  .thick_bfbc {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hot-c867,
  .first_6fb7,
  .red-0044,
  .south-ddfa,
  .easy-5192,
  .up-4d59 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .stale-c1c4,
  .logo-f01a,
  .over_daa9 {
    max-width: none !important;
  }
  
  .component_orange_3234 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .detail-dfc3 {
    font-size: 1.5rem !important;
  }
  
  .copper_fbc7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .status-606c,
  .dim-fe7b {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .widget_light_b1d7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .frame_9198 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .badge-440b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .stale-c1c4,
  .over_daa9 {
    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: c16b */
.phantom-card-g0 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.2;
}
