:root {
  --wfcod-ink: #17231d;
  --wfcod-muted: #5f6e65;
  --wfcod-green: #315f48;
  --wfcod-green-dark: #234735;
  --wfcod-gold: #a9823e;
  --wfcod-cream: #f8f5ed;
  --wfcod-line: #dce3dc;
  --wfcod-white: #ffffff;
}

.wfcod-library,
.wfcod-single-meta,
.wfcod-devotional-text,
.wfcod-audio,
.wfcod-back {
  color: var(--wfcod-ink);
  font-family: Georgia, "Times New Roman", serif;
}

.wfcod-library {
  box-sizing: border-box;
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(28px, 5vw, 72px) 20px;
}

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

.wfcod-library__header {
  margin: 0 auto 34px;
  max-width: 760px;
  text-align: center;
}

.wfcod-library__eyebrow,
.wfcod-card__category {
  color: var(--wfcod-gold);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin: 0 0 10px;
  text-transform: uppercase;
}

.wfcod-library__header h1 {
  color: var(--wfcod-ink);
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.06;
  margin: 0 0 16px;
}

.wfcod-library__header > p:last-child {
  color: var(--wfcod-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0;
}

.wfcod-filters {
  align-items: end;
  background: var(--wfcod-cream);
  border: 1px solid var(--wfcod-line);
  border-radius: 16px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(220px, 2fr) minmax(170px, 1fr) minmax(170px, 1fr) auto;
  padding: 22px;
}

.wfcod-field label {
  color: var(--wfcod-ink);
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 7px;
}

.wfcod-field input,
.wfcod-field select {
  appearance: none;
  background: var(--wfcod-white);
  border: 1px solid #bdc9c0;
  border-radius: 8px;
  color: var(--wfcod-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  min-height: 48px;
  padding: 10px 12px;
  width: 100%;
}

.wfcod-field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--wfcod-green) 50%), linear-gradient(135deg, var(--wfcod-green) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  padding-right: 32px;
}

.wfcod-field input:focus,
.wfcod-field select:focus,
.wfcod-filter-actions button:focus,
.wfcod-card a:focus {
  outline: 3px solid rgba(169, 130, 62, 0.42);
  outline-offset: 2px;
}

.wfcod-filter-actions {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.wfcod-filter-actions button {
  background: var(--wfcod-green);
  border: 0;
  border-radius: 8px;
  color: var(--wfcod-white);
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  min-height: 48px;
  padding: 12px 20px;
  white-space: nowrap;
}

.wfcod-filter-actions button:hover {
  background: var(--wfcod-green-dark);
}

.wfcod-filter-actions a {
  color: var(--wfcod-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.78rem;
}

.wfcod-results-bar {
  color: var(--wfcod-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.92rem;
  margin: 24px 2px 14px;
}

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

.wfcod-card {
  background: var(--wfcod-white);
  border: 1px solid var(--wfcod-line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(23, 35, 29, 0.06);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow 180ms ease, transform 180ms ease;
}

.wfcod-card:hover {
  box-shadow: 0 14px 34px rgba(23, 35, 29, 0.11);
  transform: translateY(-3px);
}

.wfcod-card__image {
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
}

.wfcod-card__image img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.wfcod-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 24px;
}

.wfcod-card h2 {
  font-size: 1.5rem;
  line-height: 1.22;
  margin: 0 0 10px;
}

.wfcod-card h2 a,
.wfcod-card__link {
  color: var(--wfcod-ink);
  text-decoration: none;
}

.wfcod-card h2 a:hover,
.wfcod-card__link:hover {
  color: var(--wfcod-green);
  text-decoration: underline;
}

.wfcod-card__scripture {
  color: var(--wfcod-green);
  font-size: 0.96rem;
  font-weight: 700;
  margin: 0 0 8px;
}

.wfcod-card__author,
.wfcod-card__excerpt {
  color: var(--wfcod-muted);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  line-height: 1.65;
  margin: 0 0 13px;
}

.wfcod-card__excerpt {
  flex: 1;
}

.wfcod-card__link {
  border-top: 1px solid var(--wfcod-line);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 7px;
  padding-top: 15px;
}

.wfcod-empty {
  background: var(--wfcod-cream);
  border: 1px solid var(--wfcod-line);
  border-radius: 14px;
  padding: 46px 24px;
  text-align: center;
}

.wfcod-empty h2 {
  margin-top: 0;
}

.wfcod-pagination ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
}

.wfcod-pagination a,
.wfcod-pagination span {
  border: 1px solid var(--wfcod-line);
  border-radius: 7px;
  display: block;
  font-family: Arial, Helvetica, sans-serif;
  padding: 8px 12px;
  text-decoration: none;
}

.wfcod-pagination .current {
  background: var(--wfcod-green);
  color: var(--wfcod-white);
}

.wfcod-single-meta {
  background: var(--wfcod-cream);
  border-left: 4px solid var(--wfcod-gold);
  margin: 0 0 28px;
  padding: 18px 22px;
}

.wfcod-single-meta p {
  margin: 5px 0;
}

.wfcod-devotional-text {
  font-size: 1.08rem;
  line-height: 1.8;
}

.wfcod-audio,
.wfcod-back {
  border-top: 1px solid var(--wfcod-line);
  margin-top: 32px;
  padding-top: 24px;
}

@media (max-width: 960px) {
  .wfcod-filters {
    grid-template-columns: 1fr 1fr;
  }

  .wfcod-field--search,
  .wfcod-filter-actions {
    grid-column: 1 / -1;
  }

  .wfcod-filter-actions {
    align-items: center;
    flex-direction: row;
  }

  .wfcod-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .wfcod-filters,
  .wfcod-grid {
    grid-template-columns: 1fr;
  }

  .wfcod-field--search,
  .wfcod-filter-actions {
    grid-column: auto;
  }

  .wfcod-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .wfcod-filter-actions button {
    width: 100%;
  }
}

