/* ============================================
   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 (.accordion_brown_579e) is a descendant of
   .filter-d785 (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.card-a6b7 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".iron-3902" 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.wide-00ef so it can't cause
   horizontal overflow anyway. */
.summary_f0ca,
.grid_blue_17ed,
.sidebar_east_d74d,
.tabs_active_cfa3,
.hard-c083,
.sort-hard-da6f,
.description-pink-629b,
.status-left-f3b4,
.icon_inner_de39,
.container-basic-5042,
.outline-selected-d468 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .highlight-e41d {
    padding: 8px 0;
  }
  
  .dark_1b96 img {
    height: 28px;
    width: auto;
  }
  
  .dynamic-3771 {
    display: none !important;
  }
  
  .easy_d397 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .easy_d397 svg {
    width: 14px;
    height: 14px;
  }
  
  .block-024e {
    padding: 6px;
  }
  
  .sidebar_ffdc {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .sidebar_east_d74d,
  .grid_blue_17ed,
  .tabs_active_cfa3,
  .hard-c083,
  .plasma-0a3a,
  .caption_4d3b,
  .texture-paper-1396,
  .hidden_8ee7,
  .hover-87df,
  .shadow_11b3,
  .row-6fee,
  .silver-38fc {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .hero_1b20,
  .hard-3bed {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .footer-1d92,
  .east_2cb2,
  .glass_a063,
  .up_8eec,
  .inner_18c2,
  .green-c35a,
  .backdrop-1721 {
    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 */
  .text-3a19,
  .bottom-39fa,
  .heading_left_dacc,
  .gradient-thick-27d9,
  .photo-selected-8265 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .tag_hovered_c74c,
  .copper-45f1,
  .purple_63fe,
  .down-4789 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .article_b044,
  .row_north_00a7 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .table-motion-f50b,
  .article_a0fd,
  .focus-fluid-68a5,
  .picture-hard-578e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .under_1e43,
  .small-fc30,
  .tabs-8dae,
  .action_1e9a,
  .outline-glass-23b7,
  .outer_625c {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .text-3a19,
  .bottom-39fa,
  .gradient-thick-27d9 {
    max-width: none !important;
  }
  
  .iron-3902 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .tag_hovered_c74c {
    font-size: 1.5rem !important;
  }
  
  .copper-45f1 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .wrapper_63d6,
  .dim_c513 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .purple_63fe {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .sidebar_new_31f4 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .tabs_lower_c9c5 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .text-3a19,
  .gradient-thick-27d9 {
    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: 4de5 */
.shadow-element-q4 {
  padding: 0.4rem;
  font-size: 13px;
  line-height: 1.0;
}
