/* ============================================
   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 (.current_7b93) is a descendant of
   .description-green-2893 (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.element-gold-cfe4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".frame-steel-f536" 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.main-large-eafb so it can't cause
   horizontal overflow anyway. */
.warm_9b4b,
.dropdown-b624,
.header_advanced_796c,
.light-7079,
.basic-a739,
.pattern-glass-205a,
.dark-9dc5,
.bronze-9ed2,
.main_2aaa,
.pressed_fc0a,
.copper-63e3 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .caption_e5ac {
    padding: 8px 0;
  }
  
  .content-398e img {
    height: 28px;
    width: auto;
  }
  
  .feature-simple-1a2c {
    display: none !important;
  }
  
  .focus-stale-60ba {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .focus-stale-60ba svg {
    width: 14px;
    height: 14px;
  }
  
  .notice-2efe {
    padding: 6px;
  }
  
  .column-60af {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .header_advanced_796c,
  .dropdown-b624,
  .light-7079,
  .basic-a739,
  .input_inner_95da,
  .status_light_d8ab,
  .surface-2955,
  .header-ac22,
  .tooltip-outer-5d3a,
  .border_1aca,
  .hard-e8b1,
  .component-afd4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .feature-down-ad1c,
  .block-east-6086 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .summary-ffe2,
  .message-1d82,
  .advanced_9402,
  .lower-1fba,
  .motion-780b,
  .brown-fdf3,
  .accent-top-baec {
    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 */
  .status-7c7b,
  .thick_0169,
  .dropdown_bb6e,
  .smooth-180c,
  .wide-2380 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .wrapper_4b43,
  .info-b43d,
  .notice_4202,
  .short-23ee {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .feature_narrow_25f0,
  .focused-e6fa {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .photo_5952,
  .container-8a05,
  .footer_right_0ba9,
  .component_warm_897e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .solid-2d7d,
  .paper_08de,
  .card-d303,
  .motion_c174,
  .slider_last_bd04,
  .carousel-4610 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .status-7c7b,
  .thick_0169,
  .smooth-180c {
    max-width: none !important;
  }
  
  .frame-steel-f536 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .wrapper_4b43 {
    font-size: 1.5rem !important;
  }
  
  .info-b43d {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .badge-bfbd,
  .container-1bf6 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .notice_4202 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .copper_5eaf {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .row_selected_4e0a {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .status-7c7b,
  .smooth-180c {
    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: 811d */
.ghost-box-f9 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.1;
}
