.rgg-finder {
  --rgg-ink: #292b3c;
  --rgg-text: #343746;
  --rgg-muted: #606575;
  --rgg-blue: #2468ff;
  --rgg-blue-dark: #164fc7;
  --rgg-blue-soft: #eef4ff;
  --rgg-line: #d9deea;
  --rgg-surface: #ffffff;
  --rgg-soft: #f5f7fb;
  --rgg-green: #177245;
  --rgg-green-soft: #eaf7ef;
  --rgg-amber: #925a00;
  --rgg-amber-soft: #fff4d6;
  --rgg-red: #9b2c2c;
  --rgg-red-soft: #fff0f0;
  color: var(--rgg-text);
  font: inherit;
  width: 100%;
}

.rgg-finder *,
.rgg-finder *::before,
.rgg-finder *::after { box-sizing: border-box; }
.rgg-finder [hidden] { display: none !important; }

.rgg-finder__form {
  background: var(--rgg-surface);
  border: 1px solid var(--rgg-line);
  border-radius: 18px;
  box-shadow: 0 18px 48px rgba(41, 43, 60, 0.09);
  padding: 30px;
}

.rgg-finder label {
  color: var(--rgg-ink);
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 7px;
}

.rgg-finder input,
.rgg-finder select {
  appearance: none;
  background-color: #fff;
  border: 1px solid #aeb5c5;
  border-radius: 8px;
  color: var(--rgg-ink);
  font: inherit;
  line-height: 1.3;
  min-height: 50px;
  padding: 12px 14px;
  width: 100%;
}

