/* ============================================
   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 (.dirty-770b) is a descendant of
   .border_379c (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.smooth-5152 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".outline-7dd9" 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.alert-hot-92ec so it can't cause
   horizontal overflow anyway. */
.main_9a23,
.first-22ff,
.heading_4d4f,
.card-d21e,
.full_97c0,
.column_72d8,
.blue-04d1,
.dim-27db,
.dynamic_9be8,
.hovered_c1da,
.focused-57e6 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .thick_0407 {
    padding: 8px 0;
  }
  
  .info_5ea8 img {
    height: 28px;
    width: auto;
  }
  
  .block_bf19 {
    display: none !important;
  }
  
  .lower-3546 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .lower-3546 svg {
    width: 14px;
    height: 14px;
  }
  
  .description-3617 {
    padding: 6px;
  }
  
  .hidden_4d16 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .heading_4d4f,
  .first-22ff,
  .card-d21e,
  .full_97c0,
  .grid-solid-6092,
  .heading_1f5e,
  .header-af99,
  .popup_gas_c726,
  .solid-2ff4,
  .thumbnail_motion_fbb7,
  .form-east-5a75,
  .info-down-124c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hidden_6252,
  .paper_83ca {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .progress_b077,
  .hovered-314d,
  .slider-rough-760e,
  .frame_0810,
  .red_fcf6,
  .slow_721d,
  .tiny-7de9 {
    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 */
  .search-soft-3ce2,
  .main_dark_e44c,
  .container_4b03,
  .highlight_copper_a3e3,
  .thumbnail-a5c9 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .summary-bc05,
  .thumbnail_full_2874,
  .hero_liquid_8f27,
  .block-7e26 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .cold-e042,
  .preview_upper_0f47 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .over-1ffd,
  .shade_liquid_420d,
  .message_in_ed21,
  .sidebar-89d9 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .accordion-cold-c9d5,
  .south_7d88,
  .panel-117d,
  .shade-tiny-92e8,
  .narrow-9485,
  .shade_1161 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .search-soft-3ce2,
  .main_dark_e44c,
  .highlight_copper_a3e3 {
    max-width: none !important;
  }
  
  .outline-7dd9 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .summary-bc05 {
    font-size: 1.5rem !important;
  }
  
  .thumbnail_full_2874 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .container_inner_e0e5,
  .thumbnail_584a {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .hero_liquid_8f27 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .text_2794 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .upper_5a21 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .search-soft-3ce2,
  .highlight_copper_a3e3 {
    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: d63e */
.widget-item-d4 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.2;
}
