:root {
  --ink: #1d2a22;
  --muted: #5d6b60;
  --paper: #f3ecdc;
  --card: #fffaf1;
  --line: #e3d6bf;
  --moss: #234736;
  --moss-2: #3e6b4f;
  --clay: #9a4e32;
  --ok: #e5f2e4;
  --shadow: 0 10px 30px rgba(48, 36, 18, 0.06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(62, 107, 79, 0.08), transparent 32rem),
    var(--paper);
  font: 17px/1.5 "Avenir Next", "Segoe UI", sans-serif;
}
a { color: var(--moss); }
img { max-width: 100%; display: block; }
h1, h2, .brand strong {
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.05; margin: 0.2rem 0 0.6rem; }
h2 { margin: 0; font-size: 1.55rem; }

.top, main, footer { width: min(980px, calc(100% - 2rem)); margin: 0 auto; }
.top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 0;
}
.brand { display: flex; gap: 0.75rem; align-items: center; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand small { color: var(--muted); letter-spacing: 0.04em; }
.mark {
  width: 2.6rem; height: 2.6rem; display: grid; place-items: center;
  border-radius: 50%; background: var(--moss); color: #f6f1e6;
  font-family: Georgia, serif;
}
nav { display: flex; gap: 0.4rem; }
nav a {
  text-decoration: none; color: var(--ink);
  padding: 0.45rem 0.75rem; border-radius: 999px;
}
nav a:hover { background: rgba(35, 71, 54, 0.08); }
main { padding-bottom: 3rem; }
footer {
  display: flex; justify-content: space-between; gap: 1rem;
  color: var(--muted); font-size: 0.92rem; padding: 1rem 0 2rem;
}

.hero { padding: 1.2rem 0 0.4rem; }
.eyebrow { margin: 0; color: var(--clay); letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.78rem; }
.lead { font-size: 1.08rem; max-width: 40rem; color: var(--ink); }
.stats { color: var(--muted); }
.button, button.button {
  display: inline-block; border: 0; cursor: pointer;
  background: var(--moss); color: #f7f3e8; text-decoration: none;
  border-radius: 999px; padding: 0.85rem 1.2rem; font: inherit;
}
.button.secondary { background: transparent; color: var(--moss); border: 1px solid var(--moss); }
.text-button { background: none; border: 0; color: var(--moss); cursor: pointer; font: inherit; padding: 0; }
.text-button.danger { color: var(--clay); }
.steps { display: grid; gap: 0.7rem; padding: 0; list-style: none; margin: 1.5rem 0; }
.steps li, .sheet, .card, .species-read article, .filters {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow);
}
.steps li { padding: 0.9rem 1rem; }

.sheet { padding: 0.4rem 1rem 1rem; display: grid; gap: 0.2rem; }
.sheet.narrow { max-width: 28rem; }
fieldset { border: 0; border-top: 1px solid var(--line); margin: 0.4rem 0; padding: 1rem 0; }
legend { padding: 0; font-family: Georgia, serif; font-size: 1.35rem; }
legend span {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem;
  margin-right: 0.4rem; border-radius: 50%; background: var(--moss); color: white;
  font-family: "Avenir Next", sans-serif; font-size: 0.9rem;
}
label { display: grid; gap: 0.35rem; margin: 0.7rem 0; font-size: 0.95rem; }
input, select {
  width: 100%; font: inherit; color: inherit;
  background: #fff; border: 1px solid #d9cbb3; border-radius: 12px;
  padding: 0.75rem 0.8rem;
}
input:focus, select:focus { outline: 2px solid var(--moss-2); border-color: transparent; }
.hint { color: var(--muted); margin: 0.2rem 0; font-size: 0.92rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.choice {
  display: flex; gap: 0.4rem; align-items: center; margin: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 0.45rem 0.75rem;
}
.choice input { width: auto; }
.counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.counts.read div {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 0.8rem; display: grid;
}
.counts.read b { font-family: Georgia, serif; font-size: 1.8rem; }
.counts.read span, .card span, .card small { color: var(--muted); }
.map { height: 320px; border-radius: 16px; border: 1px solid var(--line); }
.map.tall { height: min(70vh, 640px); }
.species-card, .species-read article { padding: 0.8rem 1rem 1rem; margin: 0.8rem 0; }
.species-card header, .admin-bar, .admin-bar div { display: flex; justify-content: space-between; gap: 0.8rem; align-items: center; }
.custom-field { display: none; }
.submit-bar { position: sticky; bottom: 0.6rem; }
.flash { background: #f8e6d8; border-radius: 12px; padding: 0.8rem 1rem; }
.flash.ok { background: var(--ok); }
.latin { font-style: italic; margin-top: 0; }
.species-read dl { display: grid; gap: 0.35rem; margin: 0.6rem 0; }
.species-read dl div { display: grid; grid-template-columns: 8rem 1fr; gap: 0.5rem; }
dt { color: var(--muted); }
dd { margin: 0; }
.photo { margin: 0.8rem 0; }
.photo img { border-radius: 16px; }
.photo figcaption { color: var(--muted); font-size: 0.9rem; }
.filters, .cards { display: grid; gap: 0.7rem; }
.filters { grid-template-columns: 1fr 1fr auto; align-items: end; padding: 0.8rem; margin-bottom: 1rem; }
.card { display: grid; grid-template-columns: 96px 1fr; gap: 0.8rem; padding: 0.7rem; color: inherit; text-decoration: none; overflow: hidden; }
.card img { width: 96px; height: 96px; object-fit: cover; border-radius: 12px; }
.card div { display: grid; align-content: center; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
@media (max-width: 720px) {
  .top, .counts, .filters, .card, .species-read dl div { display: grid; }
  .top { grid-template-columns: 1fr; }
  .counts, .filters { grid-template-columns: 1fr; }
  .card { grid-template-columns: 1fr; }
  .card img { width: 100%; height: 180px; }
  .species-read dl div { grid-template-columns: 1fr; }
  footer { display: grid; }
}

.leaflet-control-attribution { display: none !important; }
