/* ============================================
   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 (.info_6d34) is a descendant of
   .slider-c678 (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-f784 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".bottom-15ae" 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.first_908f so it can't cause
   horizontal overflow anyway. */
.avatar_over_3f5a,
.outline_125a,
.notice-33b2,
.item_a29b,
.element_blue_3041,
.lite-d78e,
.carousel_d892,
.wrapper-paper-ce21,
.bright_1f98,
.smooth-88d7,
.cool-9ab4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .detail_left_60ff {
    padding: 8px 0;
  }
  
  .label-9a01 img {
    height: 28px;
    width: auto;
  }
  
  .highlight-warm-c72d {
    display: none !important;
  }
  
  .hero-cf40 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hero-cf40 svg {
    width: 14px;
    height: 14px;
  }
  
  .text_smooth_a869 {
    padding: 6px;
  }
  
  .alert-yellow-5844 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .notice-33b2,
  .outline_125a,
  .item_a29b,
  .element_blue_3041,
  .dark_e4b6,
  .accordion_aa31,
  .over_53fb,
  .input_ff7f,
  .message-84b5,
  .container_thick_6bfb,
  .gradient-5bf6,
  .next-7cea {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .purple-00c2,
  .hover_current_a00f {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .article-soft-ce10,
  .tall-5bdf,
  .accent-8066,
  .medium_0737,
  .logo_5721,
  .fixed-5f95,
  .shade_prev_8652 {
    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 */
  .tooltip_5e88,
  .solid_edb8,
  .popup-0a7d,
  .summary_2fcd,
  .tiny-f923 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tertiary-east-e602,
  .pattern_full_933a,
  .item_c031,
  .stone_2621 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pagination_steel_c549,
  .gas-ecd8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .form-c601,
  .panel_17c7,
  .new_dbdd,
  .wood-9425 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .modal_inner_2841,
  .red-b67e,
  .nav_top_58dd,
  .nav-mini-0f88,
  .card_f5fc,
  .frame_1de9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tooltip_5e88,
  .solid_edb8,
  .summary_2fcd {
    max-width: none !important;
  }
  
  .bottom-15ae {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tertiary-east-e602 {
    font-size: 1.5rem !important;
  }
  
  .pattern_full_933a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .button_motion_22e2,
  .item-tall-fab7 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .item_c031 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tabs_260a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .hover-ed23 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tooltip_5e88,
  .summary_2fcd {
    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: eb1e */
.widget-item-c9 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.1;
}
