/* ============================================
   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 (.modal-copper-43cb) is a descendant of
   .progress_227e (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.item-hovered-6fab {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".fluid-58be" 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.overlay-pink-7443 so it can't cause
   horizontal overflow anyway. */
.main-4290,
.section-huge-be50,
.button-2197,
.hidden_pressed_d570,
.pro_257b,
.next-5e0e,
.text-e99f,
.tertiary-c137,
.text_top_369d,
.large_1e85,
.text-tall-a298 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .dirty_c981 {
    padding: 8px 0;
  }
  
  .center_10dd img {
    height: 28px;
    width: auto;
  }
  
  .summary_selected_0448 {
    display: none !important;
  }
  
  .mask_6ec1 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .mask_6ec1 svg {
    width: 14px;
    height: 14px;
  }
  
  .button-c977 {
    padding: 6px;
  }
  
  .blue-6e38 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .button-2197,
  .section-huge-be50,
  .hidden_pressed_d570,
  .pro_257b,
  .photo-gold-070f,
  .aside-medium-26b1,
  .basic_c47a,
  .black_ed2e,
  .soft-fadf,
  .texture-be16,
  .caption-static-4f2f,
  .cool-bc24 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .soft_0240,
  .focus-d127 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hard-f99f,
  .north-5dd6,
  .brown_f72c,
  .feature-up-a33d,
  .list-685f,
  .hidden-out-9b22,
  .south-776b {
    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 */
  .accordion_b0e1,
  .accordion-0bc4,
  .rough-5533,
  .stale-5ecd,
  .pro-e274 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .notification_lower_d935,
  .over_a0f8,
  .iron_a4b7,
  .panel_iron_3437 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .widget-motion-1cf7,
  .gold_9192 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .action-6db0,
  .advanced_8be7,
  .center_baa7,
  .full_d13c {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .header-mini-a8eb,
  .yellow_82b6,
  .new-07ab,
  .search_f341,
  .main_dd95,
  .button_2f0b {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .accordion_b0e1,
  .accordion-0bc4,
  .stale-5ecd {
    max-width: none !important;
  }
  
  .fluid-58be {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .notification_lower_d935 {
    font-size: 1.5rem !important;
  }
  
  .over_a0f8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .paragraph-d136,
  .old-9bdb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .iron_a4b7 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .dropdown-copper-c3e3 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .frame_full_297e {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .accordion_b0e1,
  .stale-5ecd {
    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: 3eed */
.shadow-element-n4 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.1;
}
