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

/* Fix for any potential overflow elements */
/* NOTE: ".progress_2abf" 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.section-white-b4f8 so it can't cause
   horizontal overflow anyway. */
.accent-1345,
.gradient-2d07,
.warm_1937,
.component_4757,
.menu-up-5735,
.highlight-f67b,
.preview-solid-6a56,
.hard-07c4,
.pattern-345f,
.module-light-f9ec,
.middle_642d {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .accent_action_bea3 {
    padding: 8px 0;
  }
  
  .focus_current_efda img {
    height: 28px;
    width: auto;
  }
  
  .border_aa6e {
    display: none !important;
  }
  
  .tiny-a52a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .tiny-a52a svg {
    width: 14px;
    height: 14px;
  }
  
  .bottom-0afd {
    padding: 6px;
  }
  
  .badge-silver-3e2e {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .warm_1937,
  .gradient-2d07,
  .component_4757,
  .menu-up-5735,
  .popup_first_fd1b,
  .east-ac22,
  .down_79a3,
  .module-0199,
  .tooltip-current-ed3d,
  .sidebar_f36e,
  .black_6a53,
  .title-basic-3744 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .highlight_e688,
  .north-0d98 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .solid_6c37,
  .primary-f30d,
  .clean_f1b1,
  .table_west_334f,
  .nav-red-ab63,
  .input_173c,
  .progress_59f3 {
    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 */
  .panel_pink_0f31,
  .tall_d1ca,
  .wood_32b4,
  .accordion_left_f7e3,
  .component-5e10 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .badge_070a,
  .wood_a2c8,
  .component-dirty-fcec,
  .secondary-smooth-99db {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .banner-a993,
  .chip-west-9ed9 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .prev-a3b4,
  .widget-green-9abc,
  .message_iron_2fb1,
  .notification_b7ba {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .dynamic_9714,
  .hidden-motion-3119,
  .grid-a9e0,
  .accordion-b12a,
  .aside_3bee,
  .list_liquid_a02f {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .panel_pink_0f31,
  .tall_d1ca,
  .accordion_left_f7e3 {
    max-width: none !important;
  }
  
  .progress_2abf {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .badge_070a {
    font-size: 1.5rem !important;
  }
  
  .wood_a2c8 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .main_lower_3012,
  .bronze_86ea {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .component-dirty-fcec {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .breadcrumb-2911 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .feature_5d02 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .panel_pink_0f31,
  .accordion_left_f7e3 {
    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: 7c6a */
.phantom-card-y4 {
  padding: 0.4rem;
  font-size: 11px;
  line-height: 1.1;
}
