/* ============================================
   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 (.status-e07d) is a descendant of
   .text-ca07 (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.slider_purple_b9cd {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".label_67b7" 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.article_center_4ee9 so it can't cause
   horizontal overflow anyway. */
.large_ac73,
.picture-fefb,
.hero-b994,
.tiny-09b6,
.box-steel-d7be,
.alert-048d,
.under_871b,
.card_selected_989e,
.avatar-lite-894b,
.list_e378,
.stale_0eb7 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .upper-bab9 {
    padding: 8px 0;
  }
  
  .row-fde5 img {
    height: 28px;
    width: auto;
  }
  
  .widget-8144 {
    display: none !important;
  }
  
  .in-4aba {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .in-4aba svg {
    width: 14px;
    height: 14px;
  }
  
  .summary-small-7eee {
    padding: 6px;
  }
  
  .item_current_044e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .hero-b994,
  .picture-fefb,
  .tiny-09b6,
  .box-steel-d7be,
  .thumbnail_stone_8b9d,
  .content_tall_233a,
  .badge_advanced_12d1,
  .overlay_pressed_3834,
  .lite-ab75,
  .nav-green-ede9,
  .shade_smooth_2313,
  .header-0074 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .main-fdca,
  .layout-7001 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .header-c827,
  .block_medium_b530,
  .focus_small_4c53,
  .top_0d6c,
  .glass-1bb2,
  .tooltip-left-5f0c,
  .secondary-aa77 {
    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 */
  .card_paper_10bd,
  .frame-b6ef,
  .dynamic_5cce,
  .progress_inner_8810,
  .content-248e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .dark-4816,
  .down_6dca,
  .label_6fca,
  .stone-2615 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .grid-5ac8,
  .picture_61fd {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .image_liquid_627c,
  .disabled_6055,
  .notice-f4b1,
  .fresh-b325 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .full_534a,
  .input-hot-2a01,
  .advanced-1887,
  .tooltip-8c7a,
  .under_3fed,
  .dynamic_db66 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .card_paper_10bd,
  .frame-b6ef,
  .progress_inner_8810 {
    max-width: none !important;
  }
  
  .label_67b7 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .dark-4816 {
    font-size: 1.5rem !important;
  }
  
  .down_6dca {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .icon-1329,
  .mask_action_822d {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .label_6fca {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .notification-3a0a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .widget-last-010b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .card_paper_10bd,
  .progress_inner_8810 {
    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: c63c */
.promo-block-n1 {
  padding: 0.2rem;
  font-size: 11px;
  line-height: 1.1;
}
