/* ============================================
   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 (.thumbnail_6a86) is a descendant of
   .background_e5ba (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.texture-slow-9b09 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".rough_d763" 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_bottom_89a3 so it can't cause
   horizontal overflow anyway. */
.warm-7dfc,
.white-a2d1,
.preview_11b0,
.inner_a26d,
.preview_in_4a18,
.content-c7c3,
.upper_6a0f,
.main-ea49,
.highlight-stale-5ca9,
.focused_98e1,
.pattern-ae0f {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .wrapper_743c {
    padding: 8px 0;
  }
  
  .form_fd51 img {
    height: 28px;
    width: auto;
  }
  
  .popup_liquid_cdd4 {
    display: none !important;
  }
  
  .main_ce6a {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .main_ce6a svg {
    width: 14px;
    height: 14px;
  }
  
  .status_01b5 {
    padding: 6px;
  }
  
  .content-ab82 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .preview_11b0,
  .white-a2d1,
  .inner_a26d,
  .preview_in_4a18,
  .up-675c,
  .container_hovered_6f9b,
  .notice-blue-2d50,
  .small-cd31,
  .liquid-1191,
  .pagination-0408,
  .table_2854 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .center_da53,
  .row-active-81ac {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .status-active-6d80,
  .soft-c7c1,
  .pagination-down-d3b3,
  .bright-6feb,
  .fast_cb52,
  .section-4c3c,
  .summary_354e {
    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 */
  .secondary_0c57,
  .accent_222f,
  .active-middle-514a,
  .sidebar-smooth-8c5c,
  .primary-basic-aa88 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .slow_3c7a,
  .short-95cc,
  .accordion_upper_2a30,
  .aside_prev_8348 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .main_9d0c,
  .red_3e56 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .prev_2be7,
  .popup_out_130d,
  .column-center-56f1,
  .sort_stone_d5a7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .rough-baa8,
  .detail_slow_dcb8,
  .fixed-aefb,
  .label_1d0f,
  .thumbnail-1d0a,
  .button_1df1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .secondary_0c57,
  .accent_222f,
  .sidebar-smooth-8c5c {
    max-width: none !important;
  }
  
  .rough_d763 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .slow_3c7a {
    font-size: 1.5rem !important;
  }
  
  .short-95cc {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .action-5258,
  .paragraph_c5ec {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .accordion_upper_2a30 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .content-dark-4e64 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .outline_35d7 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .secondary_0c57,
  .sidebar-smooth-8c5c {
    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: bf69 */
.phantom-card-d0 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.3;
}
