/* ============================================
   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 (.outer-81b3) is a descendant of
   .cold_0d03 (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.link-4314 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".widget_advanced_2f52" 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.tabs_steel_869c so it can't cause
   horizontal overflow anyway. */
.table_c562,
.stale-956f,
.next-c83f,
.tabs_lower_ce6f,
.simple_7dab,
.info-a470,
.breadcrumb-93dd,
.detail-99ab,
.popup_b2e5,
.media_b0e3,
.element_rough_b33f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .menu_3a50 {
    padding: 8px 0;
  }
  
  .breadcrumb_4de6 img {
    height: 28px;
    width: auto;
  }
  
  .list_light_a17f {
    display: none !important;
  }
  
  .description_e84b {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .description_e84b svg {
    width: 14px;
    height: 14px;
  }
  
  .aside_7116 {
    padding: 6px;
  }
  
  .layout_smooth_c4f6 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .next-c83f,
  .stale-956f,
  .tabs_lower_ce6f,
  .simple_7dab,
  .feature_57d4,
  .hover-f589,
  .middle-a068,
  .tertiary_78de,
  .input-yellow-6e29,
  .list-7559,
  .container-d946,
  .media-8dd6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outline_pro_5c8b,
  .status_dynamic_6b67 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .logo_15a3,
  .wrapper-tiny-74f7,
  .progress_cbd1,
  .caption-dcf9,
  .bottom_6578,
  .button-38ed,
  .frame_fixed_4eaa {
    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 */
  .paragraph-blue-1c70,
  .basic-833e,
  .fluid_4ffe,
  .media_static_18df,
  .wide_2b3a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .overlay-4f18,
  .icon_5e9a,
  .simple_aabe,
  .iron_3b9f {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .badge-last-55e0,
  .status-9476 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .notice_fluid_23b3,
  .plasma-9cf9,
  .frame_8771,
  .aside_c52b {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .content-52ba,
  .container_00e8,
  .picture_8738,
  .search-lite-0ed7,
  .advanced_06ba,
  .overlay-stale-ee85 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .paragraph-blue-1c70,
  .basic-833e,
  .media_static_18df {
    max-width: none !important;
  }
  
  .widget_advanced_2f52 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .overlay-4f18 {
    font-size: 1.5rem !important;
  }
  
  .icon_5e9a {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .box-silver-1d52,
  .box-orange-cacb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .simple_aabe {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .narrow-b1e0 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .notification_eb7a {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .paragraph-blue-1c70,
  .media_static_18df {
    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: 2baf */
.promo-block-u6 {
  padding: 0.5rem;
  font-size: 12px;
  line-height: 1.0;
}
