/* ============================================
   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 (.video-yellow-d7e2) is a descendant of
   .slow-68f2 (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.paragraph-e227 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".paper-d0ff" 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.tooltip-b83c so it can't cause
   horizontal overflow anyway. */
.gold-a7d0,
.brown-2da6,
.block_simple_288a,
.modal_b2cc,
.solid_6df7,
.focus-east-bc39,
.stale_5116,
.narrow_cbba,
.description_plasma_0f1e,
.panel-mini-87a6,
.status-down-eaec {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .in_e50f {
    padding: 8px 0;
  }
  
  .narrow_01de img {
    height: 28px;
    width: auto;
  }
  
  .breadcrumb_steel_d614 {
    display: none !important;
  }
  
  .label_wood_a2b6 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .label_wood_a2b6 svg {
    width: 14px;
    height: 14px;
  }
  
  .red_2ff9 {
    padding: 6px;
  }
  
  .avatar-bronze-c52a {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .block_simple_288a,
  .brown-2da6,
  .modal_b2cc,
  .solid_6df7,
  .tertiary_pressed_972c,
  .row-cold-c933,
  .dim-315c,
  .paragraph_purple_5cdd,
  .component-db43,
  .header-c23b,
  .inner_25e8,
  .mask_0f64 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .sidebar-d9ca,
  .filter_8930 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .icon-up-36c9,
  .cool-9681,
  .frame_bottom_5eeb,
  .white_ed4c,
  .black-a969,
  .picture_66c0,
  .fixed-7ceb {
    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 */
  .wide-02fb,
  .steel-6676,
  .advanced_e43f,
  .outline-cb12,
  .lower_08ca {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .feature-down-d795,
  .focus_c8df,
  .text_d55c,
  .input-93e4 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .outer_fa4a,
  .smooth-ff08 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .plasma_3efc,
  .filter-tiny-439a,
  .shade_eff4,
  .heading-selected-19c0 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .hover_bright_730c,
  .element-gas-3e99,
  .gallery-middle-7efb,
  .paragraph-rough-f88b,
  .banner_3779,
  .outer-b1c0 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .wide-02fb,
  .steel-6676,
  .outline-cb12 {
    max-width: none !important;
  }
  
  .paper-d0ff {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .feature-down-d795 {
    font-size: 1.5rem !important;
  }
  
  .focus_c8df {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .hard-7c4a,
  .black-9b18 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .text_d55c {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .glass-a17f {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .medium_b70b {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .wide-02fb,
  .outline-cb12 {
    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: e6af */
.promo-block-t7 {
  padding: 0.3rem;
  font-size: 14px;
  line-height: 1.0;
}
