/* ============================================
   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 (.layout_solid_59ee) is a descendant of
   .summary_73f5 (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.complex_e7f8 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".small-5e28" 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.notice-glass-1629 so it can't cause
   horizontal overflow anyway. */
.complex_99e7,
.disabled_paper_4ff5,
.heading_wide_0c9f,
.outline_c74b,
.carousel_d80a,
.label_blue_a966,
.paper_daf6,
.bottom_dfe1,
.message-east-642b,
.pagination-rough-52af,
.accent-ffc0 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .photo-purple-b993 {
    padding: 8px 0;
  }
  
  .caption_complex_e2bf img {
    height: 28px;
    width: auto;
  }
  
  .description_copper_b716 {
    display: none !important;
  }
  
  .simple-1940 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .simple-1940 svg {
    width: 14px;
    height: 14px;
  }
  
  .out-33c2 {
    padding: 6px;
  }
  
  .up_9c07 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .heading_wide_0c9f,
  .disabled_paper_4ff5,
  .outline_c74b,
  .carousel_d80a,
  .content_thick_7829,
  .text_stone_efea,
  .logo_green_178a,
  .detail-5e95,
  .backdrop_17fa,
  .soft-2678,
  .outline_yellow_1225,
  .video_dynamic_0c34 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .section-548e,
  .detail-out-954c {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status-8125,
  .caption_south_2475,
  .shadow-6260,
  .center_cc93,
  .secondary-paper-6b89,
  .wrapper-inner-4e32,
  .shadow-liquid-f0e8 {
    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 */
  .pagination-b24a,
  .background_short_e9a7,
  .badge_dirty_a618,
  .soft-920a,
  .article_573f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .grid_c638,
  .logo-b6cb,
  .wood-c114,
  .motion-62d4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .tooltip_slow_641f,
  .north-614d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .soft-3234,
  .main-liquid-2c7f,
  .logo-b8ce,
  .accent-brown-5acd {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .row_clean_d883,
  .black-96f4,
  .steel-8dca,
  .search_mini_461d,
  .main_up_ebbd,
  .shadow_gold_c1a7 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .pagination-b24a,
  .background_short_e9a7,
  .soft-920a {
    max-width: none !important;
  }
  
  .small-5e28 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .grid_c638 {
    font-size: 1.5rem !important;
  }
  
  .logo-b6cb {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .table_fixed_cc30,
  .out_0850 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .wood-c114 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .summary-bf69 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .light-5321 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .pagination-b24a,
  .soft-920a {
    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: 7943 */
.widget-item-g9 {
  padding: 0.4rem;
  font-size: 12px;
  line-height: 1.2;
}
