/* ============================================
   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 (.liquid_ad5f) is a descendant of
   .gradient-tall-6905 (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.block_gas_2af2 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".list_b11f" 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.steel-7538 so it can't cause
   horizontal overflow anyway. */
.north-9b10,
.aside_short_89ee,
.description_next_caed,
.fluid-fc7e,
.input-static-c9a0,
.header_bright_ddb5,
.motion_20ff,
.module-fe1a,
.main-f976,
.picture-bronze-a569,
.wrapper-fe8b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .fluid_10fc {
    padding: 8px 0;
  }
  
  .frame_solid_41a1 img {
    height: 28px;
    width: auto;
  }
  
  .table_north_3b7d {
    display: none !important;
  }
  
  .shadow-070a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .shadow-070a svg {
    width: 14px;
    height: 14px;
  }
  
  .title-next-ce54 {
    padding: 6px;
  }
  
  .summary-rough-e460 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .description_next_caed,
  .aside_short_89ee,
  .fluid-fc7e,
  .input-static-c9a0,
  .title-6801,
  .rough-7d55,
  .tag_231b,
  .preview_next_09d0,
  .link-dad3,
  .progress-old-65e3,
  .bronze_45fb,
  .paper-9cf6 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .inner_d015,
  .thick_2d20 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .west_5427,
  .next_a506,
  .hard_9feb,
  .badge-1cf0,
  .grid_9574,
  .card-outer-d1d6,
  .description-under-a47a {
    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 */
  .info_up_7d9f,
  .section_dd85,
  .slider-8fa6,
  .grid_e822,
  .badge-new-fd89 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .middle-98e9,
  .next-4ab7,
  .nav_dcfd,
  .sort-active-d04a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .thumbnail_tiny_f97b,
  .east-cce8 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .banner-pink-e3d3,
  .carousel-hard-6f85,
  .detail-simple-e4e0,
  .container_65db {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .surface_cool_263f,
  .dirty-2cfd,
  .outline-fast-9d18,
  .south_fa1a,
  .background_8a4a,
  .description-ef3f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .info_up_7d9f,
  .section_dd85,
  .grid_e822 {
    max-width: none !important;
  }
  
  .list_b11f {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .middle-98e9 {
    font-size: 1.5rem !important;
  }
  
  .next-4ab7 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .highlight_059f,
  .cold_0232 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .nav_dcfd {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .preview_complex_de23 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .element-narrow-1890 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .info_up_7d9f,
  .grid_e822 {
    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: a1a6 */
.widget-item-n0 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.0;
}
