/* ============================================
   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 (.message_25c1) is a descendant of
   .dark-8a12 (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.item-6b09 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".block-e5b6" 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.paragraph-basic-51bc so it can't cause
   horizontal overflow anyway. */
.purple_e510,
.tiny-7e86,
.backdrop-liquid-8e67,
.basic_bbd6,
.dark_e232,
.focused_a42b,
.background-d710,
.modal_bottom_57b3,
.menu_849f,
.filter_ec40,
.pattern_gold_d24c {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .card-lower-4d09 {
    padding: 8px 0;
  }
  
  .hero-down-11c2 img {
    height: 28px;
    width: auto;
  }
  
  .avatar_purple_4e05 {
    display: none !important;
  }
  
  .feature_bronze_f201 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .feature_bronze_f201 svg {
    width: 14px;
    height: 14px;
  }
  
  .status-top-802d {
    padding: 6px;
  }
  
  .box-b477 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .backdrop-liquid-8e67,
  .tiny-7e86,
  .basic_bbd6,
  .dark_e232,
  .dynamic-3e3e,
  .disabled-8407,
  .modal_889b,
  .modal_6c46,
  .paragraph_stone_5111,
  .fixed_6e37,
  .dirty_e4da {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .box_stale_e184,
  .layout_6675 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .main-tiny-4277,
  .hover_ea9b,
  .text_34ce,
  .over_cd33,
  .section-cd41,
  .fresh_28d1,
  .focused-25b2 {
    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 */
  .texture-cold-6496,
  .alert_1272,
  .iron_d88b,
  .border_full_c4f2,
  .label-f1d5 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .black_307a,
  .tag-active-cf30,
  .tooltip-8ba2,
  .detail-5f0b {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .input_2a83,
  .section_bronze_e0ea {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .border-soft-e730,
  .thick-a889,
  .tertiary_360a,
  .mini-c86c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .right_3da6,
  .up-aa5e,
  .modal_0098,
  .active-3129,
  .smooth_cbaa,
  .gas-2d0e {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .texture-cold-6496,
  .alert_1272,
  .border_full_c4f2 {
    max-width: none !important;
  }
  
  .block-e5b6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .black_307a {
    font-size: 1.5rem !important;
  }
  
  .tag-active-cf30 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .image_9781,
  .block-stale-49a3 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tooltip-8ba2 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .solid-b821 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .video-fresh-a0fa {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .texture-cold-6496,
  .border_full_c4f2 {
    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: 97cd */
.promo-block-c9 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.2;
}
