@font-face {
  font-family: 'FarmHouseCLM';
  src: url('farmhouse-clm.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Hide the theme's page H1 on pages that render news cards */
.post-header { display: none; }

.clm-news-feed {
  max-width: 748px;
  margin: 0 auto;
  padding: 8px 0 30px;
}
.clm-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 4px 14px rgba(0,0,0,.06);
  margin: 0 0 28px;
  overflow: hidden;
}
.clm-card-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 10px;
  padding: 24px 30px 0;
}
.clm-date {
  color: #77776e;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
}
.clm-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.clm-pill {
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .4px;
  text-transform: uppercase;
  padding: 2px 10px;
  border-radius: 99px;
  line-height: 1.55;
  white-space: nowrap;
}
.clm-news-feed .clm-card h2.clm-title {
  margin: 12px 30px 0;
  font-family: "Helvetica Neue", Arial, sans-serif !important;
  font-size: 25px;
  line-height: 1.3;
  font-weight: 700 !important;
  color: #1a1a1a;
}
.clm-body {
  padding: 24px 30px 8px;
  font-size: 18.7px;
  line-height: 1.45;
  color: #2b2b2b;
  overflow-wrap: break-word;
}

/* Body headings stay in the site sans font (not the display font, not serif) */
.clm-body h2, .clm-body h3, .clm-body h4 {
  font-family: "Helvetica Neue", Arial, sans-serif;
}
.clm-body p { margin: 0 0 28px; }
.clm-body h2 { font-size: 22px; line-height: 1.3; margin: 40px 0 16px; }
.clm-body h3 { font-size: 20px; line-height: 1.3; margin: 32px 0 14px; }
.clm-body h4 { font-size: 18.7px; margin: 32px 0 14px; }
.clm-body p:has(> strong:only-child),
.clm-body p:has(> b:only-child) { margin: 40px 0 16px; }
.clm-body > :first-child { margin-top: 0; }
.clm-body > :last-child { margin-bottom: 0; }
.clm-body a { color: #2283c3; }
.clm-body ul, .clm-body ol { margin: 0 0 28px; padding-left: 30px; }
.clm-body li { margin: 0 0 12px; }
.clm-body li:last-child { margin-bottom: 0; }
.clm-body li ul, .clm-body li ol { margin: 12px 0 0; }
.clm-body img { max-width: 100%; height: auto; border-radius: 8px; margin: 0 0 28px; }
.clm-body p img { margin: 0; }
.clm-body table { border-collapse: collapse; margin: 0 0 28px; }
.clm-body th, .clm-body td { border: 1px solid #e3e3d8; padding: 8px 12px; }

.clm-foot {
  border-top: 1px solid #e3e3d8;
  margin-top: 20px;
  padding: 14px 30px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.clm-copylink {
  margin-left: auto;
  background: #f1f1e8;
  border: 2px solid transparent;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
  position: relative;
  transition: background .12s ease, transform .12s ease;
}
.clm-copylink:hover { background: #e6e6d8; transform: scale(1.06); }
.clm-copylink.clm-copied { background: #e4efdb; border-color: #6d9b40; }
.clm-copylink[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  right: 0;
  background: #2b2b2b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
}
.clm-react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f1e8;
  border: 2px solid transparent;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 18px;
  line-height: 1.4;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  font-family: inherit;
}
.clm-react:hover { background: #e6e6d8; transform: scale(1.06); }
.clm-react.clm-reacted { background: #e4efdb; border-color: #6d9b40; }
.clm-count { color: #77776e; font-weight: 700; font-size: 14px; }
.clm-count[hidden] { display: none; }
.clm-react.clm-reacted .clm-count { color: #3e7a1c; }

/* ---------- Numbered pagination ---------- */
.clm-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
  font-size: 17px;
}
.clm-pg-num, .clm-pg-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  background: #fff;
  border: 1px solid #d8d8ca;
  border-radius: 9px;
  color: #2b2b2b;
  font-weight: 700;
  text-decoration: none !important;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.clm-pg-num:hover, .clm-pg-arrow:hover { text-decoration: none !important; }
.clm-pg-num:hover, .clm-pg-arrow:hover { background: #f1f1e8; }
.clm-pg-cur {
  background: #6d9b40;
  border-color: #6d9b40;
  color: #fff;
  cursor: default;
}
.clm-pg-gap { color: #999; padding: 0 2px; }
.clm-back-news { text-align: center; margin: 0 0 30px; }
.clm-back-news a { color: #2283c3; font-weight: 600; text-decoration: none; font-size: 16px; }
.clm-back-news a:hover { text-decoration: underline; }
.clm-back-top {
  margin: 0 0 24px;
  padding: 12px 18px;
  background: #fdf6e7;
  border: 1px solid #f0e0b8;
  border-radius: 10px;
  color: #8a6d1a;
  font-size: 16px;
  font-weight: 600;
}

@media (max-width: 780px) {
  .clm-news-feed { padding-left: 10px; padding-right: 10px; }
  .clm-card { border-radius: 10px; }
  .clm-body { font-size: 17.5px; }
  .clm-card-head, .clm-title { padding-left: 22px; padding-right: 22px; }
  .clm-news-feed .clm-card h2.clm-title { margin-left: 22px; margin-right: 22px; }
  .clm-body, .clm-foot { padding-left: 22px; padding-right: 22px; }
}
