/* ============================================
   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 (.dropdown-78d5) is a descendant of
   .out_f863 (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.backdrop-cold-46ab {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".badge_3f8d" 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.module_d5e8 so it can't cause
   horizontal overflow anyway. */
.background-493e,
.grid-7d66,
.widget_gold_eafb,
.dark_7085,
.form-green-b44d,
.primary-9a3a,
.modal_6576,
.tag-fast-1f11,
.middle-b1ca,
.progress_under_cd40,
.hard_ef87 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .bright-9f41 {
    padding: 8px 0;
  }
  
  .static_0f53 img {
    height: 28px;
    width: auto;
  }
  
  .summary-new-afd1 {
    display: none !important;
  }
  
  .east_f576 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .east_f576 svg {
    width: 14px;
    height: 14px;
  }
  
  .list_2856 {
    padding: 6px;
  }
  
  .thumbnail_basic_7f9b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .widget_gold_eafb,
  .grid-7d66,
  .dark_7085,
  .form-green-b44d,
  .wrapper_6689,
  .info_dirty_d948,
  .west-d9ab,
  .container-hard-8b4d,
  .liquid_8021,
  .sidebar_8751,
  .grid_f3cf,
  .section-f0ce {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .secondary-first-5c6e,
  .status-5642 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title-c665,
  .item_liquid_b6a6,
  .element-7a5b,
  .form_172c,
  .light_bca5,
  .icon_8d1f,
  .box_bottom_c8b2 {
    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 */
  .text-7947,
  .north-f65f,
  .south-d752,
  .module-full-7221,
  .hero-dark-0402 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .focus_paper_9183,
  .thick-9066,
  .gas_8a7e,
  .block_0007 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .table-focused-ea97,
  .accent-447e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .focused-7479,
  .tag-44ef,
  .action-7af3,
  .box_steel_ed62 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .message-current-e867,
  .accent-e33d,
  .header-d5e3,
  .advanced_8c5f,
  .slow_6ddd,
  .left_9edd {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .text-7947,
  .north-f65f,
  .module-full-7221 {
    max-width: none !important;
  }
  
  .badge_3f8d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .focus_paper_9183 {
    font-size: 1.5rem !important;
  }
  
  .thick-9066 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .shade_4ee9,
  .right_85d4 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .gas_8a7e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .next_811a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .section-west-0749 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .text-7947,
  .module-full-7221 {
    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: ac5f */
.widget-item-h7 {
  padding: 0.5rem;
  font-size: 10px;
  line-height: 1.2;
}
