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

/* Fix for any potential overflow elements */
/* NOTE: ".wrapper-stone-60da" 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.status-focused-3c34 so it can't cause
   horizontal overflow anyway. */
.focus-ffcf,
.notification-pro-8fd4,
.clean_ea4c,
.pagination_old_18bf,
.menu-58af,
.right_2ec8,
.container-7203,
.cool_1e5e,
.white-bf45,
.progress-right-2a61,
.shadow_cold_a82e {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .inner-27b9 {
    padding: 8px 0;
  }
  
  .hidden_narrow_2c17 img {
    height: 28px;
    width: auto;
  }
  
  .preview-cae7 {
    display: none !important;
  }
  
  .dirty_28cc {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .dirty_28cc svg {
    width: 14px;
    height: 14px;
  }
  
  .table_1c6c {
    padding: 6px;
  }
  
  .slider-2fb3 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .clean_ea4c,
  .notification-pro-8fd4,
  .pagination_old_18bf,
  .menu-58af,
  .easy-d515,
  .notification_steel_b47c,
  .overlay-c477,
  .image-1b32,
  .widget_in_0f7b,
  .tertiary_middle_6bc4,
  .hover_static_7ddf,
  .container-b140 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .grid_next_aaf8,
  .slider_87e2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .hero_d31d,
  .current-b8b2,
  .container-c754,
  .west_219d,
  .module-a312,
  .block-prev-ca1f,
  .narrow_e0c2 {
    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 */
  .picture-green-242c,
  .widget-8cb7,
  .new_b43b,
  .hero_copper_a0d6,
  .summary_bottom_0a04 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .mask-7134,
  .sidebar_black_e8f9,
  .paper_61cb,
  .pagination-235c {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .basic-df43,
  .pagination-daba {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .texture-blue-3259,
  .banner-steel-c992,
  .aside-5ca1,
  .paragraph-up-7b05 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .wide_b5cb,
  .gradient-active-1b44,
  .thick-9328,
  .huge-9cb5,
  .paragraph_pressed_51bf,
  .list-left-f3b9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .picture-green-242c,
  .widget-8cb7,
  .hero_copper_a0d6 {
    max-width: none !important;
  }
  
  .wrapper-stone-60da {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .mask-7134 {
    font-size: 1.5rem !important;
  }
  
  .sidebar_black_e8f9 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .highlight_prev_d7ba,
  .active-red-5471 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .paper_61cb {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .iron-497f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .notification_f922 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .picture-green-242c,
  .hero_copper_a0d6 {
    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: 1745 */
.ghost-box-e4 {
  padding: 0.5rem;
  font-size: 11px;
  line-height: 1.0;
}
