body {
  font-family: Arial, sans-serif;
  background: #f6f6f6;
  color: #222;
  margin: 0;
  padding: 0;
}

a {
  color: #0645ad;
  text-decoration: none;
}

header,
main,
footer {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 16px;
  border-bottom: 1px solid #ddd;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.2px;
  background: linear-gradient(120deg, #0a6efd, #21c1d6, #8bc34a, #f7c948);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: logo-shimmer 6s ease-in-out infinite;
  text-decoration: none;
  position: relative;
}

.logo a::before {
  content: "";
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(10, 110, 253, 0.16), rgba(33, 193, 214, 0.18));
  box-shadow: 0 12px 28px rgba(10, 110, 253, 0.16);
  border: 1px solid rgba(10, 110, 253, 0.1);
}

.logo a::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 5px;
  width: 24px;
  height: 24px;
  background: linear-gradient(120deg, #0a6efd, #21c1d6, #8bc34a, #f7c948);
  background-size: 200% 200%;
  animation: logo-shimmer 6s ease-in-out infinite;
  clip-path: polygon(50% 0, 100% 35%, 100% 100%, 70% 100%, 70% 64%, 30% 64%, 30% 100%, 0 100%, 0 35%);
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(10, 110, 253, 0.18);
}

@keyframes logo-shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.nav-bar {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-link {
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
}

.nav-link:hover {
  background: #e8eefc;
}

.nav-logout {
  margin: 0;
}

.nav-logout .ghost {
  padding: 8px 12px;
  background: transparent;
  color: #0a6efd;
  border: 1px solid #0a6efd;
  width: auto;
}

.nav-logout-btn {
  background: transparent;
  color: #0645ad;
  border: none;
  width: auto;
  font-weight: 600;
  cursor: pointer;
  margin: 0;
}

.service-tagline {
  text-align: center;
  margin: 16px 0 24px 0;
  color: #444;
  font-size: 16px;
}

.service-tagline p {
  margin: 0;
}

.card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 4px;
}

form label {
  display: block;
  margin: 8px 0 4px;
}

input,
select,
textarea,
button {
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 14px;
  box-sizing: border-box;
}

button {
  background: #0a6efd;
  color: white;
  border: none;
  cursor: pointer;
}

button.secondary {
  background: #555;
}

button.danger {
  background: #d9534f;
}

.flash {
  padding: 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.flash.success {
  background: #d1f5e0;
  border: 1px solid #7bd79f;
}

.flash.error {
  background: #ffe0e0;
  border: 1px solid #f5a5a5;
}

.flash.info {
  background: #e8f0fe;
  border: 1px solid #b3c7ff;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.listing-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.listing-title {
  color: #0a6efd;
  font-weight: 700;
  font-size: 15px;
}

.listing-title:hover {
  text-decoration: underline;
}

.listing-price {
  color: #111;
}

.listing-description {
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

.listing-meta {
  color: #555;
  font-size: 12px;
}

.meta-separator {
  margin: 0 4px;
  color: #999;
}

.region-breadcrumb {
  font-size: 15px;
}

.region-breadcrumb a {
  color: #0645ad;
}

.region-directory {
  background: #fdfdfd;
}

.region-head {
  font-weight: 700;
  margin-bottom: 8px;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px 16px;
}

.state-grid {
  display: flex;
  flex-flow: column wrap;
  align-content: flex-start;
  gap: 10px 22px;
  max-height: 2200px;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.state-column {
  min-width: 220px;
  max-width: 280px;
}

.state-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  color: #000;
}

.city-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.city-item > a {
  font-weight: 400;
  color: #0645ad;
}

.region-area a {
  color: #222;
  font-weight: 700;
}

.region-column {
  padding-right: 8px;
}

.subregion-list {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
}

.subarea-list {
  list-style: none;
  padding-left: 14px;
  margin: 2px 0 0;
}

.subarea-list a {
  color: #0645ad;
  font-weight: 400;
}

@media (max-width: 960px) {
  .state-grid {
    max-height: none;
    flex-flow: column nowrap;
  }
}

.subregion-list li {
  margin: 2px 0;
}

.subregion-list a.selected-subregion {
  color: #000;
  font-weight: 700;
}

.muted-search summary {
  font-weight: 600;
  color: #444;
  cursor: pointer;
}

.muted-search details {
  margin: -4px 0 0;
}

.muted-search form {
  margin-top: 8px;
}

.compact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: center;
}
.compact-row > * {
  width: 100%;
}

@media (min-width: 900px) {
  .compact-row {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px) max-content;
  }
  .compact-row button {
    width: auto;
    justify-self: start;
  }
}

.advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.muted {
  color: #666;
  font-size: 12px;
}

.region-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 16px;
  align-items: start;
}

.region-main {
  min-width: 0;
}

.region-sidebar {
  min-width: 0;
}

@media (max-width: 640px) {
  header {
    flex-direction: column;
    align-items: flex-start;
  }
  .nav-bar {
    width: 100%;
    flex-wrap: wrap;
    gap: 8px;
  }
  .region-layout {
    grid-template-columns: 1fr;
  }
  .compact-row {
    grid-template-columns: 1fr;
  }
  .compact-row button {
    width: 100%;
  }
}

/* Location Modal */
.location-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.location-modal-content {
  background: white;
  border-radius: 8px;
  padding: 24px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  position: relative;
}

.location-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.location-modal-header h2 {
  margin: 0;
  font-size: 20px;
  color: #222;
}

.location-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: auto;
  line-height: 1;
  margin: 0;
}

.location-modal-close:hover {
  color: #222;
}

.location-modal-body {
  margin-bottom: 20px;
  line-height: 1.5;
}

.location-modal-body p {
  margin: 0 0 12px 0;
  color: #444;
}

.location-suggestion {
  background: #f0f7ff;
  padding: 12px;
  border-radius: 4px;
  border-left: 4px solid #0a6efd;
  margin: 16px 0;
}

.location-suggestion strong {
  display: block;
  margin-bottom: 4px;
  color: #222;
}

.location-modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.location-modal-actions button,
.location-modal-actions a {
  width: auto;
  padding: 10px 20px;
  margin: 0;
}

