.rpef,
.rpef *,
.rpef *::before,
.rpef *::after {
  box-sizing: border-box;
}

.rpef {
  --rpef-dark: #174f3a;
  --rpef-dark-2: #103e2d;
  --rpef-lime: #7fae42;
  --rpef-lime-bright: #a8d348;
  --rpef-lime-soft: #edf3e5;
  --rpef-orange: #c8670d;
  --rpef-orange-dark: #9b4900;
  --rpef-ink: #172134;
  --rpef-copy: #4c5656;
  --rpef-muted: #68726f;
  --rpef-line: #d7dfd8;
  --rpef-white: #ffffff;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  color: var(--rpef-ink);
  font-family: inherit;
}

.rpef button,
.rpef input,
.rpef select {
  font: inherit;
}

.rpef__finder {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 58px);
  border: 1px solid rgba(23, 79, 58, 0.16);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 4%, rgba(168, 211, 72, 0.24) 0, rgba(168, 211, 72, 0.08) 26%, transparent 48%),
    linear-gradient(135deg, #f9fcf5 0%, #edf5df 100%);
  box-shadow: 0 24px 70px rgba(25, 62, 45, 0.1);
}

.rpef__finder::before,
.rpef__finder::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(127, 174, 66, 0.18);
  border-radius: 999px;
}

.rpef__finder::before {
  top: -120px;
  right: -70px;
  width: 300px;
  height: 300px;
}

.rpef__finder::after {
  right: 95px;
  bottom: -145px;
  width: 230px;
  height: 230px;
}

.rpef__intro,
.rpef__form,
.rpef__trust {
  position: relative;
  z-index: 1;
}

.rpef__intro {
  max-width: 800px;
}

.rpef__eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0 0 16px;
  color: var(--rpef-dark);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rpef__eyebrow span {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--rpef-dark);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0;
}

