:root {
  color-scheme: light;
  --ink: #151a1f;
  --muted: #5f6873;
  --line: #dbe2e4;
  --paper: #f7f6f1;
  --white: #ffffff;
  --teal: #0c6b64;
  --teal-dark: #074b47;
  --gold: #c3912d;
  --rose: #af5256;
  --sky: #4d7895;
  --cream: #f4f1ea;
  --stone: #eef1ef;
  --shadow: 0 22px 70px rgba(21, 26, 31, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 74px;
  padding: 14px clamp(18px, 4vw, 56px);
  color: #fff;
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header[data-elevated="true"] {
  color: var(--ink);
  background: rgba(247, 246, 241, 0.94);
  box-shadow: 0 10px 35px rgba(21, 26, 31, 0.12);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: 230px;
}

.brand-logo {
  display: block;
  width: clamp(218px, 22vw, 300px);
  height: auto;
  overflow: visible;
}

.brand-logo-box {
  fill: rgba(255, 255, 255, 0.08);
  stroke: currentColor;
  stroke-width: 3;
}

.brand-logo-monogram {
  fill: currentColor;
}

.brand-logo-name,
.brand-logo-tagline {
  fill: currentColor;
  font-family: Inter, Arial, sans-serif;
  letter-spacing: 0;
}

.brand-logo-name {
  font-size: 24px;
  font-weight: 800;
}

.brand-logo-tagline {
  opacity: 0.76;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.8px;
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 32px);
  font-size: 14px;
  font-weight: 700;
}

.hero-search button {
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 800;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  padding: 130px clamp(18px, 5vw, 72px) 56px;
  overflow: hidden;
  color: #fff;
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(5, 22, 24, 0.9) 0%, rgba(5, 22, 24, 0.72) 45%, rgba(5, 22, 24, 0.18) 100%),
    linear-gradient(0deg, rgba(21, 26, 31, 0.62), rgba(21, 26, 31, 0.08) 48%);
}

.hero-content {
  position: relative;
  width: min(760px, 100%);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  text-wrap: pretty;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(54px, 10vw, 124px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 650px;
  margin: 28px 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.45;
}

.hero-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: min(680px, 100%);
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-search input {
  min-width: 0;
  border: 0;
  border-radius: 5px;
  padding: 15px 16px;
  color: var(--ink);
  background: transparent;
  outline: none;
}

.hero-search button {
  padding: 0 22px;
}

.search-scope {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: min(680px, 100%);
  margin: 12px 0 0;
  padding: 0;
  border: 0;
}

.search-scope legend {
  width: 100%;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 850;
}

.search-scope label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  padding: 7px 12px;
  color: rgba(255, 255, 255, 0.88);
  background: rgba(255, 255, 255, 0.12);
  font-size: 13px;
  font-weight: 850;
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.search-scope input {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.toolbar-scope {
  width: 100%;
  margin: 14px 0 0;
}

.toolbar-scope legend {
  color: var(--muted);
}

.toolbar-scope label {
  border-color: var(--line);
  color: var(--teal-dark);
  background: var(--white);
  box-shadow: 0 8px 24px rgba(21, 26, 31, 0.06);
  backdrop-filter: none;
}

.clear-filters {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  margin: 14px 0 0;
  border: 1px solid rgba(12, 107, 100, 0.24);
  border-radius: 999px;
  padding: 10px 18px;
  color: var(--teal-dark);
  background: #fff6df;
  box-shadow: 0 8px 20px rgba(21, 26, 31, 0.06);
  font-size: 13px;
  font-weight: 900;
}

.clear-filters:hover {
  color: var(--white);
  background: var(--teal);
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 34px 0 0;
}

.hero-stats div {
  min-width: 136px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
}

.hero-stats dt {
  font-size: 30px;
  font-weight: 900;
}

.hero-stats dd {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

.new-grants,
.opportunity-shell,
.conference-shell {
  padding: 76px clamp(18px, 5vw, 72px);
}

.new-grants {
  padding-top: 44px;
  padding-bottom: 38px;
  border-top: 8px solid var(--teal);
  background: linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
}

.new-grants .section-heading {
  margin-bottom: 18px;
}

.new-grants .section-heading h2 {
  font-size: clamp(28px, 3vw, 42px);
}

.new-grants .section-heading p {
  max-width: 430px;
  font-size: 14px;
  line-height: 1.45;
}

.opportunity-shell {
  background: var(--paper);
}

.conference-shell {
  border-top: 8px solid var(--rose);
  background: var(--cream);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, 0.6fr);
  gap: 32px;
  align-items: end;
  margin-bottom: 28px;
}

.section-heading > div {
  position: relative;
  padding-left: 18px;
}

.section-heading > div::before {
  position: absolute;
  inset: 4px auto 4px 0;
  width: 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--teal), var(--gold));
  content: "";
}

