/* ============================================
   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 (.next_de15) is a descendant of
   .north_2b41 (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.search-8466 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".heading_up_c8f5" 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.soft_b8b6 so it can't cause
   horizontal overflow anyway. */
.large_01d9,
.main_hovered_d16f,
.dim-6205,
.breadcrumb_d454,
.link_03a0,
.selected-e125,
.focus-prev-4181,
.soft-2e9c,
.accordion-thick-b736,
.outline_afee,
.summary-brown-978c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .action-2aa8 {
    padding: 8px 0;
  }
  
  .panel_3059 img {
    height: 28px;
    width: auto;
  }
  
  .sidebar_6f9a {
    display: none !important;
  }
  
  .module_6a56 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .module_6a56 svg {
    width: 14px;
    height: 14px;
  }
  
  .pagination_top_6474 {
    padding: 6px;
  }
  
  .alert_active_6343 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .dim-6205,
  .main_hovered_d16f,
  .breadcrumb_d454,
  .link_03a0,
  .bright_1c21,
  .avatar-cc4d,
  .caption_black_ffc3,
  .backdrop_adbb,
  .medium-9ea3,
  .box_9af3,
  .input-9b06,
  .header_large_6977 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .active_2deb,
  .hot_57dc {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .section_light_1606,
  .caption-cd22,
  .hero_f1e8,
  .dark_12dd,
  .text_1e91,
  .slow_d46a,
  .rough_e60e {
    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-c84e,
  .block-82dd,
  .soft_2c76,
  .action-272d,
  .message_6d69 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .down-da38,
  .chip-a5cf,
  .button_db94,
  .tertiary_aaac {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .carousel_simple_d0fa,
  .tertiary_7192 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .menu-b7b0,
  .row_d8bf,
  .chip-991a,
  .preview_ca60 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .main-19bb,
  .input_71cc,
  .hidden_hard_6173,
  .rough_4530,
  .component_medium_3414,
  .picture_wood_4b6c {
    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-c84e,
  .block-82dd,
  .action-272d {
    max-width: none !important;
  }
  
  .heading_up_c8f5 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .down-da38 {
    font-size: 1.5rem !important;
  }
  
  .chip-a5cf {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .soft_7739,
  .gallery-d1c7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .button_db94 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .accordion-906b {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .container_east_3b44 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .input-c84e,
  .action-272d {
    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: 1136 */
.phantom-card-v3 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.0;
}