.rpef__intro h2 {
  max-width: 760px;
  margin: 0 !important;
  color: var(--rpef-ink) !important;
  font-size: clamp(34px, 5vw, 62px) !important;
  font-weight: 850 !important;
  letter-spacing: -0.045em !important;
  line-height: 1.03 !important;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.rpef__title-mobile {
  display: none;
}

.rpef__intro p {
  max-width: 780px;
  margin: 20px 0 0 !important;
  color: var(--rpef-copy) !important;
  font-size: clamp(17px, 2vw, 21px) !important;
  line-height: 1.65 !important;
}

.rpef__form {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) minmax(145px, 0.55fr) minmax(230px, 0.9fr);
  gap: 12px;
  align-items: end;
  max-width: 990px;
  margin-top: 34px;
  padding: 14px;
  border: 1px solid rgba(23, 79, 58, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 16px 46px rgba(25, 62, 45, 0.11);
  backdrop-filter: blur(8px);
}

.rpef__field label {
  display: block;
  margin: 0 0 7px 3px;
  color: #36403e;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.rpef__input-wrap {
  position: relative;
}

.rpef__input-wrap svg {
  position: absolute;
  top: 50%;
  left: 17px;
  width: 21px;
  height: 21px;
  fill: var(--rpef-dark);
  transform: translateY(-50%);
  pointer-events: none;
}

.rpef__field input,
.rpef__field select {
  display: block !important;
  width: 100% !important;
  height: 58px !important;
  margin: 0 !important;
  border: 1px solid #cfd9d1 !important;
  border-radius: 12px !important;
  outline: none !important;
  background: #f8faf8 !important;
  color: var(--rpef-ink) !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  box-shadow: none !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.rpef__field input {
  padding: 0 16px 0 50px !important;
}

.rpef__field select {
  padding: 0 40px 0 16px !important;
  cursor: pointer;
}

.rpef__field input:focus,
.rpef__field select:focus {
  border-color: var(--rpef-lime) !important;
  background: #fff !important;
  box-shadow: 0 0 0 4px rgba(127, 174, 66, 0.17) !important;
}

.rpef__field input[aria-invalid="true"] {
  border-color: #c53a32 !important;
  box-shadow: 0 0 0 4px rgba(197, 58, 50, 0.12) !important;
}

.rpef__submit {
  display: flex;
  width: 100%;
  min-height: 58px;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 13px 20px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rpef-orange) 0%, var(--rpef-orange-dark) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  line-height: 1.25;
  box-shadow: 0 11px 24px rgba(184, 94, 13, 0.24);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.rpef__submit svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.rpef__submit:hover {
  box-shadow: 0 15px 30px rgba(184, 94, 13, 0.3);
  filter: brightness(1.04);
  transform: translateY(-2px);
}

.rpef__submit:focus-visible,
.rpef__filters button:focus-visible,
.rpef__action:focus-visible,
.rpef__cta a:focus-visible {
  outline: 3px solid rgba(200, 103, 13, 0.3);
  outline-offset: 3px;
}

.rpef__submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

.rpef__submit.is-loading svg {
  animation: rpef-spin 0.9s linear infinite;
}

@keyframes rpef-spin {
  to { transform: rotate(360deg); }
}

.rpef__trust {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 21px;
  color: #44504b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.rpef__trust span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.rpef__trust b {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--rpef-dark);
  color: #fff;
  font-size: 12px;
}

.rpef__notice {
  margin: 24px 0 0;
  padding: 17px 20px;
  border: 1px solid #d5ded7;
  border-left: 5px solid var(--rpef-dark);
  border-radius: 12px;
  background: #f7f9f7;
  color: #35403c;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.55;
}

.rpef__notice[hidden] {
  display: none !important;
}

.rpef__notice--loading {
  border-left-color: var(--rpef-lime);
  background: var(--rpef-lime-soft);
}

.rpef__notice--error {
  border-left-color: #b93831;
  background: #fff3f1;
  color: #8d2c27;
}

.rpef__notice--warning {
  border-left-color: #d49b24;
  background: #fff9e9;
}

.rpef__results {
  margin-top: clamp(34px, 6vw, 72px);
}

.rpef__results[hidden] {
  display: none !important;
}

.rpef__results-head {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.rpef__results-kicker {
  display: block;
  margin-bottom: 8px;
  color: var(--rpef-lime);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rpef__results-title {
  min-width: 0;
  margin: 0 !important;
  color: var(--rpef-dark) !important;
  font-size: clamp(25px, 3.4vw, 40px) !important;
  font-weight: 820 !important;
  letter-spacing: -0.03em !important;
  line-height: 1.13 !important;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.rpef__results-count {
  flex: 0 0 auto;
  padding: 8px 13px;
  border-radius: 999px;
  background: var(--rpef-lime-soft);
  color: var(--rpef-dark);
  font-size: 13px;
  font-weight: 850;
}

.rpef__filters {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding-bottom: 3px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.rpef__filters button {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid var(--rpef-line);
  border-radius: 999px;
  background: #fff;
  color: #4e5855;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.rpef__filters button:hover,
.rpef__filters button.is-active {
  border-color: var(--rpef-dark);
  background: var(--rpef-dark);
  color: #fff;
}

.rpef__results-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: 22px;
  align-items: start;
}

.rpef__list {
  display: grid;
  gap: 14px;
}

.rpef__card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border: 1px solid var(--rpef-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 55, 44, 0.06);
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.rpef__card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 5px;
  background: var(--rpef-dark);
}

.rpef__card--municipal::before { background: var(--rpef-lime); }
.rpef__card--private::before { background: var(--rpef-orange); }

.rpef__card:hover {
  border-color: #b9c9bc;
  box-shadow: 0 16px 38px rgba(31, 55, 44, 0.1);
  transform: translateY(-2px);
}

.rpef__card-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.rpef__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rpef__badge,
.rpef__distance {
  display: inline-flex;
  min-height: 27px;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.25;
}

.rpef__badge--category {
  background: var(--rpef-lime-soft);
  color: var(--rpef-dark);
}

.rpef__card--private .rpef__badge--category {
  background: #fff0e3;
  color: #914600;
}

.rpef__badge--verified {
  background: var(--rpef-dark);
  color: #fff;
}

.rpef__distance {
  flex: 0 0 auto;
  background: #f2f4f2;
  color: #4e5753;
}

.rpef__title-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  margin-top: 17px;
}

.rpef__number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--rpef-dark);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.rpef__card--municipal .rpef__number { background: var(--rpef-lime); color: #173523; }
.rpef__card--private .rpef__number { background: var(--rpef-orange); }

.rpef__title-row h4 {
  min-width: 0;
  margin: 2px 0 0 !important;
  color: var(--rpef-ink) !important;
  font-size: clamp(18px, 2vw, 22px) !important;
  font-weight: 820 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.25 !important;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
}

.rpef__details {
  display: grid;
  gap: 8px;
  margin: 17px 0 0 50px;
}

.rpef__detail {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--rpef-copy);
  font-size: 14px;
  line-height: 1.5;
}

.rpef__detail-icon {
  color: var(--rpef-dark);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.1;
}

.rpef__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 19px 0 0 50px;
}

.rpef__action {
  display: inline-flex !important;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  padding: 8px 13px;
  border: 1px solid #cad4cc;
  border-radius: 10px;
  background: #fff;
  color: var(--rpef-dark) !important;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
  text-decoration: none !important;
}

.rpef__action:hover {
  border-color: var(--rpef-dark);
  background: var(--rpef-lime-soft);
}

.rpef__action--route {
  border-color: var(--rpef-dark);
  background: var(--rpef-dark);
  color: #fff !important;
}

.rpef__action--route:hover {
  background: var(--rpef-dark-2);
  color: #fff !important;
}

.rpef__map-wrap {
  position: sticky;
  top: 24px;
  overflow: hidden;
  padding: 8px;
  border: 1px solid var(--rpef-line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(31, 55, 44, 0.09);
}

.rpef__map-wrap[hidden] { display: none !important; }

.rpef__map {
  width: 100%;
  height: min(650px, 72vh);
  min-height: 440px;
  border-radius: 15px;
  background: #eef2eb;
}

.rpef__map--fallback {
  overflow: hidden;
}

.rpef__map-frame {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
}

.rpef__map .leaflet-popup-content {
  margin: 13px 17px;
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
}

.rpef__map .leaflet-popup-content strong {
  display: inline-block;
  margin-bottom: 3px;
  color: var(--rpef-ink);
  font-size: 14px;
}

.rpef__filter-empty {
  display: grid;
  gap: 5px;
  padding: 26px;
  border: 1px dashed #c7d2c9;
  border-radius: 16px;
  background: #f8faf8;
  color: var(--rpef-copy);
}

.rpef__filter-empty strong { color: var(--rpef-ink); }

.rpef__cta {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 19px;
  align-items: center;
  margin-top: clamp(34px, 6vw, 72px);
  padding: 22px 24px;
  border: 1px solid rgba(23, 79, 58, 0.18);
  border-radius: 20px;
  background: linear-gradient(135deg, #f0f6e8, #fbfcf9);
  box-shadow: 0 14px 38px rgba(31, 55, 44, 0.08);
}

.rpef__cta-icon {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(135deg, var(--rpef-lime-bright), var(--rpef-dark));
  color: #fff;
  font-size: 29px;
  font-weight: 900;
  box-shadow: 0 9px 22px rgba(23, 79, 58, 0.22);
}

.rpef__cta-copy {
  display: grid;
  gap: 4px;
}

.rpef__cta-copy span {
  color: var(--rpef-lime);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
}

.rpef__cta-copy strong {
  color: var(--rpef-dark);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.35;
}

.rpef__cta a {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--rpef-orange), var(--rpef-orange-dark));
  color: #fff !important;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.25;
  text-decoration: none !important;
  box-shadow: 0 9px 22px rgba(184, 94, 13, 0.2);
}

.rpef__cta a:hover {
  color: #fff !important;
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.rpef__source-note {
  margin: 18px 4px 0 !important;
  color: #737d79 !important;
  font-size: 11px !important;
  line-height: 1.55 !important;
}

.rpef__source-note a {
  color: var(--rpef-dark) !important;
  text-decoration: underline !important;
}

@media (max-width: 900px) {
  .rpef__form {
    grid-template-columns: minmax(0, 1fr) 155px;
  }

  .rpef__submit {
    grid-column: 1 / -1;
  }

  .rpef__results-grid {
    grid-template-columns: 1fr;
  }

  .rpef__map-wrap {
    position: relative;
    top: auto;
    grid-row: 1;
  }

  .rpef__map {
    height: 390px;
    min-height: 0;
  }

  .rpef__cta {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .rpef__cta a {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .rpef__finder {
    margin-inline: -2px;
    padding: 26px 18px 24px;
    border-radius: 21px;
  }

  .rpef__intro h2 {
    font-size: clamp(27px, 8.6vw, 36px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.035em !important;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: none;
  }

  .rpef__title-desktop {
    display: none;
  }

  .rpef__title-mobile {
    display: inline;
  }

  .rpef__intro p {
    margin-top: 15px !important;
    font-size: 16px !important;
    line-height: 1.58 !important;
  }

  .rpef__eyebrow {
    margin-bottom: 13px;
    font-size: 11px;
    letter-spacing: 0.1em;
  }

  .rpef__form {
    grid-template-columns: 1fr;
    gap: 11px;
    margin-top: 25px;
    padding: 12px;
    border-radius: 16px;
  }

  .rpef__submit { grid-column: auto; }

  .rpef__field input,
  .rpef__field select,
  .rpef__submit {
    height: 54px !important;
    min-height: 54px;
  }

  .rpef__trust {
    display: grid;
    gap: 9px;
    margin-top: 18px;
  }

  .rpef__results-head {
    display: grid;
    gap: 12px;
    align-items: start;
  }

  .rpef__results-title {
    font-size: clamp(22px, 7vw, 28px) !important;
    line-height: 1.16 !important;
    letter-spacing: -0.02em !important;
  }

  .rpef__results-count {
    justify-self: start;
  }

  .rpef__filters {
    margin-right: -14px;
    padding-right: 14px;
  }

  .rpef__filters button {
    min-height: 39px;
    padding: 8px 12px;
    font-size: 12px;
  }

  .rpef__map-wrap { padding: 5px; border-radius: 17px; }
  .rpef__map { height: 310px; border-radius: 12px; }

  .rpef__card {
    padding: 18px 16px 18px 19px;
    border-radius: 15px;
  }

  .rpef__card-top {
    display: grid;
    gap: 9px;
  }

  .rpef__distance { justify-self: start; }

  .rpef__title-row {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
  }

  .rpef__number {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .rpef__title-row h4 {
    font-size: clamp(17px, 5.2vw, 20px) !important;
    line-height: 1.28 !important;
  }

  .rpef__details,
  .rpef__actions {
    margin-left: 44px;
  }

  .rpef__action {
    flex: 1 1 auto;
  }

  .rpef__cta {
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    border-radius: 17px;
  }

  .rpef__cta-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    font-size: 24px;
  }

  .rpef__cta a { width: 100%; }
}

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