/* ============================================
   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 (.in_c28d) is a descendant of
   .feature_warm_89bd (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.box_52a5 {
  max-width: none !important;
}

/* Fix for any potential overflow elements */
/* NOTE: ".main_acc0" 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.link-c3e3 so it can't cause
   horizontal overflow anyway. */
.middle-1c4b,
.orange_2c68,
.prev_7213,
.button-hot-d03a,
.summary-north-9a5e,
.form-first-724d,
.pagination-gold-b943,
.over-b2a5,
.progress-7f1b,
.left_8db9,
.paragraph-white-1d32 {
  max-width: 100%;
  overflow-x: hidden;
}

/* Header mobile optimizations */
@media (max-width: 768px) {
  .status-93a9 {
    padding: 8px 0;
  }
  
  .overlay-7c6c img {
    height: 28px;
    width: auto;
  }
  
  .shadow-right-1797 {
    display: none !important;
  }
  
  .secondary-abec {
    padding: 6px 12px !important;
    font-size: 0.8125rem !important;
    white-space: nowrap;
  }
  
  .secondary-abec svg {
    width: 14px;
    height: 14px;
  }
  
  .module-392a {
    padding: 6px;
  }
  
  .table_1e6c {
    width: 20px;
  }
}

/* Mobile-specific fixes (phones) */
@media (max-width: 768px) {
  /* Force single column layout */
  .prev_7213,
  .orange_2c68,
  .button-hot-d03a,
  .summary-north-9a5e,
  .panel_simple_657f,
  .chip_17dd,
  .notice_iron_bf38,
  .avatar_fixed_65ce,
  .pattern-7d36,
  .footer_7249,
  .layout-next-e1d3,
  .main-hot-447c {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
  }
  
  /* Ensure tables are scrollable */
  .overlay-silver-6395,
  .box_pink_eb4a {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Fix any fixed-width elements */
  .button-bdef,
  .smooth_b762,
  .popup_dim_ad75,
  .hidden-stale-6551,
  .table_dc0b,
  .layout_32e5,
  .brown_96d6 {
    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 */
  .footer_fresh_155f,
  .hover-b137,
  .tertiary-focused-f3b0,
  .north_6fa9,
  .yellow_987e {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Fix text overflow */
  h1, h2, h3, h4, h5, h6,
  p, span, a, li, td, th,
  .rough-578c,
  .block-b2a6,
  .layout_524b,
  .last-133a {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
  }
  
  /* Fix code blocks */
  pre,
  code,
  .info_glass_bfd3,
  .black-8563 {
    overflow-x: auto !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
  }
  
  /* Fix buttons */
  .search-e769,
  .footer-a40b,
  .photo_in_ad14,
  .lite_dc1d {
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Fix flex containers */
  .notification-dirty-5c45,
  .element_last_bb75,
  .outline-1a35,
  .pattern_first_926b,
  .outline_6170,
  .item-6cd1 {
    flex-wrap: wrap !important;
    width: 100% !important;
  }
}

/* Extra small screens (≤480px) */
@media (max-width: 480px) {
  /* Even more aggressive fixes */
  * {
    max-width: 100vw !important;
  }
  
  section,
  .footer_fresh_155f,
  .hover-b137,
  .north_6fa9 {
    max-width: none !important;
  }
  
  .main_acc0 {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
  
  /* Reduce font sizes if needed */
  .rough-578c {
    font-size: 1.5rem !important;
  }
  
  .block-b2a6 {
    font-size: 1.375rem !important;
  }
  
  /* Stack everything */
  .title-675f,
  .title_yellow_5277 {
    flex-direction: column !important;
  }
  
  /* Smaller stat values */
  .layout_524b {
    font-size: 2rem !important;
  }
  
  /* Ensure score circles fit */
  .accent_right_0d94 {
    width: 100px !important;
    height: 100px !important;
    font-size: 2.5rem !important;
  }
  
  .description_north_e764 {
    width: 140px !important;
    height: 140px !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .footer_fresh_155f,
  .north_6fa9 {
    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: 56df */
.widget-item-f0 {
  padding: 0.3rem;
  font-size: 10px;
  line-height: 1.3;
}
