/* Grant Pond additions on top of the Leapz "Lily Pond" design system (site.css). */
.brand .by { font: 600 .8rem/1 var(--font-body); color: var(--muted); margin-left: 4px; }
.section.tight { padding: 32px 0 48px; }

.gp-hero .wrap { padding: 40px 0 48px; grid-template-columns: 1fr; }
.gp-hero h1 { font-size: clamp(2rem, 6vw, 3.1rem); max-width: 18em; }
.gp-search { display: flex; gap: 10px; margin-top: 20px; max-width: 720px; }
.gp-search input { flex: 1; min-height: 54px; font-size: 1.05rem; border-color: transparent; }
.gp-search .btn { min-height: 54px; }

.gp-layout { display: grid; gap: 24px; }
.gp-filters { display: grid; gap: 14px; align-content: start; }
.gp-filters select { min-height: 44px; }
.gp-count { font-weight: 700; color: var(--pond-deep); margin: 0 0 12px; }

.gp-results { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
.gp-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); }
.gp-card-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.gp-card h3 { margin: 0 0 4px; font-size: 1.15rem; line-height: 1.3; }
.gp-card h3 a { color: var(--pond-deep); text-decoration: none; }
.gp-card h3 a:hover { text-decoration: underline; color: var(--pond); }
.gp-funder { margin: 0 0 6px; color: var(--muted); font-size: .95rem; }
.gp-snippet { margin: 0 0 6px; font-size: .95rem; }
.gp-amount { margin: 0; font-weight: 700; color: var(--pad); }
.gp-due { margin-left: auto; font-size: .88rem; font-weight: 700; color: var(--muted); }
.gp-due.soon { color: var(--lily); }
.gp-due.soon::before { content: "✿ "; }
.tag.src-grantsgov { background: #e7f1fb; border-color: #9cbfe0; color: #1d4466; }
.tag.src-caportal { background: #f9eeda; border-color: #e0b866; color: #5c3f00; }
.gp-pager { margin-top: 20px; }

.grant-title { font-size: clamp(1.7rem, 5vw, 2.5rem); }
.facts th { width: 34%; color: var(--pond-deep); white-space: nowrap; }
.facts td { overflow-wrap: anywhere; }
.grant-text { white-space: pre-line; overflow-wrap: anywhere; }
.doc-list { padding-left: 1.2em; }
.doc-list li { margin-bottom: .4em; overflow-wrap: anywhere; }
.narrow h2 { margin-top: 1.6em; }

@media (max-width: 639px) {
  .site-header { position: static; }
  .gp-search { flex-direction: column; }
  .gp-due { margin-left: 0; width: 100%; }
  .facts th { white-space: normal; width: 40%; }
}
@media (min-width: 960px) {
  .gp-layout { grid-template-columns: 260px 1fr; align-items: start; }
  .gp-filters { position: sticky; top: 84px; }
}

/* Filters: a collapsible panel on phones and tablets, always open on wide screens */
.gp-filter-box > summary { list-style: none; margin-bottom: 12px; }
.gp-filter-box > summary::-webkit-details-marker { display: none; }
.gp-filter-box > summary::after { content: " ▾"; }
.gp-filter-box[open] > summary::after { content: " ▴"; }
@media (min-width: 960px) {
  .gp-filter-box > summary { display: none; }
  .gp-filter-box { position: sticky; top: 84px; }
  .gp-filters { position: static; }
}
