/* ============================================
   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 (.highlight_inner_7713) is a descendant of
   .image_88fa (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.text_green_56c2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".video-aaa6" 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.hot-05e2 so it can't cause
   horizontal overflow anyway. */
.message_soft_ceed,
.upper_8b61,
.outer-765a,
.nav-9c14,
.video-east-f417,
.clean-d456,
.yellow-ab11,
.slider-simple-000b,
.hard-48e4,
.secondary_8750,
.shade_04aa {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .info_1c6f {
    padding: 8px 0;
  }
  
  .accent-first-5400 img {
    height: 28px;
    width: auto;
  }
  
  .paragraph-large-b0c2 {
    display: none !important;
  }
  
  .container_a0a5 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .container_a0a5 svg {
    width: 14px;
    height: 14px;
  }
  
  .dim_5efb {
    padding: 6px;
  }
  
  .column-e714 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .outer-765a,
  .upper_8b61,
  .nav-9c14,
  .video-east-f417,
  .action-24a8,
  .alert-e35d,
  .article_6592,
  .current_2d19,
  .hidden_6124,
  .info_3ed7,
  .texture-d96f,
  .preview-5bff {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .summary_e43f,
  .hovered_8161 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .selected_4f8e,
  .yellow_0cf4,
  .overlay-active-8d4b,
  .header_stone_5ea7,
  .preview_hard_350d,
  .nav-adb8,
  .surface_16b1 {
    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 */
  .popup_warm_c32a,
  .icon_837d,
  .dropdown-c5e3,
  .aside-66b4,
  .sort_thick_d3dc {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .badge_stale_55cc,
  .input_40f0,
  .component_huge_9b39,
  .logo_cf8e {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .in-a692,
  .frame-978a {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .small-027d,
  .row_19b2,
  .secondary-light-1e1b,
  .current-94a9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .logo_center_a3a6,
  .outline_fbbd,
  .breadcrumb-04e8,
  .border_stale_8b4d,
  .pressed_7b4c,
  .alert_inner_f7cf {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .popup_warm_c32a,
  .icon_837d,
  .aside-66b4 {
    max-width: none !important;
  }
  
  .video-aaa6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .badge_stale_55cc {
    font-size: 1.5rem !important;
  }
  
  .input_40f0 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .nav-huge-ea05,
  .fast_1ccc {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .component_huge_9b39 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .grid_purple_d388 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .sort_orange_c76c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .popup_warm_c32a,
  .aside-66b4 {
    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: 1389 */
.ghost-box-e5 {
  padding: 0.4rem;
  font-size: 10px;
  line-height: 1.2;
}
