/* ============================================
   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 (.paragraph_bottom_eaff) is a descendant of
   .focus_plasma_dcbd (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.simple-9c33 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".section_orange_9f3d" 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.alert_purple_d4e1 so it can't cause
   horizontal overflow anyway. */
.fluid_16a8,
.selected_d420,
.pro-e892,
.tag-64c2,
.media_ea9f,
.banner_out_95bf,
.rough_e328,
.message_large_cdfb,
.surface_d5bb,
.smooth_7b44,
.link-22e2 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .current-2679 {
    padding: 8px 0;
  }
  
  .sidebar-yellow-6306 img {
    height: 28px;
    width: auto;
  }
  
  .texture_upper_0e4b {
    display: none !important;
  }
  
  .dropdown-lite-caeb {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .dropdown-lite-caeb svg {
    width: 14px;
    height: 14px;
  }
  
  .popup_0ff4 {
    padding: 6px;
  }
  
  .picture-10b7 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pro-e892,
  .selected_d420,
  .tag-64c2,
  .media_ea9f,
  .panel_3e31,
  .hover_tiny_5f6f,
  .box-7e74,
  .panel_west_a692,
  .disabled_9913,
  .header-clean-73e7,
  .column-stone-4c51,
  .tooltip-ec8c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .thick_265c,
  .header-first-ff86 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .full_a690,
  .logo_mini_225f,
  .info-bottom-71af,
  .blue-aab6,
  .aside-68f9,
  .search_basic_a299,
  .element_iron_1315 {
    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 */
  .button_stone_c79a,
  .filter-c9ec,
  .photo-hot-02e4,
  .layout-white-e26b,
  .disabled-iron-f4fe {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .bottom_0186,
  .down_4ab1,
  .modal-6783,
  .fast-7aa9 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .hero_7d39,
  .text_old_78a9 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .short_6fbf,
  .action_982c,
  .outline-448a,
  .chip-2952 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .pattern-bright-baee,
  .module-d7bc,
  .iron-df0b,
  .input_north_9bd4,
  .column_tiny_aac1,
  .action_98c9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .button_stone_c79a,
  .filter-c9ec,
  .layout-white-e26b {
    max-width: none !important;
  }
  
  .section_orange_9f3d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .bottom_0186 {
    font-size: 1.5rem !important;
  }
  
  .down_4ab1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .dirty_8beb,
  .warm_5dee {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .modal-6783 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .label_steel_c272 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .south-b31c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .button_stone_c79a,
  .layout-white-e26b {
    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: c68d */
.widget-item-h7 {
  padding: 0.5rem;
  font-size: 13px;
  line-height: 1.1;
}
