.court-forms-directory {
  color: var(--ink);
  padding: 30px 0 38px;
}

.cf-heading {
  align-items: start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.cf-heading h1 {
  font-size: clamp(34px, 4vw, 46px);
  letter-spacing: -1.3px;
  line-height: 1.12;
  margin: 9px 0 10px;
}

.cf-heading p {
  color: #536a55;
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
}

.cf-heading button {
  flex: none;
  min-height: 44px;
}

.cf-sources {
  align-items: baseline;
  background: #eef2e7;
  border: 1px solid #d5dfcc;
  border-radius: 9px;
  color: #4b644e;
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
  gap: 8px 15px;
  margin: 20px 0 22px;
  padding: 12px 15px;
}

.cf-source-label {
  color: var(--ink);
  font-weight: 650;
}

.cf-sources a,
.cf-detail {
  color: #315d42;
  text-underline-offset: 3px;
}

.cf-review-date {
  margin-inline-start: auto;
}

.cf-filters {
  border: 0;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.55fr) repeat(2, minmax(0, 1fr));
  margin: 0;
  min-inline-size: 0;
  padding: 0;
}

.cf-filters label {
  color: #355445;
  display: grid;
  font-size: 13px;
  font-weight: 650;
  gap: 6px;
  min-width: 0;
}

.cf-filters input,
.cf-filters select {
  background: var(--paper);
  border: 1px solid #cfd9c7;
  border-radius: 7px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 400;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}

.cf-filters select {
  padding-inline-end: 25px;
}

.cf-filters input::placeholder {
  color: #657969;
}

.cf-results-heading {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 24px 0 4px;
}

.cf-results-heading h2 {
  font-size: 24px;
  margin: 0;
  scroll-margin-top: 88px;
}

.cf-results-heading button {
  color: #315d42;
  font-size: 13px;
  min-height: 44px;
}

.cf-status {
  color: #4b644e;
  font-size: 13px;
  margin: 0 0 14px;
}

.cf-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cf-card,
.cf-empty {
  background: var(--paper);
  border: 1px solid #d9e1d1;
  border-radius: 9px;
  padding: 16px;
}

.cf-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

.cf-card-top,
.cf-metadata,
.cf-card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.cf-number {
  background: #e7eee1;
  border-radius: 5px;
  color: #284d3c;
  font-size: 12px;
  font-weight: 750;
  padding: 3px 7px;
}

.cf-issuer,
.cf-categories,
.cf-metadata {
  color: #516757;
  font-size: 12px;
}

.cf-card h3 {
  color: #233e32;
  font: normal 20px/1.25 Georgia, serif;
  margin: 10px 0 6px;
}

.cf-categories,
.cf-metadata {
  margin: 0 0 7px;
}

.cf-metadata span {
  background: #f0f2ea;
  border-radius: 4px;
  padding: 2px 6px;
}

.cf-card-actions {
  font-size: 13px;
  margin-top: auto;
  padding-top: 6px;
}

.cf-open,
.cf-detail {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  min-height: 44px;
}

.cf-open {
  background: var(--green);
  border-radius: 6px;
  color: var(--paper);
  font-weight: 650;
  padding: 8px 10px;
  text-decoration: none;
}

.cf-open:hover {
  background: var(--green-dark);
}

.cf-empty {
  color: #4b644e;
  grid-column: 1 / -1;
  margin: 0;
}

.cf-pagination {
  align-items: center;
  display: flex;
  font-size: 13px;
  gap: 12px;
  justify-content: center;
  margin-top: 22px;
}

.cf-pagination button {
  min-height: 44px;
}

.cf-pagination button:disabled {
  cursor: default;
}

.cf-visually-hidden {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media (max-width: 950px) {
  .cf-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cf-filters label:first-of-type {
    grid-column: 1 / -1;
  }

  .cf-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 650px) {
  .court-forms-directory {
    padding-top: 22px;
  }

  .cf-heading {
    flex-direction: column;
    gap: 12px;
  }

  .cf-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .cf-review-date {
    margin-inline-start: 0;
    width: 100%;
  }
}