.conference-shell .section-heading > div::before {
  background: linear-gradient(180deg, var(--rose), var(--gold));
}

.section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1;
  letter-spacing: 0;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.grant-slider {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.slider-window {
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 5px solid var(--teal);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 45px rgba(21, 26, 31, 0.08);
}

.slider-track {
  display: flex;
  transition: transform 520ms ease;
}

.new-grant-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.4fr);
  gap: clamp(18px, 3vw, 34px);
  align-items: start;
  min-height: 0;
  padding: clamp(20px, 3vw, 30px);
}

.new-grant-slide h3 {
  max-width: 780px;
  margin: 12px 0 10px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.05;
}

.new-grant-slide p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.5;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.new-grant-details {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(12, 107, 100, 0.22);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  background: #fbfcf8;
  box-shadow: 0 12px 32px rgba(21, 26, 31, 0.06);
}

.new-grant-details dl {
  display: grid;
  gap: 11px;
  margin: 0;
}

.new-grant-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.new-grant-details dd {
  margin: 2px 0 0;
  font-weight: 900;
}

.slider-control {
  display: grid;
  width: 42px;
  height: 42px;
  min-height: 42px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--teal-dark);
  box-shadow: 0 10px 24px rgba(7, 75, 71, 0.28);
  font-size: 20px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.slider-control:hover {
  transform: translateY(-2px);
  background: var(--gold);
  box-shadow: 0 12px 28px rgba(195, 145, 45, 0.32);
}

.slider-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}

.slider-dots button {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 999px;
  padding: 0;
  background: #b8c6c3;
  cursor: pointer;
}

.slider-dots button.is-active {
  width: 28px;
  background: var(--teal);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(135px, 190px));
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(12, 107, 100, 0.18);
  border-top: 4px solid var(--teal);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 45px rgba(21, 26, 31, 0.08);
}

.toolbar label {
  display: grid;
  gap: 6px;
}

.toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 12px;
  color: var(--ink);
  background: #fbfaf6;
  outline-color: rgba(12, 107, 100, 0.35);
}

.results-bar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 22px 0;
}

.results-bar p {
  margin: 0;
  color: var(--muted);
}

.sort-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.sort-tabs button {
  border: 0;
  border-radius: 5px;
  padding: 9px 12px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.sort-tabs button.is-active {
  color: #fff;
  background: var(--teal-dark);
}

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

.pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.pagination button {
  min-width: 40px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--teal-dark);
  background: var(--white);
  font-weight: 900;
  cursor: pointer;
}

.pagination button.is-active {
  color: #fff;
  background: var(--teal-dark);
  border-color: var(--teal-dark);
}

.pagination .pagination-step {
  min-width: 76px;
  padding: 0 16px;
  color: #fff;
  background: var(--gold);
  border-color: var(--gold);
}

.grant-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 18px;
  min-height: 360px;
  padding: 22px;
  border: 1px solid rgba(12, 107, 100, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(21, 26, 31, 0.07);
}

