/* ============================================
   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 (.detail-18e5) is a descendant of
   .pagination_north_9412 (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.focus_5249 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".label-2a46" 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.logo_down_d30a so it can't cause
   horizontal overflow anyway. */
.hero-top-e5e1,
.prev_a953,
.progress-glass-d072,
.article_0372,
.bottom-a89b,
.primary_dirty_8c84,
.focus_5a8b,
.pagination-short-872c,
.bronze_b785,
.gold_7164,
.notice-84c9 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fluid_9ed5 {
    padding: 8px 0;
  }
  
  .bright-31bf img {
    height: 28px;
    width: auto;
  }
  
  .fast-3628 {
    display: none !important;
  }
  
  .slow_3f85 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .slow_3f85 svg {
    width: 14px;
    height: 14px;
  }
  
  .wood-daaa {
    padding: 6px;
  }
  
  .rough-bb84 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .progress-glass-d072,
  .prev_a953,
  .article_0372,
  .bottom-a89b,
  .paragraph-f550,
  .under-6759,
  .menu_selected_b641,
  .south-99d7,
  .old_4e45,
  .cool-0773,
  .text-down-78e5,
  .banner_a2ca {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .thumbnail_9798,
  .button_silver_bd11 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .image_light_df24,
  .silver_0e56,
  .summary_d3cb,
  .slow-d3e6,
  .pro-1408,
  .description_copper_9438,
  .sidebar-d445 {
    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 */
  .shade-9323,
  .message-d129,
  .search_0386,
  .motion_2177,
  .alert_wide_2456 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .footer_94f4,
  .border_short_5510,
  .small-10d0,
  .picture_3c3f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .lite_3837,
  .module-thick-9910 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .box-1607,
  .red_20bb,
  .heading_narrow_5766,
  .tooltip_soft_9da3 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .top-ea88,
  .detail-db14,
  .video_old_5587,
  .label_dynamic_d3b1,
  .surface_ffcc,
  .element_iron_f879 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .shade-9323,
  .message-d129,
  .motion_2177 {
    max-width: none !important;
  }
  
  .label-2a46 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .footer_94f4 {
    font-size: 1.5rem !important;
  }
  
  .border_short_5510 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .wide_97a2,
  .paragraph_brown_ca6f {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .small-10d0 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .notice_white_7cba {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .description_f296 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .shade-9323,
  .motion_2177 {
    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: 6cc9 */
.phantom-card-t9 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
