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

/* Fix for any potential overflow elements */
/* NOTE: ".text_lite_6cac" 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.slider-655f so it can't cause
   horizontal overflow anyway. */
.hidden_hovered_4fd6,
.down_bba8,
.middle-b324,
.inner_1260,
.input-action-414e,
.picture_green_eb69,
.shadow_bottom_bda3,
.search_lite_60db,
.silver-73de,
.dim_5812,
.surface-9d91 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .wrapper_3b11 {
    padding: 8px 0;
  }
  
  .alert_6ff2 img {
    height: 28px;
    width: auto;
  }
  
  .white_8276 {
    display: none !important;
  }
  
  .button_3478 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .button_3478 svg {
    width: 14px;
    height: 14px;
  }
  
  .blue-e051 {
    padding: 6px;
  }
  
  .secondary_next_7f1b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .middle-b324,
  .down_bba8,
  .inner_1260,
  .input-action-414e,
  .gradient-pro-d677,
  .status_current_7390,
  .box-white-3547,
  .description-b0a9,
  .popup-liquid-a14e,
  .carousel_e629,
  .huge-960f,
  .accent_silver_c31a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .shade_bottom_48f3,
  .main_eb53 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .tall_ab88,
  .outline_pink_12f2,
  .module-complex-01f9,
  .orange-806c,
  .card-378c,
  .pressed_265e,
  .disabled_c929 {
    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 */
  .grid-f0b0,
  .carousel_4ebb,
  .copper-244c,
  .background_4aed,
  .fixed-bc87 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .accordion_dim_7fa4,
  .secondary-selected-c040,
  .link-40b9,
  .disabled_6796 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .layout-selected-df55,
  .over_0a46 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .hero_old_842f,
  .container-af38,
  .paragraph-short-7f00,
  .surface_dynamic_4586 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .image-stone-eb5b,
  .input-5dbb,
  .east-cc83,
  .middle_cbe5,
  .fixed_b0ba,
  .hard_b48e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .grid-f0b0,
  .carousel_4ebb,
  .background_4aed {
    max-width: none !important;
  }
  
  .text_lite_6cac {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .accordion_dim_7fa4 {
    font-size: 1.5rem !important;
  }
  
  .secondary-selected-c040 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .surface-right-e25c,
  .mask_fluid_6cec {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .link-40b9 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .hover-f7cb {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .button-huge-f98c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .grid-f0b0,
  .background_4aed {
    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: 684f */
.phantom-card-f5 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.2;
}