.grant-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  content: "";
}

.listing-link {
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.listing-link:hover {
  transform: translateY(-3px);
  border-color: rgba(12, 107, 100, 0.38);
  box-shadow: 0 18px 42px rgba(21, 26, 31, 0.12);
}

.grant-card header {
  display: grid;
  gap: 12px;
}

.card-meta,
.tag-row,
.card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 10px;
  color: var(--teal-dark);
  background: #e4f0eb;
  font-size: 12px;
  font-weight: 850;
}

.pill.urgent {
  color: #8b2d32;
  background: #f6dfdf;
}

.pill.pre-announcement {
  color: #51351b;
  background: #ffe2a8;
}

.pill.archived {
  color: #5c3d1c;
  background: #f4e4c7;
}

.grant-card h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.15;
}

.grant-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.grant-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: auto 0 0;
}

.grant-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.grant-card dd {
  margin: 3px 0 0;
  font-weight: 850;
}

.card-footer {
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.source-link {
  color: var(--teal);
  font-weight: 900;
}

.conference-results {
  margin-top: 0;
}

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

.conference-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(195, 145, 45, 0.28);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(21, 26, 31, 0.07);
}

.conference-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--rose), var(--gold));
  content: "";
}

.event-type {
  width: fit-content;
  border-radius: 999px;
  padding: 6px 11px;
  color: #7a3f43;
  background: #f6dfdf;
  font-size: 12px;
  font-weight: 900;
}

.conference-card h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.12;
}

.conference-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.conference-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.conference-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.conference-card dd {
  margin: 3px 0 0;
  font-weight: 900;
}

.archive-tools {
  margin: 0 0 26px;
  padding: 18px;
  border: 1px solid rgba(12, 107, 100, 0.16);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 34px rgba(21, 26, 31, 0.07);
}

.archive-tools .search-field {
  width: 100%;
}

.archive-section {
  width: 100%;
  margin: 0 0 34px;
  padding: clamp(24px, 4vw, 42px);
}

.archive-card {
  opacity: 0.92;
}

.archive-card::before {
  background: linear-gradient(90deg, #8d7561, var(--gold));
}

.detail-page {
  background: #fbfaf6;
}

.static-page {
  background:
    linear-gradient(180deg, rgba(12, 107, 100, 0.08), rgba(12, 107, 100, 0) 320px),
    var(--paper);
}

.detail-header {
  position: sticky;
}

.detail-shell {
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: 54px 0 82px;
}

.static-shell {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 84px;
}

.static-hero {
  padding: clamp(34px, 7vw, 78px) 0 26px;
}

.static-hero h1 {
  max-width: 820px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 6vw, 70px);
  line-height: 0.98;
}

.static-hero p:last-child {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.static-panel {
  display: grid;
  gap: 18px;
  padding: clamp(24px, 4vw, 44px);
  border: 1px solid rgba(12, 107, 100, 0.14);
  border-top: 6px solid var(--teal);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 16px 45px rgba(21, 26, 31, 0.08);
}

.static-panel h2 {
  margin: 14px 0 0;
  font-size: 24px;
}

.static-panel h2:first-child {
  margin-top: 0;
}

.static-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.static-panel a {
  color: var(--teal);
  font-weight: 850;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-form {
  display: grid;
  gap: 14px;
  margin: 10px 0 18px;
  padding: 22px;
  border: 1px solid rgba(12, 107, 100, 0.16);
  border-radius: 8px;
  background: #fbfaf6;
}

.contact-form label {
  display: grid;
  gap: 7px;
}

.contact-form span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 13px 12px;
  color: var(--ink);
  background: var(--white);
  outline-color: rgba(12, 107, 100, 0.35);
}

.contact-form textarea {
  resize: vertical;
}

.contact-form button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--teal);
  font-weight: 900;
  cursor: pointer;
}

.hidden-field {
  display: none;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--teal);
  font-weight: 900;
}

