/* NGO tech grants finder (/resources/ngo-tech-grants/). Uses the knowledge-page tokens; no new colours. */
.gf-section { padding-block: 56px 72px; background: var(--paper); border-bottom: 1px solid var(--line); }
.gf-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 26px; }
.gf-head h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.05; margin-top: 10px; }
.gf-head p { max-width: 560px; color: var(--muted); margin-top: 10px; }

.gf-panel { display: grid; gap: 16px; padding: 22px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); box-shadow: var(--shadow); }
.gf-search { position: relative; }
.gf-search input { width: 100%; min-height: 54px; padding: 0 18px 0 48px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); font-size: 17px; }
.gf-search input:focus { border-color: var(--ink); outline: none; }
.gf-search svg { position: absolute; left: 18px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--muted); stroke-width: 2; }
.gf-label { font: 700 11px/1.3 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.gf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-chips button { min-height: 38px; padding: 6px 15px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px; cursor: pointer; }
.gf-chips button:hover { border-color: var(--ink); }
.gf-chips button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gf-views button[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: var(--ink); }
.gf-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.gf-toggle, .gf-link { border: 0; background: none; padding: 6px 0; color: var(--ink); font-weight: 700; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--coral); }
.gf-toggle [data-count]:not(:empty) { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 6px; border-radius: 99px; background: var(--coral); font: 700 11px/1 var(--sans); }
.gf-more { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 4px; }
.gf-more label, .gf-sort { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.gf-more select, .gf-sort select { min-height: 42px; padding: 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); font-size: 15px; }
.gf-sort { grid-auto-flow: column; align-items: center; }

.gf-results-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 30px 0 8px; }
.gf-count { font: 500 20px/1.2 var(--display); }
.gf-count strong { font-weight: 700; }
.gf-tabs { display: inline-flex; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); }
.gf-tabs button { min-height: 36px; padding: 0 16px; border: 0; border-radius: 999px; background: none; font-weight: 600; cursor: pointer; }
.gf-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.gf-note { max-width: 860px; margin-bottom: 20px; padding: 12px 16px; border-left: 3px solid var(--teal-deep); border-radius: 0 12px 12px 0; background: var(--teal-soft); color: var(--ink); font-size: 14.5px; }
.gf-note[data-tone="history"] { border-left-color: var(--yellow); background: color-mix(in srgb, var(--yellow) 16%, var(--white)); }
.gf-note a { font-weight: 700; }

