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

/* Fix for any potential overflow elements */
/* NOTE: ".focus-selected-85dc" 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.hovered-54f0 so it can't cause
   horizontal overflow anyway. */
.overlay_5391,
.focus-9c46,
.liquid_067d,
.button_fast_7ce1,
.thumbnail-center-70e4,
.menu_upper_84ff,
.lite-4285,
.aside_dad1,
.description-e68a,
.section-rough-2fa7,
.content-97ef {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .hovered_468e {
    padding: 8px 0;
  }
  
  .hot_f271 img {
    height: 28px;
    width: auto;
  }
  
  .fresh-c843 {
    display: none !important;
  }
  
  .mask-focused-2683 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .mask-focused-2683 svg {
    width: 14px;
    height: 14px;
  }
  
  .notice-tall-9351 {
    padding: 6px;
  }
  
  .summary_307f {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .liquid_067d,
  .focus-9c46,
  .button_fast_7ce1,
  .thumbnail-center-70e4,
  .tertiary-wood-357c,
  .bottom-9da2,
  .button-c3c7,
  .hover-simple-a208,
  .button_8eb1,
  .east-6a96,
  .widget-2ed2 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .list-dirty-1ff4,
  .breadcrumb_f443 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .focus-43c5,
  .slow_61f1,
  .sidebar-e866,
  .notification_dark_e7c3,
  .button_under_3d52,
  .accent_9a17,
  .accordion-rough-3ccf {
    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 */
  .wood_ee92,
  .logo_motion_34e8,
  .tabs_gold_75ad,
  .clean_7b40,
  .card-9759 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .pattern_middle_5503,
  .steel_79b5,
  .tag_warm_8b20,
  .hover_42ff {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .card_1ea3,
  .text_out_b774 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .gallery_01eb,
  .hidden-static-924b,
  .red_2efb,
  .large-3c4a {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .article-1488,
  .liquid-eaca,
  .hard_94f6,
  .frame_stone_97c2,
  .copper-9646,
  .red_3fcb {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .wood_ee92,
  .logo_motion_34e8,
  .clean_7b40 {
    max-width: none !important;
  }
  
  .focus-selected-85dc {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .pattern_middle_5503 {
    font-size: 1.5rem !important;
  }
  
  .steel_79b5 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .section_right_b894,
  .form_first_ad83 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .tag_warm_8b20 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .tooltip-513d {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .status-glass-c208 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wood_ee92,
  .clean_7b40 {
    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: 916c */
.phantom-card-c0 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.0;
}
