/* ============================================
   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 (.media_yellow_8e70) is a descendant of
   .highlight_white_f64b (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.component-f5b2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".advanced-dfe7" 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.dropdown_36ec so it can't cause
   horizontal overflow anyway. */
.article-soft-f187,
.breadcrumb-f76a,
.label-7662,
.module-thick-47f0,
.smooth-b6c8,
.tertiary_in_480c,
.photo_310f,
.paragraph-small-15ae,
.grid-289d,
.image-fluid-4013,
.thick_4cc4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .steel_b847 {
    padding: 8px 0;
  }
  
  .easy_cbcf img {
    height: 28px;
    width: auto;
  }
  
  .panel_59f2 {
    display: none !important;
  }
  
  .hero-0487 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hero-0487 svg {
    width: 14px;
    height: 14px;
  }
  
  .mask_05ae {
    padding: 6px;
  }
  
  .pro-18b3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .label-7662,
  .breadcrumb-f76a,
  .module-thick-47f0,
  .smooth-b6c8,
  .tiny_f748,
  .south-4056,
  .wide_cd07,
  .list_slow_fad7,
  .west_527b,
  .progress-smooth-f86e,
  .soft_74f8 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .short-e6b2,
  .media_dynamic_abe6 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .slider-6bfa,
  .hard_b07b,
  .main_up_48a6,
  .hover-ae46,
  .gallery_a1a5,
  .article-top-eb66,
  .progress_fixed_d27f {
    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 */
  .gradient_cold_6d2f,
  .table_gold_a66e,
  .widget_hard_c59d,
  .outline-fast-31ae,
  .notification_30d1 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .frame-liquid-5615,
  .description_stale_f4c2,
  .focus-bright-91c5,
  .last-7b8a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .sort-0581,
  .north-7aaa {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .tabs_4df0,
  .dark-856a,
  .over_ad2e,
  .text_c939 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .pagination_simple_b1dc,
  .current-cca4,
  .focus_focused_5d33,
  .backdrop-1109,
  .outline_82a4,
  .top_7113 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .gradient_cold_6d2f,
  .table_gold_a66e,
  .outline-fast-31ae {
    max-width: none !important;
  }
  
  .advanced-dfe7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .frame-liquid-5615 {
    font-size: 1.5rem !important;
  }
  
  .description_stale_f4c2 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .text_dirty_63bb,
  .mask_smooth_8b72 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .focus-bright-91c5 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .action_1bc9 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .label_db55 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .gradient_cold_6d2f,
  .outline-fast-31ae {
    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: 4543 */
.phantom-card-j6 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.1;
}
