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

body {
  overflow-x: hidden;
}

.rvx-mobile-toggle {
  display: none;
}

@media (max-width: 860px) {
  body[data-rvx-nav-open="true"] {
    overflow: hidden;
  }

  nav[data-rvx-mobile="ready"] {
    padding: 1rem 1.25rem !important;
    gap: 1rem;
  }

  nav[data-rvx-mobile="ready"] .nav-logo {
    max-width: calc(100% - 4.5rem);
  }

  nav[data-rvx-mobile="ready"] .rvx-mobile-toggle {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.28rem;
    width: 2.75rem;
    height: 2.75rem;
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text, #f0ede4);
    cursor: pointer;
    flex-shrink: 0;
  }

  nav[data-rvx-mobile="ready"] .rvx-mobile-toggle-line {
    width: 1rem;
    height: 1px;
    background: currentColor;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  nav[data-rvx-mobile="ready"][data-rvx-open="true"] .rvx-mobile-toggle-line:nth-child(1) {
    transform: translateY(0.38rem) rotate(45deg);
  }

  nav[data-rvx-mobile="ready"][data-rvx-open="true"] .rvx-mobile-toggle-line:nth-child(2) {
    opacity: 0;
  }

  nav[data-rvx-mobile="ready"][data-rvx-open="true"] .rvx-mobile-toggle-line:nth-child(3) {
    transform: translateY(-0.38rem) rotate(-45deg);
  }

  nav[data-rvx-mobile="ready"] .nav-links,
  nav[data-rvx-mobile="ready"] .nav-r {
    position: fixed;
    top: calc(var(--rvx-nav-height, 64px) - 1px);
    left: 0;
    right: 0;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.9rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom));
    background: rgba(11, 11, 9, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 22px 44px rgba(0, 0, 0, 0.36);
    max-height: calc(100svh - var(--rvx-nav-height, 64px));
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  }

  nav[data-rvx-mobile="ready"][data-rvx-open="true"] .nav-links,
  nav[data-rvx-mobile="ready"][data-rvx-open="true"] .nav-r {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  nav[data-rvx-mobile="ready"] .nav-links a,
  nav[data-rvx-mobile="ready"] .nav-r a {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    white-space: normal;
  }

  nav[data-rvx-mobile="ready"] .nav-links a:last-child,
  nav[data-rvx-mobile="ready"] .nav-r a:last-child {
    border-bottom: none;
  }

  nav[data-rvx-mobile="ready"] .nav-cta,
  nav[data-rvx-mobile="ready"] .btn-gold {
    width: 100%;
    justify-content: center !important;
    margin-top: 0.4rem;
    padding: 0.95rem 1rem !important;
  }

  .hero,
  .page-state {
    min-height: 100svh;
  }

  .hero,
  .section,
  .manifesto,
  .waitlist-section,
  .page-header,
  .filter-bar,
  .filters,
  .listings-body,
  .intel-body,
  .form-wrapper,
  .content,
  .content-wide,
  .explorer,
  .fw-sec,
  .cta-sec,
  .back-bar,
  .city-detail-header,
  .corridor-pills-bar,
  .corridor-detail,
  .cta-strip,
  footer {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .divider {
    width: calc(100% - 2.5rem) !important;
    margin-left: 1.25rem !important;
    margin-right: 1.25rem !important;
  }

  .corridor,
  .zones-grid,
  .dd-grid,
  .why-grid,
  .scores-grid,
  .field-grid,
  .price-row,
  .listings-grid,
  .cities-grid,
  .zpanel.active,
  .fw-grid,
  .dev-grid {
    grid-template-columns: 1fr !important;
  }

  .field-grid .full {
    grid-column: 1 !important;
  }

  .hero-actions,
  .hero-meta,
  .city-card-top,
  .waitlist-form,
  .cta-form,
  .submit-area,
  .corridor-cta,
  .cta-strip {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .filter-group,
  .filter-select {
    width: 100%;
  }

  .filter-select {
    min-width: 0 !important;
  }

  .filter-results {
    margin-left: 0 !important;
    align-self: flex-start !important;
  }

  .size-combo {
    flex-direction: column;
  }

  .size-combo input[type="number"] {
    border-right: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .unit-select {
    width: 100% !important;
    min-width: 0 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .infra-item {
    grid-template-columns: 2rem 1fr !important;
    gap: 0.9rem !important;
  }

  .infra-badge {
    grid-column: 2;
    justify-self: flex-start;
  }

  .hero-right {
    height: min(72vw, 24rem) !important;
  }

  .map-info,
  .map-legend {
    max-width: calc(100vw - 2.5rem);
    min-width: 0;
  }

  .hero-stats {
    grid-template-columns: 1fr !important;
  }

  .modal,
  .modal-card {
    width: calc(100% - 1.5rem) !important;
    max-height: calc(100svh - 1.5rem);
    overflow-y: auto;
  }

  .toast {
    width: calc(100% - 1.5rem) !important;
    min-width: 0 !important;
    bottom: 1rem !important;
  }
}

@media (max-width: 560px) {
  .page-header {
    padding-top: 7rem !important;
  }

  .hero {
    padding-top: 7rem !important;
  }

  .hero-meta {
    gap: 1rem !important;
  }

  .filter-bar,
  .filters {
    gap: 0.75rem !important;
  }
}
