:root {
  --rate-green: #2d8659;
  --rate-green-deep: #1a5d3a;
  --rate-green-soft: #d4ebde;
  --rate-orange: #e8782e;
  --rate-orange-deep: #c45a1a;
  --rate-yellow: #f4c430;

  --ink: #131818;
  --ink-soft: #2a3439;
  --muted: #5a646b;
  --paper: #fbfaf6;
  --cream: #f5f1e8;
  --panel: #ffffff;
  --line: #e2e0d8;
  --line-soft: #ecebe4;
  --dark: #0e1614;

  --status-now: #1a5d3a;
  --status-warm: #c45a1a;
  --status-queued: #5a646b;
}

* { 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;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--rate-green-deep); text-decoration: none; transition: opacity .15s ease; }
a:hover { opacity: .8; }

/* Micro bar */
.micro-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: var(--ink);
  color: rgba(255,255,255,.92);
  font-size: 13px;
  font-weight: 500;
  flex-wrap: wrap;
}
.micro-back { color: var(--rate-yellow); font-weight: 600; }
.micro-back:hover { opacity: 1; color: #fff; }

.micro-mark {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--rate-green);
  color: #fff;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 12px;
}
.micro-text { font-weight: 600; }
.micro-pill {
  margin-left: auto;
  padding: 4px 12px;
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--rate-yellow);
}

