/*
 * Neighborhood Matchmaker — Interactive Tool Styles
 * swap.phoenixareahome.com/tools/matchmaker
 * Accent: teal (#0d9488)
 */

/* === Hero === */

.match-hero {
  background: #fff;
  padding: 3.5rem 1.5rem 2.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.match-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.match-hero-tag {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0d9488;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.match-hero-inner h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  color: #0f172a;
  margin: 0 0 1rem;
}

.match-hero-inner .lead {
  font-size: 1.1875rem;
  color: #334155;
  line-height: 1.6;
  max-width: 640px;
  margin: 0;
}

/* === Loading === */

.match-loading {
  text-align: center;
  padding: 4rem 1.5rem;
  color: #64748b;
  font-size: 1.0625rem;
}

/* === Main === */

.match-main {
  padding: 2.5rem 1.5rem 3rem;
  background: #f8fafc;
}

.match-main-inner {
  max-width: 700px;
  margin: 0 auto;
}

/* === Progress Bar === */

.match-progress {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.match-progress-bar {
  height: 100%;
  background: #0d9488;
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* === Step Label === */

.match-step-label {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* === Category Label === */

.match-cat-label {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0d9488;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* === Question === */

.match-question {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 0 0 1.5rem;
}

/* === Options === */

.match-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.match-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
  line-height: 1.5;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  min-height: 44px;
  font-family: inherit;
}

.match-option:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

.match-option.selected {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #0d9488;
  font-weight: 600;
}

.match-option:focus-visible {
  outline: 2px solid #0d9488;
  outline-offset: 2px;
}

/* === Navigation === */

.match-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
}

.match-nav-btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.match-nav-btn:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

.match-nav-results {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
}

.match-nav-results:hover {
  background: #0f766e;
  border-color: #0f766e;
}

/* === Results === */

.match-results-header {
  text-align: center;
  margin-bottom: 2rem;
}

.match-results-tag {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0d9488;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.match-results-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.match-results-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* === Result Card === */

.match-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
}

.match-card--top {
  border-color: #0d9488;
  border-width: 2px;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.1);
}

.match-card-rank {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 800;
  color: #0d9488;
  background: #f0fdfa;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 0.5rem;
}

.match-card--top .match-card-rank {
  background: #0d9488;
  color: #fff;
}

.match-card-pct {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0d9488;
  margin-bottom: 0.75rem;
}

.match-card-name {
  font-size: 1.375rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 0.25rem;
}

.match-card-arch {
  font-size: 0.8125rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Stats grid */

.match-card-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  padding: 1rem 0;
  border-top: 1px solid #f1f5f9;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 1rem;
}

.match-stat {
  text-align: center;
}

.match-stat-value {
  font-size: 1.125rem;
  font-weight: 800;
  color: #0f172a;
}

.match-stat-label {
  font-size: 0.875rem;
  color: #64748b;
  margin-top: 0.125rem;
}

/* Tagline */

.match-card-tagline {
  font-size: 0.9375rem;
  color: #334155;
  line-height: 1.55;
  margin: 0 0 1rem;
  font-style: italic;
}

/* Ratings breakdown */

.match-card-ratings {
  margin-bottom: 1rem;
}

.match-card-ratings-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
}

.match-rating-row {
  display: flex;
  align-items: center;
  padding: 0.375rem 0;
  border-bottom: 1px solid #f8fafc;
}

.match-rating-label {
  flex: 1;
  font-size: 0.9375rem;
  color: #475569;
}

.match-rating-grade {
  font-size: 0.9375rem;
  font-weight: 800;
  min-width: 2.5rem;
  text-align: center;
}

.match-rating-grade.grade-high {
  color: #15803d;
}

.match-rating-grade.grade-mid {
  color: #b45309;
}

.match-rating-grade.grade-low {
  color: #dc2626;
}

.match-rating-priority {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0d9488;
  margin-left: 0.5rem;
  padding: 0.125rem 0.5rem;
  background: #f0fdfa;
  border-radius: 10px;
}

/* Best for */

.match-card-bestfor {
  font-size: 1rem;
  color: #475569;
  line-height: 1.5;
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

/* === Also Considered === */

.match-also {
  margin-bottom: 2rem;
}

.match-also-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.match-also-list {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

.match-also-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.match-also-item:last-child {
  border-bottom: none;
}

.match-also-rank {
  font-size: 1rem;
  font-weight: 800;
  color: #64748b;
  min-width: 2rem;
}

.match-also-name {
  flex: 1;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #0f172a;
}

.match-also-arch {
  font-size: 0.875rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.match-also-pct {
  font-size: 1rem;
  font-weight: 700;
  color: #0d9488;
  min-width: 5rem;
  text-align: right;
}

/* === Retake === */

.match-retake {
  text-align: center;
  margin-bottom: 2rem;
}

.match-retake-btn {
  padding: 0.75rem 2rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  min-height: 44px;
  font-family: inherit;
  transition: border-color 0.15s, background 0.15s;
}

.match-retake-btn:hover {
  border-color: #0d9488;
  background: #f0fdfa;
}

/* === CTA === */

.match-cta-section {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  padding: 3rem 1.5rem;
}

.match-cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.match-cta-inner h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 0.75rem;
}

.match-cta-inner p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin: 0 0 1.25rem;
}

/* === Responsive === */

@media (max-width: 767px) {
  .match-hero-inner h1 {
    font-size: 1.875rem;
  }

  .match-question {
    font-size: 1.25rem;
  }

  .match-card-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .match-main {
    padding: 2rem 1rem;
  }

  .match-hero {
    padding: 2.5rem 1rem 2rem;
  }

  .match-also-item {
    flex-wrap: wrap;
  }

  .match-also-arch {
    display: none;
  }
}

@media (max-width: 480px) {
  .match-option {
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
  }

  .match-card-name {
    font-size: 1.125rem;
  }
}
