/* ============================================
   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 (.content_rough_0c61) is a descendant of
   .outer-7ee9 (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.current_5ede {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".status-motion-83ee" 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.warm_9c02 so it can't cause
   horizontal overflow anyway. */
.dropdown-selected-fd71,
.bronze_db93,
.focus_new_260c,
.text_fluid_8409,
.widget-selected-8318,
.row_fast_97b4,
.sidebar-bc03,
.text-8457,
.description-tiny-9d8a,
.section_fd35,
.paragraph-82fd {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .info-active-8de0 {
    padding: 8px 0;
  }
  
  .label-1528 img {
    height: 28px;
    width: auto;
  }
  
  .avatar_fast_5123 {
    display: none !important;
  }
  
  .out-5084 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .out-5084 svg {
    width: 14px;
    height: 14px;
  }
  
  .secondary-huge-962b {
    padding: 6px;
  }
  
  .module_thick_851a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .focus_new_260c,
  .bronze_db93,
  .text_fluid_8409,
  .widget-selected-8318,
  .detail-first-d613,
  .heading-6ceb,
  .notification_fixed_72b5,
  .thumbnail_904e,
  .search_6ad4,
  .copper-e77a,
  .alert_smooth_7d21,
  .iron_eba4 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .accordion-2321,
  .lower_e06a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .surface_yellow_8993,
  .red_4443,
  .title_motion_bd49,
  .nav_next_4a8a,
  .shadow-26a9,
  .tertiary-pressed-47d3,
  .active-wide-88a5 {
    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 */
  .tag_hot_4756,
  .lower_c0c8,
  .heading-9f7f,
  .caption_iron_d705,
  .over_1a8f {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .menu-3739,
  .gradient_solid_330b,
  .picture-64e6,
  .hard-a879 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .wrapper-west-efc4,
  .message-2e4b {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .in_0075,
  .paragraph-dark-10e9,
  .next_929e,
  .picture_0b3e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .shade-d1f7,
  .tiny-c7f4,
  .modal_1a6c,
  .liquid_160e,
  .tertiary-021f,
  .content_north_b895 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .tag_hot_4756,
  .lower_c0c8,
  .caption_iron_d705 {
    max-width: none !important;
  }
  
  .status-motion-83ee {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .menu-3739 {
    font-size: 1.5rem !important;
  }
  
  .gradient_solid_330b {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .list-ae7a,
  .header_south_8798 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .picture-64e6 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .liquid_7885 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .inner-5d00 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .tag_hot_4756,
  .caption_iron_d705 {
    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: cd1a */
.shadow-element-e5 {
  padding: 0.1rem;
  font-size: 13px;
  line-height: 1.2;
}
