/* ============================================
   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 (.slider-0739) is a descendant of
   .banner-4e12 (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.
   Two site templates coexist: legacy obfuscated-class (header.medium_67a2)
   and the redesigned template (header.content_center_6833). Keep both selectors. */
header.medium_67a2,
header.content_center_6833 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".content-2030" 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.easy_eec0 so it can't cause
   horizontal overflow anyway. */
.detail_fdc2,
.hidden-plasma-8a6e,
.easy_a8a2,
.right-9148,
.under-d01d,
.dropdown_slow_decf,
.icon_b568,
.panel_6dd8,
.focus_short_ea65,
.action-c78d,
.tooltip-84c5 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .dynamic-62ee {
    padding: 8px 0;
  }
  
  .thick-b67e img {
    height: 28px;
    width: auto;
  }
  
  .sidebar-5d4a {
    display: none !important;
  }
  
  .border_fixed_5281 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .border_fixed_5281 svg {
    width: 14px;
    height: 14px;
  }
  
  .text_upper_ec1b {
    padding: 6px;
  }
  
  .gold_fc1b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .easy_a8a2,
  .hidden-plasma-8a6e,
  .right-9148,
  .under-d01d,
  .gas_bb2a,
  .link_huge_a5dc,
  .hero-black-cd34,
  .tag_west_2c3e,
  .hero-north-0bc4,
  .paper_e8ab,
  .accordion_b6ff,
  .section-current-73ab {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .yellow-258a,
  .south_2efb {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .column_f01a,
  .accent-hard-a06a,
  .texture_dbdb,
  .frame-c722,
  .photo-8d83,
  .chip_6257,
  .dropdown_west_3565 {
    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 */
  .sidebar-884d,
  .footer_a32a,
  .shade-8c65,
  .right-3a43,
  .inner-80a1 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .fast_b87e,
  .label_9675,
  .popup-tiny-a056,
  .border_dad2 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .shadow_7fc1,
  .surface_ed63 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .detail_60bb,
  .widget_86ff,
  .aside-fast-71d9,
  .paper-cac6 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .selected-6757,
  .list-cc55,
  .light_04e9,
  .dropdown_21ee,
  .last-1045,
  .summary-a9b9 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .sidebar-884d,
  .footer_a32a,
  .right-3a43 {
    max-width: none !important;
  }
  
  .content-2030 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .fast_b87e {
    font-size: 1.5rem !important;
  }
  
  .label_9675 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .orange-fb6a,
  .heading_46fd {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .popup-tiny-a056 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .disabled_black_3ab5 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .outer-53af {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar-884d,
  .right-3a43 {
    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: 94a5 */
.panel_cd00 {
  padding: 0.1rem;
  font-size: 10px;
  line-height: 1.2;
}

/* css-noise: a962 */
.ghost-box-e4 {
  padding: 0.2rem;
  font-size: 12px;
  line-height: 1.0;
}
