/* MY CUCI CLUB mobile experience layer — loaded after page styles */
:root {
  --mobile-pad: 16px;
  --tap: 44px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

body {
  min-width: 0;
  overflow-wrap: break-word;
}

img,
svg {
  max-width: 100%;
}

button,
a,
input,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  touch-action: manipulation;
}

:where(main, section, article, aside, div, dl, dd, td) {
  min-width: 0;
}

:where(p, li, dd, td, .pill, .tag, .evidence-line, .payment-chip, .source, .sources a) {
  overflow-wrap: anywhere;
}

.mobile-menu-toggle {
  display: none;
  width: var(--tap);
  height: var(--tap);
  flex: 0 0 var(--tap);
  place-items: center;
  padding: 0;
  border: 1px solid var(--line, rgba(255,255,255,.12));
  border-radius: 13px;
  background: rgba(255,255,255,.04);
  color: var(--cream, #f4f0e8);
  cursor: pointer;
}

.mobile-menu-toggle .menu-icon,
.mobile-menu-toggle .menu-icon::before,
.mobile-menu-toggle .menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 9px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.mobile-menu-toggle .menu-icon {
  position: relative;
}

.mobile-menu-toggle .menu-icon::before,
.mobile-menu-toggle .menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
}

.mobile-menu-toggle .menu-icon::before { top: -6px; }
.mobile-menu-toggle .menu-icon::after { top: 6px; }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon { background: transparent; }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.mobile-menu-toggle[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

.mobile-menu-drawer {
  display: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 850px) {
  html { scroll-padding-top: 68px; }
  body { padding-bottom: var(--safe-bottom); }

  .wrap {
    width: min(100% - (var(--mobile-pad) * 2), 1160px) !important;
  }

  .nav {
    padding-top: env(safe-area-inset-top, 0px);
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }

  .nav-inner,
  .navin {
    position: relative;
    min-height: 60px !important;
    height: 60px !important;
    gap: 8px !important;
  }

  .brand {
    min-width: 0;
    gap: 8px !important;
    letter-spacing: .045em !important;
    line-height: 1.15;
  }

  .brand small { display: none !important; }
  .brand-mark,
  .mark {
    width: 34px !important;
    height: 34px !important;
    flex: 0 0 34px;
    border-radius: 11px !important;
  }

  .mobile-menu-toggle { display: grid; }

  .mobile-menu-drawer {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 10px;
    border: 1px solid var(--line, rgba(255,255,255,.12));
    border-top: 0;
    border-radius: 0 0 18px 18px;
    background: rgba(11,29,25,.98);
    box-shadow: 0 22px 45px rgba(0,0,0,.32);
  }

  .mobile-menu-drawer.is-open {
    display: grid;
    gap: 4px;
  }

  .mobile-menu-drawer a {
    display: flex;
    min-height: var(--tap);
    align-items: center;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--cream, #f4f0e8) !important;
    font-size: 14px;
    font-weight: 750;
    text-decoration: none;
  }

  .mobile-menu-drawer a:active,
  .mobile-menu-drawer a:focus-visible {
    background: rgba(85,230,165,.1);
    color: var(--green, #55e6a5) !important;
    outline: 2px solid var(--green, #55e6a5);
    outline-offset: -2px;
  }

  /* Shared article/payment navigation receives a real mobile menu. */
  .navin > .links { display: none !important; }
  .navlinks > a { display: none !important; }
  .navin > .lang,
  .navlinks .lang {
    min-height: var(--tap);
    align-items: center;
  }

  .lang button,
  .lang-btn {
    min-width: 40px;
    min-height: 40px;
  }

  /* Back is in document flow on phones: no covered content or CTA. */
  .back-link {
    position: relative !important;
    inset: auto !important;
    min-height: var(--tap);
    margin: 12px var(--mobile-pad) 0 !important;
    padding: 10px 14px !important;
    box-shadow: none !important;
  }

  /* Shared long-form pages */
  .hero {
    padding: 42px 0 36px !important;
  }

  .back-link + .hero {
    padding-top: 30px !important;
  }

  .hero h1,
  h1 {
    max-width: 100%;
    font-size: clamp(36px, 10.5vw, 50px) !important;
    line-height: 1.06 !important;
    letter-spacing: -.035em !important;
    text-wrap: balance;
  }

  .lead {
    font-size: 16px !important;
    line-height: 1.65;
  }

  .crumb {
    margin-bottom: 20px !important;
    font-size: 12px !important;
  }

  .meta {
    gap: 7px !important;
    margin-top: 21px !important;
  }

  .pill {
    max-width: 100%;
    padding: 7px 10px !important;
    font-size: 11.5px !important;
    line-height: 1.4;
  }

  .layout,
  .grid2,
  .faq-grid,
  .collections,
  .disclosure-box {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .layout { gap: 30px !important; }

  .content section,
  main section {
    scroll-margin-top: 74px;
  }

  .content section {
    padding: 34px 0 !important;
  }

  .content h2,
  main section h2 {
    font-size: clamp(27px, 8vw, 36px) !important;
    line-height: 1.15 !important;
    text-wrap: balance;
  }

  .content h3 { line-height: 1.25; }

  .callout,
  .evidence-status,
  .panel,
  .method,
  .card {
    border-radius: 17px !important;
  }

  .callout,
  .evidence-status,
  .method,
  .panel {
    padding: 17px !important;
  }

  /* Every data table becomes readable key/value cards without sideways scrolling. */
  .tablewrap {
    overflow: visible !important;
    margin-inline: 0 !important;
    border: 0 !important;
    background: transparent !important;
  }

  table.mobile-cards {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    border: 0 !important;
  }

  table.mobile-cards thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
  }

  table.mobile-cards tbody,
  table.mobile-cards tr,
  table.mobile-cards td {
    display: block;
    width: 100%;
  }

  table.mobile-cards tr {
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid var(--line, rgba(255,255,255,.11));
    border-radius: 17px;
    background: var(--panel, #102722);
  }

  table.mobile-cards td {
    display: grid;
    grid-template-columns: minmax(88px, 34%) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-height: var(--tap);
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line, rgba(255,255,255,.09)) !important;
    font-size: 13px !important;
    line-height: 1.5;
    text-align: left !important;
  }

  table.mobile-cards td:last-child { border-bottom: 0 !important; }
  table.mobile-cards td::before {
    content: attr(data-label);
    color: var(--green, #55e6a5);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1.35;
    text-transform: uppercase;
  }

  .method dl {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .method dl > div,
  .method dd {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .summary article { min-width: 0; }

  .sources a {
    align-items: flex-start !important;
    gap: 6px !important;
  }

  /* Large tap areas throughout */
  .btn,
  .filter,
  .close,
  summary,
  .card,
  .category-tile,
  .sources a {
    min-height: var(--tap);
  }

  summary { align-items: flex-start; }
  .close {
    width: var(--tap) !important;
    height: var(--tap) !important;
  }

  .tag,
  .evidence-line,
  .payment-chip,
  .metric small,
  .fact small {
    font-size: 11px !important;
    line-height: 1.45;
  }

  footer {
    padding-bottom: calc(28px + var(--safe-bottom)) !important;
  }
}

@media (max-width: 650px) {
  :root { --mobile-pad: 16px; }

  /* Homepage navigation */
  .nav-inner { gap: 6px !important; }
  .nav-inner .brand { font-size: 13px; }
  .nav-inner .brand-mark { font-size: 9px; }
  .nav-actions { gap: 4px !important; }
  .mobile-toggle {
    display: grid !important;
    place-items: center;
    width: var(--tap) !important;
    height: var(--tap) !important;
    flex: 0 0 var(--tap);
  }
  .lang-switch { padding: 2px !important; }
  .lang-btn {
    min-width: 40px;
    min-height: 40px;
    padding: 6px !important;
  }

  .nav-links.open {
    top: 60px !important;
    padding: 10px var(--mobile-pad) 14px !important;
    gap: 4px !important;
    box-shadow: 0 22px 45px rgba(0,0,0,.32);
  }

  .nav-links.open a {
    display: flex;
    min-height: var(--tap);
    align-items: center;
    padding: 9px 10px;
    border-radius: 11px;
    color: var(--cream) !important;
  }

  /* Homepage first screen */
  .hero {
    padding: 46px 0 42px !important;
    overflow: hidden;
  }

  .hero-grid { gap: 24px !important; }
  .eyebrow { font-size: 10.5px !important; line-height: 1.55; }
  .hero h1 { margin: 16px 0 18px !important; }
  .hero-actions,
  .actions,
  .card-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 9px !important;
  }
  .hero-actions .btn,
  .actions .btn,
  .card-actions .btn {
    width: 100%;
    min-height: 48px;
  }

  .micro-trust {
    align-items: flex-start !important;
    gap: 12px !important;
    font-size: 11.5px !important;
    line-height: 1.5;
  }

  .visual {
    min-height: 370px !important;
    margin-top: 2px;
  }

  .orb {
    width: 290px !important;
    height: 290px !important;
    animation: none !important;
    opacity: .7;
  }

  .showcase {
    width: 100% !important;
    padding: 18px !important;
    border-radius: 24px !important;
  }

  .status-flag {
    right: 14px !important;
    top: 13px !important;
    max-width: 58%;
    font-size: 9px !important;
    white-space: normal;
    text-align: right;
  }

  .deal { margin: 20px 0 14px !important; padding: 14px !important; }
  .deal strong { font-size: 21px !important; line-height: 1.2; }
  .metrics { grid-template-columns: repeat(3, minmax(0,1fr)) !important; }
  .metric { min-width: 0; padding: 9px !important; }
  .metric b { display: block; overflow-wrap: anywhere; line-height: 1.25; }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .stat {
    min-width: 0;
    padding: 14px 12px !important;
    border-right: 1px solid var(--line) !important;
    border-bottom: 1px solid var(--line) !important;
  }
  .stat:nth-child(2n) { border-right: 0 !important; }
  .stat:nth-last-child(-n+2) { border-bottom: 0 !important; }
  .stat b { font-size: 22px !important; }

  section { padding: 62px 0 !important; }
  .section-head { margin-bottom: 28px !important; }
  .section-head h2 { font-size: clamp(30px, 9vw, 39px) !important; }

  .keyword-promo { padding: 20px !important; border-radius: 20px !important; }
  .keyword-promo > div:last-child {
    justify-content: flex-start !important;
  }
  .keyword-promo .btn { width: 100%; min-height: 48px; }

  .toolbar { align-items: stretch !important; }
  .filters {
    width: calc(100vw - var(--mobile-pad));
    margin-right: calc(var(--mobile-pad) * -1);
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    padding: 2px var(--mobile-pad) 7px 0;
  }
  .filters::-webkit-scrollbar { display: none; }
  .filter {
    min-height: var(--tap);
    flex: 0 0 auto;
    scroll-snap-align: start;
    padding: 10px 15px !important;
  }
  .search { min-height: 48px; }

  .partner-card { padding: 18px !important; }
  .partner-card.featured::after {
    right: -54px !important;
    top: 22px !important;
    padding-inline: 50px !important;
  }
  .card-top { flex-wrap: wrap; }
  .brand-lockup { width: 100%; min-width: 0; }
  .brand-lockup > div:last-child { min-width: 0; }
  .brand-lockup small { display: block; font-size: 11px !important; }
  .partner-logo { width: 74px !important; height: 50px !important; }
  .card-top .label { align-self: flex-start; font-size: 10px !important; }
  .offer strong { font-size: 21px !important; line-height: 1.25; }
  .facts { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
  .fact { min-width: 0; }
  .fact b { overflow-wrap: anywhere; }
  .payment-head { align-items: flex-start !important; gap: 8px; }

  .feature-panel { min-height: 0 !important; padding: 22px !important; }
  .feature-panel h3 { font-size: 30px !important; }
  .speed-row {
    grid-template-columns: 72px minmax(0, 1fr) !important;
    gap: 6px 10px !important;
    align-items: start !important;
  }
  .speed-row b { grid-column: 2; }
  .category-tile { min-height: 150px !important; }

  .disclosure-box { padding: 22px !important; }
  .faq h2 { font-size: 35px !important; }
  details { padding: 17px 2px !important; }
  details p { margin-right: 0 !important; font-size: 14px !important; }

  .footer-top,
  .copyright { gap: 20px !important; }
  .footer-links { display: grid !important; grid-template-columns: 1fr 1fr; }
  .footer-links a { display: flex; min-height: var(--tap); align-items: center; }

  /* Mobile modal becomes a reachable bottom sheet. */
  .modal-backdrop {
    align-items: end !important;
    padding: 0 !important;
  }
  .modal {
    width: 100% !important;
    max-height: 92dvh !important;
    padding: 22px 16px calc(20px + var(--safe-bottom)) !important;
    border-radius: 24px 24px 0 0 !important;
    overscroll-behavior: contain;
  }
  .modal h3 { padding-right: 44px; }
  .modal-offer strong { font-size: 21px !important; line-height: 1.25; }
  .toast {
    width: calc(100% - 32px);
    bottom: calc(14px + var(--safe-bottom)) !important;
    border-radius: 15px !important;
    text-align: center;
  }

  .noise { display: none !important; }
  .nav,
  .modal-backdrop,
  .back-link {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

@media (max-width: 380px) {
  :root { --mobile-pad: 14px; }
  .nav-inner .brand > span:last-child { font-size: 12px; }
  .nav-inner .brand-mark { width: 32px !important; height: 32px !important; flex-basis: 32px; }
  .lang-btn { min-width: 38px; }
  .hero h1,
  h1 { font-size: 36px !important; }
  table.mobile-cards td { grid-template-columns: minmax(78px, 31%) minmax(0,1fr); }
  .method dl { grid-template-columns: minmax(0, 1fr) !important; }
  .footer-links { grid-template-columns: 1fr; }
}

@media (hover: none), (pointer: coarse) {
  .partner-card:hover,
  .category-tile:hover,
  .btn:hover {
    transform: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