.rgg-finder select {
  background-image: linear-gradient(45deg, transparent 50%, #4c5365 50%), linear-gradient(135deg, #4c5365 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 38px;
}

.rgg-finder input:focus-visible,
.rgg-finder select:focus-visible,
.rgg-finder summary:focus-visible,
.rgg-finder a:focus-visible,
.rgg-finder button:focus-visible,
.rgg-finder__summary:focus-visible {
  outline: 3px solid rgba(36, 104, 255, 0.35);
  outline-offset: 3px;
}

.rgg-finder__search input { font-size: 1.05rem; }
.rgg-finder__hint {
  color: var(--rgg-muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 8px 0 0;
}

.rgg-finder__primary-fields,
.rgg-finder__more-fields {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 24px;
}

.rgg-finder__more {
  border-top: 1px solid var(--rgg-line);
  margin-top: 24px;
  padding-top: 18px;
}

.rgg-finder__more summary {
  color: var(--rgg-blue-dark);
  cursor: pointer;
  display: inline-block;
  font-weight: 700;
  list-style-position: inside;
}

.rgg-finder__more summary::before { content: "+ "; }
.rgg-finder__more[open] summary::before { content: "− "; }
.rgg-finder__more summary::marker,
.rgg-finder__more summary::-webkit-details-marker { display: none; }
.rgg-finder__more-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.rgg-finder__actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.rgg-button {
  align-items: center;
  border: 2px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.94rem;
  font-weight: 750;
  justify-content: center;
  line-height: 1.2;
  min-height: 48px;
  padding: 12px 20px;
  text-align: center;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.rgg-button--primary,
.rgg-button--card {
  background: var(--rgg-blue);
  color: #fff;
}
.rgg-button--primary:hover,
.rgg-button--card:hover { background: var(--rgg-blue-dark); color: #fff; transform: translateY(-1px); }
.rgg-button--quiet { background: transparent; border-color: var(--rgg-line); color: var(--rgg-ink); }
.rgg-button--quiet:hover { background: var(--rgg-soft); border-color: #b9c0cf; }

.rgg-finder__results-heading {
  align-items: end;
  display: grid;
  gap: 6px 24px;
  grid-template-columns: 1fr auto;
  margin: 52px 0 22px;
}
.rgg-finder__results-title { color: var(--rgg-ink); font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.12; margin: 0; }
.rgg-finder__summary { color: var(--rgg-ink); font-weight: 750; margin: 0; }
.rgg-finder__note { color: var(--rgg-muted); grid-column: 1 / -1; line-height: 1.55; margin: 0; }

.rgg-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rgg-card {
  background: var(--rgg-surface);
  border: 1px solid var(--rgg-line);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(41, 43, 60, 0.07);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}
.rgg-card:hover { box-shadow: 0 16px 36px rgba(41, 43, 60, 0.12); transform: translateY(-2px); }
.rgg-card__image { aspect-ratio: 4 / 3; display: block; height: auto; object-fit: cover; object-position: center top; width: 100%; }
.rgg-card__body { display: flex; flex: 1; flex-direction: column; padding: 22px; }
.rgg-card__topline { align-items: center; display: flex; gap: 10px; justify-content: space-between; margin-bottom: 12px; }
.rgg-card__number { color: var(--rgg-muted); font-size: 0.82rem; font-weight: 800; white-space: nowrap; }
.rgg-card h3 { color: var(--rgg-ink); font-size: 1.28rem; line-height: 1.2; margin: 0 0 12px; }
.rgg-card__leader { margin: 0 0 12px; }
.rgg-card__facts { list-style: none; margin: 0 0 15px; padding: 0; }
.rgg-card__facts li { margin: 4px 0; }
.rgg-card__description { line-height: 1.58; margin: 0 0 18px; }
.rgg-card__description > :first-child { margin-top: 0; }
.rgg-card__description > :last-child { margin-bottom: 0; }
.rgg-card__description p { margin: 0 0 0.85em; }
.rgg-card__description a { color: var(--rgg-blue-dark); text-decoration: underline; text-underline-offset: 0.16em; }

.rgg-status {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
  padding: 6px 10px;
  text-transform: uppercase;
}
.rgg-status--open { background: var(--rgg-green-soft); color: var(--rgg-green); }
.rgg-status--full { background: var(--rgg-amber-soft); color: var(--rgg-amber); }
.rgg-status--closed { background: var(--rgg-red-soft); color: var(--rgg-red); }

.rgg-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  list-style: none;
  margin: auto 0 18px;
  padding: 0;
}
.rgg-card__tags li { background: var(--rgg-blue-soft); border-radius: 999px; color: var(--rgg-blue-dark); font-size: 0.78rem; font-weight: 700; padding: 6px 9px; }
.rgg-button--card { align-self: stretch; margin-top: auto; }

.rgg-finder__empty {
  background: var(--rgg-soft);
  border: 1px solid var(--rgg-line);
  border-radius: 14px;
  margin-top: 24px;
  padding: 30px;
  text-align: center;
}
.rgg-finder__empty h3 { color: var(--rgg-ink); margin: 0 0 8px; }
.rgg-finder__empty p { margin: 0 0 18px; }
.rgg-finder__empty-contact { color: var(--rgg-muted); font-size: 0.9rem; padding-top: 14px; }
.rgg-finder__selection { color: var(--rgg-green); font-weight: 700; margin: 18px 0 0; }

@media (max-width: 1119px) {
  .rgg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rgg-finder__more-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767px) {
  .rgg-finder__form { border-radius: 14px; padding: 22px; }
  .rgg-finder__primary-fields,
  .rgg-finder__more-fields,
  .rgg-grid { grid-template-columns: minmax(0, 1fr); }
  .rgg-finder__results-heading { align-items: start; grid-template-columns: 1fr; margin-top: 40px; }
  .rgg-finder__summary { margin-top: 4px; }
}

@media (max-width: 479px) {
  .rgg-finder__form { padding: 18px; }
  .rgg-finder__actions { align-items: stretch; flex-direction: column; }
  .rgg-button { width: 100%; }
  .rgg-card__body { padding: 19px; }
}

@media (prefers-reduced-motion: reduce) {
  .rgg-finder *, .rgg-finder *::before, .rgg-finder *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