.detail-panel {
  display: grid;
  gap: 28px;
  padding: clamp(24px, 5vw, 54px);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.detail-heading {
  display: grid;
  gap: 16px;
}

.funder-logo-card {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  max-width: min(100%, 620px);
  padding: 10px 14px 10px 10px;
  border: 1px solid rgba(21, 83, 77, 0.16);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(229, 242, 238, 0.86));
  box-shadow: 0 12px 28px rgba(15, 42, 40, 0.08);
}

.funder-logo-frame {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid rgba(21, 83, 77, 0.18);
  border-radius: 8px;
  background: #fff;
}

.funder-logo-frame img {
  width: 46px;
  height: 46px;
  object-fit: contain;
}

.funder-logo-fallback {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  color: #fff;
  background: var(--teal);
  font-size: 17px;
  font-weight: 950;
}

.funder-logo-card span:not(.funder-logo-fallback) {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.funder-logo-card strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-size: 17px;
  line-height: 1.25;
}

.detail-heading h1 {
  max-width: 900px;
  color: var(--ink);
  font-size: clamp(44px, 7vw, 86px);
}

.detail-heading p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.62;
}

.archive-notice {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid rgba(195, 145, 45, 0.36);
  border-left: 6px solid var(--gold);
  border-radius: 8px;
  color: #4f3a1f;
  background: #fff6e3;
}

.archive-notice strong {
  font-size: 16px;
}

.archive-notice span {
  color: #6f5b3d;
  line-height: 1.5;
}

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

.detail-grid div {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf6;
}

.detail-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.detail-grid dd {
  margin: 6px 0 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.25;
}

.official-details {
  display: grid;
  gap: 16px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.official-details:nth-of-type(2) {
  border-top-color: rgba(195, 145, 45, 0.52);
}

.official-details h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.official-details h2::before {
  width: 46px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--teal), var(--gold));
  content: "";
}

.application-brief h2::before {
  background: linear-gradient(90deg, var(--sky), var(--rose));
}

.official-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.official-detail-grid article {
  position: relative;
  padding: 22px 22px 22px 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.official-detail-grid article:nth-child(2n) {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.official-detail-grid article::before {
  position: absolute;
  inset: 22px auto 22px 0;
  width: 4px;
  border-radius: 999px;
  background: var(--teal);
  content: "";
}

.official-detail-grid article:nth-child(3n + 2)::before {
  background: var(--gold);
}

.official-detail-grid article:nth-child(3n)::before {
  background: var(--rose);
}

.official-detail-grid h3 {
  margin: 0 0 10px;
  color: var(--teal-dark);
  font-size: 18px;
}

.official-detail-grid p,
.official-detail-grid ul {
  margin: 0;
  color: var(--muted);
  line-height: 1.58;
}

.official-detail-grid ul {
  padding-left: 20px;
}

.official-detail-grid li + li {
  margin-top: 6px;
}

.application-brief {
  padding-top: 22px;
}

.source-message {
  padding-top: 22px;
}

.source-message h2::before {
  background: linear-gradient(90deg, var(--rose), var(--gold));
}

.source-message-body {
  border-top: 1px solid var(--line);
  padding: 22px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.source-message-body p {
  max-width: 940px;
  margin: 0;
}

.source-message-body p + p {
  margin-top: 14px;
}

.source-message-note {
  display: inline-flex;
  border-left: 4px solid var(--gold);
  padding: 10px 14px;
  color: var(--teal-dark);
  background: #fff6df;
  font-weight: 800;
}

.opportunity-details {
  padding-top: 22px;
}

.opportunity-details h2::before {
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--rose));
}

.opportunity-details-body {
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.opportunity-details-body article {
  position: relative;
  padding: 20px 22px 20px 26px;
  border: 1px solid rgba(21, 83, 77, 0.12);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(229, 242, 238, 0.82), rgba(255, 249, 232, 0.74));
}

.opportunity-details-body article:nth-child(3n + 2) {
  background: linear-gradient(135deg, rgba(255, 243, 209, 0.82), rgba(237, 246, 250, 0.8));
}

.opportunity-details-body article:nth-child(3n) {
  background: linear-gradient(135deg, rgba(250, 232, 224, 0.72), rgba(229, 242, 238, 0.82));
}

.opportunity-details-body article::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 5px;
  border-radius: 999px;
  background: var(--teal);
}

