html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

input,
textarea,
select,
button {
  box-sizing: border-box;
}

.nav-toggle {
  display: none;
  appearance: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.26rem;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease;
}

.nav-toggle span {
  display: block;
  width: 1.2rem;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.mobile-recycle-cta {
  display: none;
}

footer {
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

footer p:last-child {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 0.65rem;
  line-height: 1.6;
}

footer p:last-child > a,
footer p:last-child > button {
  white-space: nowrap;
}

.feature,
.legal-card,
.highlight,
form,
.error-card {
  min-width: 0;
}

@media (max-width: 700px) {
  html {
    scroll-padding-top: 5.5rem;
  }

  body.rtp-has-mobile-cta footer {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px));
  }

  nav {
    padding-top: calc(0.85rem + env(safe-area-inset-top, 0px)) !important;
  }

  .nav-container {
    gap: 0.65rem 0.85rem !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .logo-link {
    min-width: 0;
  }

  .brand-text {
    max-width: min(52vw, 12rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.5);
  }

  nav[data-mobile-ready="true"] .nav-links {
    display: none !important;
    width: 100% !important;
    grid-template-columns: 1fr !important;
    justify-content: stretch !important;
    gap: 0.3rem !important;
    padding: 0.7rem 0.9rem 0.85rem;
    background: rgba(17, 84, 41, 0.2);
    border-radius: 18px;
  }

  nav[data-mobile-ready="true"].is-open .nav-links {
    display: grid !important;
  }

  .nav-links a {
    font-size: 0.95rem !important;
    line-height: 1.35;
    text-align: left;
  }

  nav[data-mobile-ready="true"] .nav-links a {
    display: block;
    width: 100%;
    padding: 0.8rem 0;
  }

  nav[data-mobile-ready="true"] .nav-links a + a {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  header {
    padding: 1.6rem 1rem 1.9rem !important;
  }

  header h1 {
    font-size: clamp(2rem, 8vw, 2.6rem) !important;
    line-height: 1.12;
    text-wrap: balance;
  }

  header p {
    font-size: 1.02rem !important;
    line-height: 1.55;
  }

  section {
    padding: 2rem 1rem !important;
  }

  .features {
    gap: 1rem !important;
  }

  .feature {
    flex-basis: 100% !important;
    border-radius: 18px;
    padding: 1.25rem !important;
  }

  .highlight,
  .legal-card,
  form {
    border-radius: 18px !important;
  }

  form {
    padding: 1.2rem !important;
  }

  .cta-btn,
  button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: min(100%, 22rem) !important;
    min-height: 3.25rem;
    padding: 0.95rem 1.2rem !important;
    text-align: center;
  }

  input,
  textarea,
  select,
  button {
    font-size: 16px !important;
  }

  textarea {
    min-height: 8rem;
  }

  footer {
    padding: 1.6rem 1rem calc(1.6rem + env(safe-area-inset-bottom, 0px));
  }

  footer p:last-child {
    flex-direction: column;
    gap: 0.55rem;
  }

  footer p:last-child > a,
  footer p:last-child > button {
    white-space: normal;
  }

  .mobile-recycle-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
    z-index: 1180;
    min-height: 3.5rem;
    padding: 0.9rem 1.25rem;
    border-radius: 999px;
    background: #ffffff;
    color: #14532d;
    border: 1px solid rgba(46, 204, 113, 0.35);
    box-shadow: 0 16px 40px rgba(20, 50, 30, 0.16);
    font-weight: 800;
    text-decoration: none;
    opacity: 0;
    pointer-events: none;
    transform: translateY(1rem);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  html[data-cookie-ui="closed"] .mobile-recycle-cta {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 1.08rem !important;
    max-width: 55vw;
  }

  nav[data-mobile-ready="true"] .nav-links {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }
}
