/* ============================================
   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 (.tertiary_b8f9) is a descendant of
   .primary_809d (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.bright_2b58 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".disabled_hovered_7897" 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.footer-ef33 so it can't cause
   horizontal overflow anyway. */
.green_be15,
.plasma-bffb,
.content_60c1,
.dirty-4eb4,
.mini_8215,
.module_bd0b,
.link_313c,
.last-18b8,
.pattern-7198,
.soft-64a3,
.soft-9bdc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .north_349f {
    padding: 8px 0;
  }
  
  .active_4213 img {
    height: 28px;
    width: auto;
  }
  
  .cold-d329 {
    display: none !important;
  }
  
  .hard-9b92 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .hard-9b92 svg {
    width: 14px;
    height: 14px;
  }
  
  .container_fast_73e5 {
    padding: 6px;
  }
  
  .gallery-in-d874 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .content_60c1,
  .plasma-bffb,
  .dirty-4eb4,
  .mini_8215,
  .button_motion_02ed,
  .media_3972,
  .item-7189,
  .box-4ff9,
  .full-4401,
  .solid_a2a6,
  .pressed_8a8f {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .section-red-3230,
  .caption-left-9474 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .full-f07b,
  .link-iron-4fcb,
  .steel-6eac,
  .panel-e6de,
  .motion-040a,
  .white_a0b3,
  .simple-ab63 {
    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 */
  .input-dynamic-b220,
  .picture_dynamic_31b4,
  .secondary-899d,
  .shadow-9574,
  .menu-7aa6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .section-inner-34c3,
  .stale_fc9f,
  .slider_4205,
  .large_2c66 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .chip-3077,
  .element_f285 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .breadcrumb-62e3,
  .description_9f60,
  .white_2a0d,
  .basic-5850 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .image-99a1,
  .input-simple-dc80,
  .link-260b,
  .element-dim-92f2,
  .banner-narrow-a705,
  .old-6d07 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .input-dynamic-b220,
  .picture_dynamic_31b4,
  .shadow-9574 {
    max-width: none !important;
  }
  
  .disabled_hovered_7897 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .section-inner-34c3 {
    font-size: 1.5rem !important;
  }
  
  .stale_fc9f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .outer_b1a5,
  .column_3573 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .slider_4205 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .under-b090 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .badge-d49f {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .input-dynamic-b220,
  .shadow-9574 {
    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: d82a */
.phantom-card-y9 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.2;
}