.opportunity-details-body article:nth-child(3n + 2)::before {
  background: var(--gold);
}

.opportunity-details-body article:nth-child(3n)::before {
  background: var(--rose);
}

.opportunity-details-body h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
}

.opportunity-details-body p,
.opportunity-details-body ul {
  max-width: 980px;
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.opportunity-details-body p + p,
.opportunity-details-body li + li {
  margin-top: 8px;
}

.opportunity-details-body ul {
  padding-left: 20px;
}

.application-brief .official-detail-grid article {
  background: transparent;
}

.application-brief .official-detail-grid article::before {
  background: var(--sky);
}

.application-brief .official-detail-grid article:nth-child(3n + 2)::before {
  background: var(--gold);
}

.application-brief .official-detail-grid article:nth-child(3n)::before {
  background: var(--teal);
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
}

.detail-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 6px;
  padding: 0 18px;
  font-weight: 900;
  color: #fff;
  background: var(--teal);
}

.detail-primary-action.is-disabled {
  color: var(--muted);
  background: var(--paper);
  border: 1px solid rgba(21, 83, 77, 0.2);
  cursor: not-allowed;
}

.detail-secondary-action,
.detail-tertiary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 900;
}

.detail-secondary-action {
  color: #fff;
  background: #0a66c2;
}

.detail-tertiary-action {
  color: var(--ink);
  background: var(--sky-soft);
  border: 1px solid rgba(21, 83, 77, 0.22);
}

footer {
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
  padding: 28px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.74);
  background: var(--ink);
}

footer p {
  margin: 0;
}

footer p:first-child {
  color: #fff;
  font-weight: 900;
}

footer p + p {
  margin-top: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 800;
}

.footer-links a {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.24);
  text-underline-offset: 4px;
}

@media (max-width: 980px) {
  .site-header {
    position: absolute;
  }

  nav {
    display: none;
  }

  .toolbar,
  .section-heading,
  .detail-grid,
  .official-detail-grid {
    grid-template-columns: 1fr;
  }

  .official-detail-grid article,
  .official-detail-grid article:nth-child(2n) {
    padding: 18px 0 18px 16px;
    border-left: 0;
  }

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

@media (max-width: 640px) {
  .site-header {
    gap: 10px;
    min-height: 68px;
  }

  .brand {
    min-width: 0;
  }

  .brand-logo {
    width: 188px;
  }

  .hero {
    min-height: 86vh;
    padding-top: 106px;
  }

  .hero-media {
    object-position: center top;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 22, 24, 0.94), rgba(5, 22, 24, 0.58)),
      linear-gradient(0deg, rgba(21, 26, 31, 0.68), rgba(21, 26, 31, 0.08));
  }

  .grant-slider,
  .new-grant-slide,
  .hero-search,
  .results-bar {
    grid-template-columns: 1fr;
    display: grid;
  }

  .slider-control {
    width: 42px;
    min-height: 42px;
    justify-self: center;
  }

  .hero-search button {
    min-height: 48px;
  }

  .hero-stats {
    gap: 8px;
  }

  .hero-stats div {
    min-width: calc(50% - 8px);
    padding: 13px;
  }

  .opportunity-grid,
  .conference-grid {
    grid-template-columns: 1fr;
  }

  .sort-tabs {
    width: 100%;
  }

  .sort-tabs button {
    flex: 1;
  }

  footer {
    grid-template-columns: 1fr;
  }

  .footer-links {
    justify-content: flex-start;
  }
}
