/* ============================================
   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 (.summary_6b77) is a descendant of
   .gradient_cool_b6e1 (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.caption-slow-8703 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".highlight_first_e3f6" 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.mask-99c4 so it can't cause
   horizontal overflow anyway. */
.feature_1191,
.gradient-dirty-3422,
.notice-down-e0fd,
.disabled-soft-e61f,
.iron_1a14,
.info-5a04,
.surface_e171,
.wrapper-short-0504,
.caption-86aa,
.widget-6fbb,
.tertiary_gold_42fc {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .medium_f6b1 {
    padding: 8px 0;
  }
  
  .overlay_cb15 img {
    height: 28px;
    width: auto;
  }
  
  .media-liquid-db1e {
    display: none !important;
  }
  
  .huge_4391 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .huge_4391 svg {
    width: 14px;
    height: 14px;
  }
  
  .silver-dd1f {
    padding: 6px;
  }
  
  .tag_cf0e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .notice-down-e0fd,
  .gradient-dirty-3422,
  .disabled-soft-e61f,
  .iron_1a14,
  .middle_4682,
  .lite-9110,
  .media_right_ee6d,
  .dirty_71a6,
  .focused_5eee,
  .picture_basic_b084,
  .highlight_0a81,
  .highlight_4a2a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .west-273f,
  .top_af3e {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .nav-tiny-3195,
  .heading-purple-9582,
  .left-d7c4,
  .gradient_2d50,
  .description-top-193a,
  .shadow_clean_cde8,
  .down_575c {
    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 */
  .message_0e21,
  .shadow-85db,
  .tabs_c796,
  .logo-current-3b76,
  .brown-131a {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .button-hot-d21a,
  .tall_2e39,
  .feature-short-9ecc,
  .notice_active_cdfe {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .old_afe6,
  .section-black-8a2e {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .soft_4dab,
  .block_under_51b6,
  .next_7f28,
  .tag-b050 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .easy-06de,
  .next_71c0,
  .current_9af3,
  .list_99ed,
  .selected-7390,
  .glass-f4a2 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .message_0e21,
  .shadow-85db,
  .logo-current-3b76 {
    max-width: none !important;
  }
  
  .highlight_first_e3f6 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .button-hot-d21a {
    font-size: 1.5rem !important;
  }
  
  .tall_2e39 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .east_1d65,
  .top-efa2 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .feature-short-9ecc {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .message_9626 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .nav_8025 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .message_0e21,
  .logo-current-3b76 {
    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: 3682 */
.ghost-box-c4 {
  padding: 0.2rem;
  font-size: 10px;
  line-height: 1.1;
}
