/* GrantShare: a county clerk's deadline ledger. One bold element (the date stamp), everything else quiet. */
:root {
  --ink: #14231b;
  --pine: #1d4a35;
  --pine-2: #2b6b4d;
  --sage: #e7eee6;
  --sage-2: #d3dfd2;
  --paper: #fbfcfa;
  --gold: #e3b13a;
  --gold-ink: #5a4100;
  --rust: #a8431f;
  --muted: #4f6157;
  --line: #cfdacf;
  --radius: 6px;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
}
img { max-width: 100%; display: block; }
a { color: var(--pine); text-underline-offset: 3px; }
a:hover { color: var(--pine-2); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 2px; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--gold); color: var(--ink); padding: 8px 12px; z-index: 10; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 650; }
h3 { font-size: 1.25rem; font-weight: 650; }
p { margin: 0 0 1em; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 38em; }
.muted { color: var(--muted); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
.header-in { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 1.3rem var(--display); color: var(--ink); text-decoration: none; }
.logo-mark { width: 22px; height: 22px; border-radius: 4px; background: var(--pine); box-shadow: inset 0 -7px 0 var(--gold); }
.nav { display: flex; gap: 4px; margin-left: auto; }
.nav a { padding: 8px 12px; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-weight: 700; font-size: 0.98rem; }
.nav a:hover { background: var(--sage); }
.nav a[aria-current="page"] { background: var(--sage); color: var(--pine); }
.nav-toggle { display: none; margin-left: auto; font: 700 1rem var(--body); background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 14px; color: var(--ink); }
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .site-header.open .nav { display: flex; }
}

/* Buttons and forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: 700 1rem var(--body); padding: 12px 20px; border-radius: var(--radius); border: 2px solid var(--pine); background: var(--pine); color: #fff; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--pine-2); border-color: var(--pine-2); color: #fff; }
.btn:disabled { opacity: 0.6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--pine); }
.btn-ghost:hover { background: var(--sage); color: var(--pine); }
.btn-gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #d29f25; border-color: #d29f25; color: var(--ink); }
label { display: block; font-weight: 700; margin-bottom: 6px; }
input, select, textarea { width: 100%; font: 400 1rem var(--body); color: var(--ink); background: #fff; border: 1px solid #a9b9ab; border-radius: var(--radius); padding: 11px 12px; }
textarea { min-height: 120px; resize: vertical; }
.inline-field { display: flex; gap: 8px; }
.inline-field input { flex: 1; min-width: 0; }
.field { margin-bottom: 16px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .inline-field { flex-direction: column; } }
.form-msg { min-height: 1.5em; margin: 8px 0 0; font-weight: 700; color: var(--pine); }

/* The stamp: the one bold element */
.stamp { flex: none; width: 76px; height: 80px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 2px solid var(--ink); border-radius: var(--radius); background: #fff; box-shadow: 4px 4px 0 var(--gold); transform: rotate(-2deg); }
.stamp-m { font: 700 0.85rem var(--display); color: var(--rust); letter-spacing: 0.02em; }
.stamp-d { font: 800 2.1rem/1 var(--display); }
.stamp-word .stamp-d { font-size: 0.95rem; font-weight: 700; text-align: center; line-height: 1.15; padding: 0 6px; }

/* Ledger rows */
.ledger { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.row { border-bottom: 1px solid var(--line); }
.row-link { display: grid; grid-template-columns: 76px 1fr auto; gap: 24px; align-items: center; padding: 22px 8px; color: inherit; text-decoration: none; }
.row-link:hover { background: var(--sage); }
.row-link:hover .row-title { text-decoration: underline; }
.row-main { display: flex; flex-direction: column; min-width: 0; }
.row-title { font: 650 1.2rem/1.25 var(--display); overflow-wrap: anywhere; }
.row-funder { color: var(--muted); font-size: 0.95rem; margin-top: 2px; }
.row-summary { margin-top: 8px; max-width: 60ch; }
.row-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; text-align: right; max-width: 220px; }
.row-amount { font-weight: 700; }
@media (max-width: 720px) {
  .row-link { grid-template-columns: 64px 1fr; gap: 16px; }
  .row-link .stamp { width: 64px; height: 68px; }
  .row-side { grid-column: 2; align-items: flex-start; text-align: left; max-width: none; flex-direction: row; flex-wrap: wrap; }
}
.pill { display: inline-block; font-size: 0.85rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.pill-open { background: #d7ecdc; color: #11502c; }
.pill-urgent { background: var(--gold); color: var(--ink); }
.pill-soon { background: #e4e9f3; color: #253b66; }
.pill-closed { background: #ececea; color: #4b4f4c; }

/* Skeletons and states */
.skel { height: 120px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, var(--sage) 0, #f3f6f2 40%, var(--sage) 80%) 0 0 / 200% 100%; animation: shimmer 1.4s infinite linear; opacity: 0.6; }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } * { scroll-behavior: auto; } }
.state { padding: 40px 8px; border-bottom: 1px solid var(--line); }
.state h3 { margin-bottom: 6px; }
.dim { opacity: 0.55; transition: opacity 0.15s; }

/* Sections */
.section { padding: 72px 0; }
.section-sage { background: var(--sage); }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.page-head { padding: 48px 0 24px; }
.page-head h1 { font-size: clamp(2rem, 4vw, 3rem); }

/* Footer */
.site-footer { background: var(--pine); color: #e6efe7; margin-top: 0; }
.site-footer a { color: #fff; }
.site-footer .logo { color: #fff; }
.site-footer .logo-mark { background: #fff; box-shadow: inset 0 -7px 0 var(--gold); }
.footer-in { display: grid; grid-template-columns: 1.1fr 1.2fr; gap: 32px 48px; padding: 56px 0 32px; }
.footer-about p { margin-top: 12px; max-width: 34em; }
.footer-signup label { color: #fff; }
.footer-signup input { border-color: transparent; }
.footer-signup .form-msg { color: var(--gold); }
.footer-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px 24px; border-top: 1px solid rgba(255,255,255,0.2); padding-top: 24px; }
.fine { grid-column: 1 / -1; font-size: 0.9rem; color: #bcd0c1; margin: 0; }
@media (max-width: 760px) { .footer-in { grid-template-columns: 1fr; } }

/* Prose pages */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.5rem; margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }