/* ============================================
   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 (.input_next_c7a2) is a descendant of
   .picture_53c2 (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.label-static-99b9 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".out-c51d" 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.rough_067d so it can't cause
   horizontal overflow anyway. */
.hero-5264,
.selected_aa64,
.article-ac67,
.focused_18db,
.clean-70ad,
.modal_3e00,
.media-glass-23b2,
.large-39d4,
.tabs-7ba9,
.motion_a851,
.solid-a7a4 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .card_first_1a43 {
    padding: 8px 0;
  }
  
  .picture_iron_5df1 img {
    height: 28px;
    width: auto;
  }
  
  .accent-focused-b6b0 {
    display: none !important;
  }
  
  .modal-a1ed {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .modal-a1ed svg {
    width: 14px;
    height: 14px;
  }
  
  .gradient_outer_e2b6 {
    padding: 6px;
  }
  
  .pagination_6e91 {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .article-ac67,
  .selected_aa64,
  .focused_18db,
  .clean-70ad,
  .orange-55a3,
  .row-right-401a,
  .last-aba0,
  .footer-center-1b8b,
  .component_simple_ddc3,
  .inner-c170,
  .left-3c52,
  .icon_cc79 {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .notification_5df7,
  .block_cold_5f87 {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .title_old_2e5d,
  .alert_bottom_f796,
  .title_old_ab55,
  .panel_7cd7,
  .steel_5ece,
  .complex-de1e,
  .paragraph-easy-9be6 {
    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 */
  .overlay_new_ce82,
  .layout_2fcf,
  .red-d771,
  .gradient_pressed_8251,
  .box-5632 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .purple_28b7,
  .blue-e45c,
  .summary-50b3,
  .inner-2796 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .highlight_0358,
  .purple_d88d {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .avatar-a58d,
  .row_down_3d6f,
  .widget_aa82,
  .dark_e15e {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .disabled-white-7708,
  .fluid_30f7,
  .new_5289,
  .gallery-5120,
  .overlay-solid-030e,
  .inner_ce24 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .overlay_new_ce82,
  .layout_2fcf,
  .gradient_pressed_8251 {
    max-width: none !important;
  }
  
  .out-c51d {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .purple_28b7 {
    font-size: 1.5rem !important;
  }
  
  .blue-e45c {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .breadcrumb_f267,
  .selected_c5ac {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .summary-50b3 {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .picture-95e1 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .detail_fluid_ade4 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .overlay_new_ce82,
  .gradient_pressed_8251 {
    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: 0b63 */
.widget-item-t1 {
  padding: 0.1rem;
  font-size: 14px;
  line-height: 1.3;
}
