/* ============================================
   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 (.thumbnail-0c6e) is a descendant of
   .basic_0185 (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.dirty_a17f {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".active_2ee6" 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.top_5172 so it can't cause
   horizontal overflow anyway. */
.down_d00d,
.logo-7f75,
.frame_white_30c4,
.modal-b44f,
.info_14c5,
.lite_30f3,
.overlay-2d2c,
.aside_fresh_f385,
.in_0509,
.copper-7b1f,
.basic_ddd5 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .label_small_82de {
    padding: 8px 0;
  }
  
  .south_71e2 img {
    height: 28px;
    width: auto;
  }
  
  .focused_974e {
    display: none !important;
  }
  
  .steel_58ee {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .steel_58ee svg {
    width: 14px;
    height: 14px;
  }
  
  .medium-1bc9 {
    padding: 6px;
  }
  
  .heading-red-0b0d {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .frame_white_30c4,
  .logo-7f75,
  .modal-b44f,
  .info_14c5,
  .layout_7700,
  .paragraph_f170,
  .message_e392,
  .box_under_e2f9,
  .active_70fd,
  .texture_864e,
  .stone_a11d,
  .gas-ba1e {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .outer_d7d2,
  .row-fast-2dd3 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .highlight_fixed_5dc9,
  .notification_slow_3d54,
  .gold_2c69,
  .form-84b8,
  .last_d4ed,
  .item_3782,
  .fast_ac9f {
    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 */
  .accordion_medium_358b,
  .border_129d,
  .progress_up_e4ef,
  .fresh_9d7a,
  .chip-d123 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .main-91d9,
  .breadcrumb-liquid-2d3f,
  .gas_252f,
  .active_650a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .current-57d4,
  .hard_bd85 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .photo-4e47,
  .slider-full-e14d,
  .table-blue-3822,
  .tiny-79fb {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .search-2dbd,
  .accent_4a0b,
  .tertiary_6164,
  .aside-c2c1,
  .card-prev-2ac2,
  .header_white_2020 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .accordion_medium_358b,
  .border_129d,
  .fresh_9d7a {
    max-width: none !important;
  }
  
  .active_2ee6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .main-91d9 {
    font-size: 1.5rem !important;
  }
  
  .breadcrumb-liquid-2d3f {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .row-slow-2c23,
  .black_d708 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .gas_252f {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .outline_simple_4e9f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .logo_6849 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .accordion_medium_358b,
  .fresh_9d7a {
    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: c778 */
.shadow-element-d8 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.2;
}
