:root {
  --ink: #1a2a24;
  --pine: #1e4a3c;
  --pine-deep: #132920;
  --clay: #9c3f24;
  --clay-hover: #7e321c;
  --gold: #b8924a;
  --paper: #f3eee3;
  --card: #fffdf8;
  --muted: #5b665e;
  --line: #d6ccb8;
  --line-strong: #c4b79d;
  --ok: #1e4a3c;
  --warn: #7a5a1a;
  --shadow: 0 1px 2px rgba(26, 42, 36, 0.06), 0 8px 24px rgba(26, 42, 36, 0.06);
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, sans-serif;
  --max: 72rem;
  --narrow: 44rem;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--pine); text-underline-offset: 0.15em; }
a:hover { color: var(--clay); }
.wrap { width: min(var(--max), calc(100% - 2.5rem)); margin-inline: auto; }
.narrow { width: min(var(--narrow), calc(100% - 2.5rem)); margin-inline: auto; }

/* Header */
.site-header {
  background: var(--pine-deep);
  color: #f4efe6;
  border-bottom: 3px solid var(--gold);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
  flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; }
.brand svg { flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.01em; }
.brand-tag { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: #d7c7a4; }
nav { display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; font-size: 0.95rem; }
nav a { color: #f4efe6; text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: #f0d48a; text-decoration: underline; }
.nav-cta {
  background: var(--clay);
  color: #fff !important;
  text-decoration: none !important;
  padding: 0.4rem 0.85rem;
  border-radius: 2px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--clay-hover); color: #fff !important; }

/* Hero */
.hero {
  background:
    linear-gradient(180deg, rgba(19,41,32,0.18), rgba(19,41,32,0.08)),
    var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 3.4rem 0 3rem;
}
.hero h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(2rem, 4.4vw, 3.15rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.9rem;
  max-width: 18ch;
}
.lede { font-size: 1.2rem; max-width: 42rem; color: var(--muted); margin: 0 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-block;
  background: var(--clay);
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  padding: 0.7rem 1.15rem;
  border-radius: 2px;
  border: 2px solid var(--clay);
}
.btn:hover { background: var(--clay-hover); border-color: var(--clay-hover); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--pine-deep);
  border-color: var(--pine);
}
.btn-secondary:hover { background: var(--pine); color: #fff; }

/* Sections */
.section { padding: 3rem 0; }
.section + .section { border-top: 1px solid var(--line); }
h2 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
}
h3 { font-family: var(--serif); font-weight: 560; font-size: 1.2rem; margin: 0 0 0.4rem; }
.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  font-weight: 650;
  margin: 0 0 0.4rem;
}
.muted { color: var(--muted); }
.grid-3, .grid-2 { display: grid; gap: 1.15rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow);
}
.card ol, .card ul { margin: 0.4rem 0 0; padding-left: 1.15rem; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.5rem 0 0; }
.stat { text-align: left; }
.stat b { display: block; font-family: var(--serif); font-size: 1.7rem; font-weight: 560; color: var(--pine-deep); }
.stat span { color: var(--muted); font-size: 0.92rem; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.2rem 0; border: 1px solid var(--line); border-radius: 4px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.65rem 0.8rem; vertical-align: top; border-bottom: 1px solid var(--line); }
th { background: var(--pine-deep); color: #f4efe6; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; }
tr:nth-child(even) td { background: #f7f3ea; }
.pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.45rem;
  border-radius: 2px;
  background: #e4eee8;
  color: var(--pine-deep);
}
.pill.invite { background: #f3ead4; color: var(--warn); }

/* Tool */
.tool-box { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 1.4rem; box-shadow: var(--shadow); }
label { display: block; font-weight: 650; font-size: 0.9rem; margin: 0 0 0.3rem; }
select, input[type="text"] {
  width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  margin-bottom: 0.9rem;
}
.tool-fields { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0.8rem; align-items: end; }
.tool-fields .btn { margin-bottom: 0.9rem; }
.result { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 0.4rem; }
.result h3 { margin-top: 1rem; }
.grant-line { font-size: 0.92rem; color: var(--muted); margin: 0.2rem 0 0; }

/* Footer */
.site-footer {
  background: var(--pine-deep);
  color: #d9d2c4;
  padding: 2.2rem 0 1.6rem;
  margin-top: 0;
  font-size: 0.9rem;
}
.site-footer a { color: #f0d48a; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1.5rem; margin-bottom: 1.4rem; }
.site-footer h2 { color: #f4efe6; font-size: 1rem; margin-bottom: 0.5rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0.25rem 0; }
.legal { border-top: 1px solid #35564a; padding-top: 1rem; color: #b7b0a2; font-size: 0.82rem; }

/* Guide index */
.guide-list { display: grid; gap: 0.55rem; }
.guide-list a {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); padding: 0.7rem 0.9rem;
  text-decoration: none; color: inherit; border-radius: 3px;
}
.guide-list a:hover { border-color: var(--pine); }
.guide-list small { color: var(--muted); }

/* Sample / prose */
.prose p { margin: 0 0 0.9rem; }
.prose ul { margin: 0 0 1rem; }
.callout {
  background: #ece6d6;
  border-left: 4px solid var(--gold);
  padding: 0.9rem 1rem;
  margin: 1.2rem 0;
}
.price {
  font-family: var(--serif);
  font-size: 3rem;
  font-weight: 560;
  line-height: 1;
  color: var(--pine-deep);
}
.price span { font-size: 1rem; font-family: var(--sans); color: var(--muted); font-weight: 500; }

@media (max-width: 860px) {
  .grid-3, .stat-row, .tool-fields, .foot-grid, .grid-2 { grid-template-columns: 1fr; }
  nav { width: 100%; }
}
h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(1.85rem, 3.6vw, 2.55rem);
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin: 0 0 0.85rem;
}
th, td { padding: 0.7rem 0.85rem; }
table { font-size: 0.92rem; }
