/* ============================================
   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 (.container_abba) is a descendant of
   .under-c2db (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.table_cool_227d {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".label-81cf" 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.north_3202 so it can't cause
   horizontal overflow anyway. */
.mini_9166,
.active_4f1b,
.card-advanced-dc91,
.disabled-wood-72cf,
.block-dbb2,
.hidden-hard-de0b,
.pagination_slow_6458,
.video-b726,
.banner_over_1469,
.hard-c130,
.border-bottom-8981 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .outline-cd99 {
    padding: 8px 0;
  }
  
  .outer-a52b img {
    height: 28px;
    width: auto;
  }
  
  .panel_iron_78af {
    display: none !important;
  }
  
  .action_dddd {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .action_dddd svg {
    width: 14px;
    height: 14px;
  }
  
  .widget_dim_2a2b {
    padding: 6px;
  }
  
  .caption_a25b {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .card-advanced-dc91,
  .active_4f1b,
  .disabled-wood-72cf,
  .block-dbb2,
  .pressed_0df5,
  .background-last-5b53,
  .pattern-hot-82df,
  .texture_lower_17e7,
  .paragraph-cd1a,
  .chip_wood_1b8b,
  .medium_2bfb,
  .avatar-motion-8b18 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .panel_copper_d6c3,
  .focus-dynamic-2e5b {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .modal-copper-e71f,
  .plasma-429e,
  .active-f9fd,
  .tag_green_3af8,
  .primary_efc7,
  .orange_52b9,
  .layout_1cfa {
    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 */
  .cool-735e,
  .overlay_3282,
  .dropdown-e2ec,
  .sidebar_5969,
  .feature-liquid-c845 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .picture-basic-111f,
  .form-stone-2e11,
  .disabled_4d1a,
  .lite_16df {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .article_motion_bac8,
  .easy-4247 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .video-bce6,
  .highlight-outer-12fe,
  .tooltip-soft-131d,
  .frame_d1bc {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .center_55cf,
  .hidden-hovered-7c80,
  .new-5c00,
  .border-thick-054e,
  .row_6d6b,
  .alert_6894 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .cool-735e,
  .overlay_3282,
  .sidebar_5969 {
    max-width: none !important;
  }
  
  .label-81cf {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .picture-basic-111f {
    font-size: 1.5rem !important;
  }
  
  .form-stone-2e11 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .large-7966,
  .slow-01ac {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .disabled_4d1a {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .footer_e072 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .center_8a96 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .cool-735e,
  .sidebar_5969 {
    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: 3c45 */
.promo-block-k8 {
  padding: 0.5rem;
  font-size: 14px;
  line-height: 1.0;
}
