/* ============================================
   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 (.header_orange_99a2) is a descendant of
   .narrow-4181 (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.tertiary_wood_2ea4 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".overlay_fe58" 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.section_prev_3a65 so it can't cause
   horizontal overflow anyway. */
.menu_dynamic_707c,
.tooltip-9026,
.cool_e197,
.frame-warm-86fd,
.info_fac5,
.widget-bee6,
.card-434f,
.nav_cold_6e22,
.sidebar-5357,
.article-red-2c18,
.column_inner_1f6b {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .slow_3372 {
    padding: 8px 0;
  }
  
  .dim_2bb8 img {
    height: 28px;
    width: auto;
  }
  
  .tooltip-d0ea {
    display: none !important;
  }
  
  .top_7ef0 {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .top_7ef0 svg {
    width: 14px;
    height: 14px;
  }
  
  .texture_886a {
    padding: 6px;
  }
  
  .card_8475 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .cool_e197,
  .tooltip-9026,
  .frame-warm-86fd,
  .info_fac5,
  .title-6200,
  .steel-9382,
  .background_in_92ec,
  .title_4065,
  .highlight-a494,
  .column-dirty-e6cf,
  .down_9533,
  .lite-6f3a {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .alert_pressed_8196,
  .panel-fresh-7ce2 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .top_c015,
  .component_bright_22ae,
  .accordion_tiny_991a,
  .text-22c4,
  .accent-advanced-5d0d,
  .bottom-56a2,
  .avatar_09da {
    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 */
  .article-aa2b,
  .row-518d,
  .block-e7f5,
  .card-active-a75b,
  .outline-narrow-37e0 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .notice_a3df,
  .layout-4fcb,
  .icon-yellow-d13e,
  .next-8beb {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .text_fast_ad66,
  .hover-iron-c79f {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .bronze_46b0,
  .new-9304,
  .button-c59c,
  .west-82c7 {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .menu-17a9,
  .module_b647,
  .popup_9ed5,
  .shadow_easy_12ae,
  .menu-over-e3f9,
  .layout_smooth_3487 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .article-aa2b,
  .row-518d,
  .card-active-a75b {
    max-width: none !important;
  }
  
  .overlay_fe58 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .notice_a3df {
    font-size: 1.5rem !important;
  }
  
  .layout-4fcb {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .logo-982e,
  .box-6ebb {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .icon-yellow-d13e {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .paragraph_south_8f7a {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .pink-2e2c {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .article-aa2b,
  .card-active-a75b {
    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: faf0 */
.widget-item-d0 {
  padding: 0.2rem;
  font-size: 14px;
  line-height: 1.0;
}