.gf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.gf-card { display: flex; flex-direction: column; gap: 10px; width: 100%; height: 100%; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); color: var(--ink); text-align: left; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.gf-card:hover { transform: translateY(-2px); border-color: var(--coral); box-shadow: var(--shadow); }
.gf-card-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.gf-type { font: 600 11px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.gf-name { font: 700 19px/1.25 var(--display); letter-spacing: -.02em; }
.gf-amount { font: 700 16px/1.2 var(--sans); color: var(--coral-deep); }
.gf-amount.is-empty { color: var(--muted); font-weight: 500; font-size: 14px; }
.gf-desc { display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 14.5px; line-height: 1.55; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.gf-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 14px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.gf-meta .is-current { color: var(--teal-deep); font-weight: 700; }

.gf-state { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: var(--cream-deep); color: var(--ink); font: 700 12px/1.4 var(--sans); }
.gf-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.gf-state[data-tone="open"] { background: var(--teal-soft); color: var(--teal-deep); }
.gf-state[data-tone="open"]::before { background: var(--teal-deep); }
.gf-state[data-tone="pattern"] { background: var(--peach); color: var(--coral-deep); }
.gf-state[data-tone="pattern"]::before { background: var(--coral); }
.gf-state[data-tone="verify"]::before, .gf-state[data-tone="limited"]::before { background: var(--yellow); }
.gf-state[data-tone="checked"] { background: var(--white); box-shadow: inset 0 0 0 1px var(--line); }
.gf-state[data-tone="checked"]::before { content: "✓"; width: auto; height: auto; background: none; color: var(--teal-deep); }

.gf-empty { padding: 36px; border: 1px dashed var(--line); border-radius: 18px; text-align: center; color: var(--muted); }
.gf-empty strong { display: block; margin-bottom: 6px; color: var(--ink); font: 700 20px/1.3 var(--display); }
.gf-pager { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px; margin-top: 26px; }
.gf-pager button { min-width: 40px; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-weight: 600; cursor: pointer; }
.gf-pager button[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.gf-pager button:disabled { opacity: .4; cursor: default; }
.gf-pager span { color: var(--muted); }
.gf-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 24px; color: var(--muted); font-size: 14px; }

.gf-cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.gf-month { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.gf-month-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.gf-month-head h3 { font-size: 20px; }
.gf-month-head span { padding: 2px 10px; border-radius: 99px; background: var(--peach); color: var(--coral-deep); font: 700 13px/1.5 var(--mono); }
.gf-month ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.gf-month li button { display: grid; width: 100%; padding: 8px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink); text-align: left; font-weight: 600; font-size: 14px; line-height: 1.35; cursor: pointer; }
.gf-month li button:hover { color: var(--coral-deep); }
.gf-month li small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.gf-month-empty { color: var(--muted); font-size: 14px; }
.gf-month-more { margin-top: 8px; padding: 0; border: 0; background: none; font-weight: 700; cursor: pointer; color: var(--coral-deep); }

.gf-dialog { width: min(680px, calc(100% - 32px)); max-height: min(88vh, 900px); padding: 0; border: 0; border-radius: 24px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(26, 26, 26, .3); }
.gf-dialog::backdrop { background: rgba(26, 19, 17, .55); backdrop-filter: blur(3px); }
.gf-dialog-inner { display: grid; gap: 18px; padding: 30px; }
.gf-dialog-top { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.gf-dialog h2 { margin-top: 6px; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; }
.gf-close { flex: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 50%; background: var(--white); font-size: 20px; line-height: 1; cursor: pointer; }
.gf-badges { display: flex; flex-wrap: wrap; gap: 8px; }
.gf-dialog .gf-amount { font-size: 24px; font-family: var(--display); }
.gf-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.gf-facts div { padding: 12px 14px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.gf-facts dt { font: 600 11px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gf-facts dd { margin: 4px 0 0; font-weight: 600; font-size: 14.5px; }
.gf-dialog h3 { font-size: 17px; margin-bottom: 6px; }
.gf-dialog p { color: var(--muted); }
.gf-dialog-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 6px; }
.gf-dialog-actions .pill { margin-left: 0; width: auto; }

@media (max-width: 860px) {
  .gf-more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .gf-section { padding-block: 40px 56px; }
  .gf-panel { padding: 16px; border-radius: 18px; }
  .gf-more, .gf-facts { grid-template-columns: 1fr; }
  .gf-grid { grid-template-columns: 1fr; }
  .gf-dialog-inner { padding: 22px; }
  .gf-sort { grid-auto-flow: row; width: 100%; }
}
.gf-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gf-more[hidden], .gf-note[hidden] { display: none; }
.record .date[data-gf-stat] { color: var(--coral-deep); font: 700 26px/1 var(--display); letter-spacing: -.03em; }
.gf-dialog .gf-amount { color: var(--coral-deep); }

/* What to watch: open now and the look-ahead to the end of next quarter. */
.gf-watch { padding-block: 64px; border-bottom: 1px solid var(--line); }
.gf-watch-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.gf-watch-col { padding: 24px; border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.gf-watch-col:first-child { background: var(--teal-soft); border-color: color-mix(in srgb, var(--teal-deep) 25%, var(--line)); }
.gf-watch-title { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.gf-watch-title h3 { font-size: 24px; }
.gf-watch-badge { padding: 2px 12px; border-radius: 99px; background: var(--teal-deep); color: var(--white); font: 700 14px/1.6 var(--mono); }
.gf-watch-range { padding: 3px 12px; border-radius: 99px; background: var(--peach); color: var(--coral-deep); font: 700 12px/1.6 var(--mono); }
.gf-watch-sub { margin: 6px 0 14px; color: var(--muted); font-size: 14.5px; }
.gf-watch-list { display: grid; margin: 0; padding: 0; list-style: none; }
.gf-watch-list li + li { border-top: 1px solid color-mix(in srgb, var(--ink) 10%, transparent); }
.gf-watch-list button { display: grid; gap: 2px; width: 100%; padding: 11px 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; }
.gf-watch-list button:hover .gf-watch-name { color: var(--coral-deep); text-decoration: underline; text-underline-offset: 3px; }
.gf-watch-name { font-weight: 700; font-size: 15.5px; line-height: 1.35; }
.gf-watch-meta { color: var(--muted); font-size: 13.5px; }
.gf-watch-col:first-child .gf-watch-meta { color: var(--teal-deep); font-weight: 600; }
.gf-watch-months { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px 22px; }
.gf-watch-month h4 { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 2px; padding-bottom: 6px; border-bottom: 2px solid var(--coral); font: 700 16px/1.3 var(--display); }
.gf-watch-month h4 span { color: var(--coral-deep); font: 700 13px/1 var(--mono); }
.gf-watch-month .gf-month-more { margin: 4px 0 10px; font-size: 14px; }
.gf-watch-empty { padding: 10px 0; color: var(--muted); font-size: 14.5px; }
@media (max-width: 900px) { .gf-watch-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .gf-watch { padding-block: 44px; } .gf-watch-col { padding: 18px; } }
@media (min-width: 901px) { .gf-watch-col:first-child { position: sticky; top: 96px; } }
