/* ============================================
   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 (.logo_simple_622f) is a descendant of
   .footer_9723 (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.highlight-smooth-0416 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".sidebar_17e3" 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.under_f431 so it can't cause
   horizontal overflow anyway. */
.row-4e77,
.text_upper_508e,
.pro_1ca0,
.active-6521,
.secondary-brown-1c1f,
.sort-tiny-53b9,
.tag_8a03,
.breadcrumb-orange-0aa6,
.tabs_narrow_abb6,
.gradient_bright_84a9,
.article-narrow-c47d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .accent-dd52 {
    padding: 8px 0;
  }
  
  .yellow_0c73 img {
    height: 28px;
    width: auto;
  }
  
  .bottom-0e35 {
    display: none !important;
  }
  
  .lite_ebd8 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .lite_ebd8 svg {
    width: 14px;
    height: 14px;
  }
  
  .video-2033 {
    padding: 6px;
  }
  
  .dropdown-blue-69d8 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .pro_1ca0,
  .text_upper_508e,
  .active-6521,
  .secondary-brown-1c1f,
  .middle-8ce0,
  .section_c9d0,
  .avatar-large-6a74,
  .content-2ff5,
  .summary_wood_7b8b,
  .narrow-9310,
  .preview-medium-99bf {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .notice_a7a4,
  .title_green_a5e2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .search-50c4,
  .block_hard_f8be,
  .bright_bbd1,
  .slow-7386,
  .wide_528f,
  .sort-gold-cfe6,
  .form-tiny-75f5 {
    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 */
  .preview-3c82,
  .medium-8828,
  .simple-5623,
  .rough_fc64,
  .column_out_a2e0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .form-8da2,
  .prev-5718,
  .panel_stone_5872,
  .tabs-black-fd05 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .copper-5aa0,
  .button-8af2 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .fast_65fa,
  .picture-7790,
  .outline-dynamic-6b54,
  .pro_b140 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .black-4f2c,
  .component-dd80,
  .stale_2374,
  .heading_fast_9017,
  .modal_ed93,
  .in_f804 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .preview-3c82,
  .medium-8828,
  .rough_fc64 {
    max-width: none !important;
  }
  
  .sidebar_17e3 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .form-8da2 {
    font-size: 1.5rem !important;
  }
  
  .prev-5718 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .notification_f0bd,
  .fresh_9007 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .panel_stone_5872 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .nav_action_324f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tabs_left_74da {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .preview-3c82,
  .rough_fc64 {
    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: 2ee5 */
.promo-block-c0 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.3;
}
