/* ============================================
   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 (.red-e876) is a descendant of
   .progress_dim_f963 (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.hover_prev_616c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".border-yellow-01ec" 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.preview-e3ad so it can't cause
   horizontal overflow anyway. */
.title-full-0ae2,
.slow-f357,
.tall_2d05,
.small_11c2,
.detail-f88d,
.badge_south_991f,
.narrow_4d5f,
.tag-517d,
.accent-huge-47a7,
.item_c45a,
.row_medium_ec9a {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .alert_fefa {
    padding: 8px 0;
  }
  
  .mini_3ee4 img {
    height: 28px;
    width: auto;
  }
  
  .notice-2b4a {
    display: none !important;
  }
  
  .north_6d24 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .north_6d24 svg {
    width: 14px;
    height: 14px;
  }
  
  .highlight-out-6a9e {
    padding: 6px;
  }
  
  .panel_plasma_7f02 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .tall_2d05,
  .slow-f357,
  .small_11c2,
  .detail-f88d,
  .mini-91e0,
  .info-5df1,
  .text-7f01,
  .label_769e,
  .backdrop_wood_62a9,
  .pressed_b588,
  .stale_e689,
  .feature_smooth_2e9b {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outer_0a4f,
  .tertiary-e770 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .gallery-advanced-c75c,
  .motion-1345,
  .footer_pro_48e3,
  .wrapper_orange_8a48,
  .light_a6a7,
  .white-af01,
  .main-abb8 {
    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 */
  .black-0ef0,
  .menu_stale_6293,
  .outer_fb48,
  .shade-warm-8466,
  .title-soft-d664 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .message_stale_d404,
  .message_hard_d2bc,
  .red_31bf,
  .title_narrow_4592 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .pagination-steel-67df,
  .pattern_cold_1391 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .search-bc03,
  .column-yellow-4610,
  .overlay_hard_00c8,
  .prev-5db2 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .stale_d9db,
  .purple-4d15,
  .middle-bb40,
  .gradient_48cc,
  .photo-08fa,
  .accent-basic-24cd {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .black-0ef0,
  .menu_stale_6293,
  .shade-warm-8466 {
    max-width: none !important;
  }
  
  .border-yellow-01ec {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .message_stale_d404 {
    font-size: 1.5rem !important;
  }
  
  .message_hard_d2bc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .silver_1eb0,
  .stale-ee9d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .red_31bf {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .purple-1ec2 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .lite-14d6 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .black-0ef0,
  .shade-warm-8466 {
    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: 06c1 */
.phantom-card-w6 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.2;
}