.location-modal-actions .btn-primary {
  background: #0a6efd;
  color: white;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.location-modal-actions .btn-primary:hover {
  background: #0952b8;
}

.location-modal-actions .btn-secondary {
  background: #f0f0f0;
  color: #444;
  border: 1px solid #ccc;
}

.location-modal-actions .btn-secondary:hover {
  background: #e0e0e0;
}

.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 0.9em;
  padding: 2px 4px;
  vertical-align: middle;
  transition: color 0.15s;
}
.copy-btn:hover { color: #333; }
.copy-btn.copied { color: #5cb85c; }

/* ── Proxy email row ── */
.proxy-email-row {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f0f7ff;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.proxy-email-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  min-width: 0;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #1a3a2a 0%, #2d5016 40%, #1b4332 100%);
  color: #fff;
  padding: 64px 24px;
  text-align: center;
  border-radius: 6px;
  margin-bottom: 32px;
}
.hero-inner {
  max-width: 640px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 32px;
  line-height: 1.25;
  margin: 0 0 16px;
  font-weight: 800;
}
.hero-sub {
  font-size: 17px;
  line-height: 1.6;
  color: #c8ddc0;
  margin: 0 0 28px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-hero {
  display: inline-block;
  background: #f7c948;
  color: #1a3a2a;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 15px;
  border: none;
  cursor: pointer;
}
.btn-hero:hover { background: #f5bd1f; }
.btn-hero-secondary {
  display: inline-block;
  background: transparent;
  color: #c8ddc0;
  font-weight: 600;
  padding: 11px 24px;
  border-radius: 6px;
  border: 2px solid rgba(200, 221, 192, 0.5);
  text-decoration: none;
  font-size: 15px;
  cursor: pointer;
}
.btn-hero-secondary:hover {
  border-color: #c8ddc0;
  color: #fff;
}

/* ── Value Props ── */
.value-props {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}
.prop-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 24px 20px;
}
.prop-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.prop-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
}
.prop-card p {
  margin: 0;
  color: #444;
  font-size: 14px;
  line-height: 1.55;
}

/* ── How It Works ── */
.how-it-works {
  margin-bottom: 40px;
}
.how-it-works h2 {
  text-align: center;
  margin-bottom: 24px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step {
  text-align: center;
  padding: 16px;
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2d5016;
  color: #fff;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 10px;
}
.step h4 {
  margin: 0 0 6px;
  font-size: 15px;
}
.step p {
  margin: 0;
  color: #555;
  font-size: 14px;
  line-height: 1.5;
}
.steps-note {
  text-align: center;
  margin-top: 20px;
  color: #555;
  font-size: 14px;
}

/* ── Bottom CTA ── */
.bottom-cta {
  background: #f0f4ec;
  border: 1px solid #d4ddc9;
  border-radius: 6px;
  padding: 40px 24px;
  text-align: center;
  margin-bottom: 32px;
}
.bottom-cta h2 {
  margin: 0 0 8px;
  font-size: 22px;
}
.bottom-cta p {
  margin: 0 0 20px;
  color: #555;
}
.inline-login {
  max-width: 440px;
  margin: 0 auto;
}
.inline-login-row {
  display: flex;
  gap: 8px;
}
.inline-login-row input {
  flex: 1;
  margin-bottom: 0;
}
.inline-login-row button {
  width: auto;
  white-space: nowrap;
  margin-bottom: 0;
}

/* ── Browse page header ── */
.browse-header {
  margin-bottom: 8px;
}
.browse-header h1 {
  font-size: 24px;
  margin: 0;
}

/* ── Explainer page ── */
.explainer {
  max-width: 720px;
  margin: 0 auto 40px;
}
.explainer h1 {
  font-size: 30px;
  margin-bottom: 12px;
}
.explainer-intro {
  font-size: 17px;
  line-height: 1.7;
  color: #333;
  margin-bottom: 24px;
}
.explainer-toc {
  background: #f8f8f6;
  border: 1px solid #e0ddd4;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 32px;
}
.explainer-toc strong {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #666;
}
.explainer-toc ol {
  margin: 0;
  padding-left: 20px;
}
.explainer-toc li {
  margin: 4px 0;
}
.explainer-toc a {
  font-size: 15px;
}
.explainer section {
  margin-bottom: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid #eee;
}
.explainer section:last-of-type {
  border-bottom: none;
}
.explainer h2 {
  font-size: 24px;
  margin: 0 0 16px;
  color: #1a3a2a;
}
.explainer h3 {
  font-size: 18px;
  margin: 20px 0 8px;
}
.explainer h4 {
  font-size: 16px;
  margin: 16px 0 6px;
}
.explainer p {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}
.explainer ul {
  padding-left: 20px;
}
.explainer li {
  font-size: 15px;
  line-height: 1.7;
  margin: 4px 0;
  color: #333;
}
.example-box {
  background: #f0f4ec;
  border-left: 4px solid #2d5016;
  padding: 16px 20px;
  border-radius: 0 6px 6px 0;
  margin: 16px 0;
}
.example-box strong {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #2d5016;
  margin-bottom: 4px;
}
.example-box p {
  margin: 0;
  font-size: 14px;
}
.explainer-cta {
  margin: 24px 0 8px;
  text-align: center;
}
.explainer-cta .btn-hero-secondary {
  color: #2d5016;
  border-color: #2d5016;
}
.explainer-cta .btn-hero-secondary:hover {
  background: #2d5016;
  color: #fff;
}
.process-timeline {
  margin: 16px 0;
}
.process-step {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}
.process-marker {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #2d5016;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.process-content h4 {
  margin: 0 0 4px;
}
.process-content p {
  margin: 0;
}
.pitfall {
  background: #fff;
  border: 1px solid #e0ddd4;
  border-radius: 6px;
  padding: 16px 20px;
  margin: 12px 0;
}
.pitfall h4 {
  margin: 0 0 6px;
  color: #8b4513;
}
.pitfall p {
  margin: 0;
}
.explainer-disclaimer {
  font-size: 13px;
  color: #888;
  line-height: 1.5;
  border-top: 1px solid #eee;
  padding-top: 20px;
  margin-top: 24px;
}

/* ── Login page ── */
.login-hero {
  background: linear-gradient(135deg, #1a3a2a 0%, #2d5016 40%, #1b4332 100%);
  color: #fff;
  padding: 56px 24px;
  border-radius: 6px;
  margin-bottom: 32px;
  text-align: center;
}
.login-inner {
  max-width: 400px;
  margin: 0 auto;
}
.login-hero h1 {
  font-size: 26px;
  margin: 0 0 8px;
  font-weight: 800;
}
.login-sub {
  color: #c8ddc0;
  font-size: 15px;
  margin: 0 0 24px;
  line-height: 1.5;
}
.login-form label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: #c8ddc0;
  margin-bottom: 4px;
}
.login-form input[type="email"] {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  border: 2px solid rgba(200, 221, 192, 0.3);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  margin-bottom: 12px;
}
.login-form input[type="email"]::placeholder {
  color: rgba(200, 221, 192, 0.6);
}
.login-form input[type="email"]:focus {
  outline: none;
  border-color: #f7c948;
  background: rgba(255, 255, 255, 0.15);
}
.login-form .btn-hero {
  width: 100%;
  text-align: center;
}
.login-note {
  font-size: 13px;
  color: rgba(200, 221, 192, 0.7);
  margin: 16px 0 0;
}

@media (max-width: 640px) {
  .hero { padding: 40px 16px; }
  .hero h1 { font-size: 24px; }
  .hero-sub { font-size: 15px; }
  .login-hero { padding: 40px 16px; }
  .login-hero h1 { font-size: 22px; }
}
