/* ============================================
   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 (.silver_6916) is a descendant of
   .accent_inner_083f (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.mini-461c {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".surface-cacb" 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.grid-fixed-b75f so it can't cause
   horizontal overflow anyway. */
.progress-large-ebaf,
.block-18a7,
.header-dynamic-f272,
.content-action-304e,
.breadcrumb-complex-ddfe,
.modal-5c5b,
.white_f835,
.secondary-aa42,
.up_3ad6,
.banner_next_0a9e,
.title-8954 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .active_copper_356d {
    padding: 8px 0;
  }
  
  .bottom-bb95 img {
    height: 28px;
    width: auto;
  }
  
  .search-3147 {
    display: none !important;
  }
  
  .cool-bdb4 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .cool-bdb4 svg {
    width: 14px;
    height: 14px;
  }
  
  .caption_8ad3 {
    padding: 6px;
  }
  
  .pattern_726a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .header-dynamic-f272,
  .block-18a7,
  .content-action-304e,
  .breadcrumb-complex-ddfe,
  .brown_931a,
  .stone-a931,
  .heading-5cd3,
  .stale_308d,
  .element-outer-3be8,
  .item_beed,
  .gold-26c0,
  .layout-center-9f24 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .slow_3839,
  .steel_5a26 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .paragraph-d841,
  .search-d2ee,
  .highlight-soft-d8e9,
  .texture_a82f,
  .dim-737f,
  .hidden-d741,
  .dim_09e3 {
    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 */
  .border_fluid_81e0,
  .modal_bright_0ea8,
  .cool-9023,
  .upper_bd10,
  .plasma_e5fd {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .footer_9620,
  .section_glass_ca49,
  .prev-de11,
  .hero-lower-b5cb {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .fresh_ee50,
  .texture_d565 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .modal-narrow-1ff6,
  .fixed_b84b,
  .feature_fast_22a7,
  .logo_pro_be98 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .mask_6970,
  .simple_222e,
  .content-paper-1296,
  .title-5b56,
  .pressed-9d00,
  .caption-4abd {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .border_fluid_81e0,
  .modal_bright_0ea8,
  .upper_bd10 {
    max-width: none !important;
  }
  
  .surface-cacb {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .footer_9620 {
    font-size: 1.5rem !important;
  }
  
  .section_glass_ca49 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .label-dba5,
  .alert_motion_befd {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .prev-de11 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .upper_ba13 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .short-d6ca {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .border_fluid_81e0,
  .upper_bd10 {
    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: 31ca */
.promo-block-k0 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.2;
}