/* Hero */
.hero {
  position: relative;
  padding: 64px 24px 48px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -160px;
  right: -160px;
  width: 460px;
  height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(45,134,89,.14), transparent 70%);
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 920px;
  margin: 0 auto;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.rank-pill {
  padding: 5px 14px;
  background: var(--rate-green);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.status {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.status-now { background: rgba(45,134,89,.15); color: var(--status-now); }
.status-warm { background: rgba(232,120,46,.18); color: var(--status-warm); }
.status-queued { background: rgba(90,100,107,.15); color: var(--status-queued); }

h1 {
  margin: 14px 0 14px;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
}
h1 em { font-style: italic; font-weight: 500; color: var(--rate-green-deep); }

h2, h3, h4 {
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: var(--ink);
}
h2 { margin: 0 0 14px; font-size: clamp(26px, 3.4vw, 38px); font-weight: 600; }
h3 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
h4 { margin: 0 0 10px; font-size: 15px; font-weight: 700; }

p { margin: 0 0 14px; color: var(--ink-soft); }

.lead {
  max-width: 760px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--ink-soft);
  line-height: 1.5;
  margin-bottom: 28px;
}

/* Quick facts strip */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.fact-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.fact-value {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

/* Buttons */
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
}
.btn-lg { padding: 16px 28px; font-size: 16px; }
.btn-primary { background: var(--rate-green); color: #fff; }
.btn-primary:hover { background: var(--rate-green-deep); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(26,93,58,.55); opacity: 1; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; opacity: 1; }
.btn-orange { background: var(--rate-orange); color: #fff; }
.btn-orange:hover { background: var(--rate-orange-deep); transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(232,120,46,.55); opacity: 1; }

/* Bands */
.band { padding: 64px 24px; }
.band-cream { background: var(--cream); }
.band-dark { background: var(--dark); color: #fff; }
.band-dark p { color: rgba(255,255,255,.8); }

.container { max-width: 920px; margin: 0 auto; }

.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  margin-bottom: 14px;
  background: var(--cream);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.eyebrow-light {
  background: rgba(255,255,255,.15);
  color: var(--rate-yellow);
}

.h-light { color: #fff; }

/* Why fits list */
.fits {
  display: grid;
  gap: 12px;
  margin: 24px 0;
}
.fit-row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 18px 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: start;
}
.fit-check {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--rate-green);
  color: #fff;
  font-weight: 800;
  font-size: 12px;
}
.fit-row strong { color: var(--ink); font-weight: 600; }
.fit-row .fit-text { font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.fit-row .fit-text strong { display: block; margin-bottom: 4px; color: var(--ink); font-family: 'Playfair Display', serif; font-weight: 600; font-size: 17px; }

/* Draft display - the centerpiece */
.draft-frame {
  margin-top: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 48px -32px rgba(0,0,0,.16);
}

.draft-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.draft-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}
.draft-dot:nth-child(1) { background: #ff5f57; }
.draft-dot:nth-child(2) { background: #ffbd2e; }
.draft-dot:nth-child(3) { background: #28c840; }
.draft-title {
  margin-left: 12px;
  font-family: 'Inter', ui-sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.draft-body {
  padding: 36px 44px;
}

.draft-body h3 {
  margin-top: 28px;
  margin-bottom: 8px;
  font-size: 21px;
}
.draft-body h3:first-child { margin-top: 0; }
.draft-body h4 {
  margin-top: 20px;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.draft-body p { font-size: 16px; line-height: 1.65; }
.draft-body ul, .draft-body ol { padding-left: 22px; margin-bottom: 14px; }
.draft-body li { margin-bottom: 6px; font-size: 15px; line-height: 1.55; color: var(--ink-soft); }
.draft-body strong { color: var(--ink); }

.field-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 15px;
}
.field-row:last-child { border-bottom: 0; }
.field-row .field-label {
  font-weight: 700;
  color: var(--ink);
}
.field-row .field-value {
  color: var(--ink-soft);
}
.field-row .field-value.placeholder {
  font-style: italic;
  color: var(--rate-orange-deep);
  background: rgba(232,120,46,.08);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.placeholder-inline {
  font-style: italic;
  color: var(--rate-orange-deep);
  background: rgba(232,120,46,.1);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
}

.draft-aside {
  margin: 20px 0;
  padding: 18px 22px;
  background: var(--cream);
  border-left: 3px solid var(--rate-yellow);
  border-radius: 0 10px 10px 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.draft-aside strong { color: var(--ink); }

.draft-quote {
  margin: 20px 0;
  padding: 22px 26px;
  background: var(--cream);
  border-left: 4px solid var(--rate-green);
  border-radius: 0 12px 12px 0;
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

/* Missing info checklist */
.missing-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}
.missing-list li {
  position: relative;
  padding: 14px 18px 14px 50px;
  margin-bottom: 8px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 1.5;
}
.missing-list li::before {
  content: '';
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid var(--line);
  border-radius: 4px;
}

/* Final CTA */
.cta-card {
  text-align: center;
  padding: 48px 36px;
  background: linear-gradient(135deg, var(--cream) 0%, #fff 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 24px 48px -32px rgba(0,0,0,.12);
}
.cta-card h2 { margin-bottom: 14px; }
.cta-card p { max-width: 600px; margin: 0 auto 24px; font-size: 17px; }

.cta-card-dark {
  text-align: center;
  padding: 48px 36px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
}
.cta-card-dark h2 { color: #fff; margin-bottom: 14px; }
.cta-card-dark p { max-width: 600px; margin: 0 auto 24px; font-size: 17px; color: rgba(255,255,255,.85); }
.btn-yellow { background: var(--rate-yellow); color: var(--ink); }
.btn-yellow:hover { background: #ebbb22; transform: translateY(-1px); box-shadow: 0 8px 24px -8px rgba(244,196,48,.55); opacity: 1; }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn-ghost-light:hover { background: #fff; color: var(--ink); opacity: 1; }
.hero-ctas-center { justify-content: center; }

/* Footer */
.footer {
  padding: 28px 24px;
  background: var(--ink);
  color: rgba(255,255,255,.6);
  font-size: 13px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.footer strong { color: #fff; }
.footer a { color: var(--rate-yellow); }

/* Index page grid */
.grant-index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-top: 32px;
}

.grant-card {
  display: block;
  padding: 28px 30px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--ink);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.grant-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -16px rgba(0,0,0,.12);
  border-color: var(--rate-green-soft);
  opacity: 1;
}

.grant-card-rank {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--rate-orange);
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 10px;
}

.grant-card-name {
  font-family: 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.grant-card-meta {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 14px;
}

.grant-card-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 18px;
}

.grant-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--rate-green-deep);
}

.grant-card-link::after {
  content: '→';
  transition: transform .15s ease;
}

.grant-card:hover .grant-card-link::after {
  transform: translateX(4px);
}

/* Responsive */
@media (max-width: 800px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .draft-body { padding: 24px 22px; }
  .field-row { grid-template-columns: 1fr; gap: 4px; }
  .grant-index-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
