/* Shared, lightweight styles. System fonts only — no external requests. */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #1a1a1a;
  background: #f4f5f4;
}
a { color: #0b5d3b; }
code { background: #eef3ef; padding: 1px 5px; border-radius: 3px; font-size: 0.9em; }

header {
  background: #0b3d2e;
  color: #fff;
  padding: 14px 16px;
}
header .wrap { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
header h1 { margin: 0; font-size: 1.25rem; font-weight: 600; }
header p { margin: 4px 0 0; font-size: 0.85rem; color: #cfe6da; }
header a.navlink { color: #d7efe2; font-size: 0.85rem; white-space: nowrap; }
.nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.nav a { color: #d7efe2; font-size: 0.9rem; white-space: nowrap; }
.nav a:hover { color: #fff; }
.nav a.active { color: #fff; font-weight: 600; text-decoration: underline; }

/* Simple text-content pages (About, Contact) */
.prose { background: #fff; border: 1px solid #dfe4df; border-radius: 6px; padding: 20px; margin-bottom: 16px; }
.prose h2 { margin: 0 0 10px; font-size: 1.15rem; color: #0b3d2e; }
.prose h3 { margin: 18px 0 6px; font-size: 1rem; color: #0b3d2e; }
.prose p { margin: 0 0 12px; }
.prose ul { margin: 0 0 12px; padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.glossary { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.term { border: 1px solid #e0e6e1; border-radius: 6px; padding: 12px; background: #fafbfa; }
.term b { color: #0b5d3b; }
.term span { display: block; font-size: 0.9rem; color: #444; margin-top: 3px; }
@media (max-width: 640px) { .glossary { grid-template-columns: 1fr; } }

main { max-width: 1000px; margin: 0 auto; padding: 16px; }

.stats {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  background: #fff; border: 1px solid #d9ddd9; border-radius: 4px;
  padding: 10px 14px; margin-bottom: 14px; font-size: 0.9rem;
}
.stats b { color: #0b5d3b; font-size: 1.05rem; }

.controls { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.controls input, .controls select {
  font-size: 1rem; padding: 9px 10px;
  border: 1px solid #b9c1b9; border-radius: 4px; background: #fff; color: #1a1a1a;
}
.controls input[type="search"] { flex: 1 1 220px; min-width: 0; }
.controls #place { flex: 1 1 200px; min-width: 0; }
.controls select { flex: 0 1 220px; }

/* Optional map (only rendered once the visitor opens it) */
#map { height: 360px; margin: 0 0 12px; border: 1px solid #cbd7cf; border-radius: 6px; }
.pop { font-size: 0.9rem; line-height: 1.45; }
.pop .tag { margin-top: 3px; }

.count { font-size: 0.85rem; color: #555; margin: 0 0 10px; }
.msg { padding: 10px 14px; border-radius: 4px; margin: 0 0 12px; font-size: 0.9rem; }
.msg.error { background: #fbeaea; border: 1px solid #e6c3c3; color: #8a1f1f; }
.msg.ok { background: #e8f4ec; border: 1px solid #c3e0cd; color: #14512f; }

table { width: 100%; border-collapse: collapse; background: #fff; }
thead th {
  background: #e7efe9; text-align: left; font-size: 0.8rem; letter-spacing: .02em;
  text-transform: uppercase; color: #33463d; padding: 10px; border-bottom: 2px solid #cbd7cf;
}
tbody td { padding: 10px; border-bottom: 1px solid #e4e8e4; vertical-align: top; font-size: 0.92rem; }
tbody tr:nth-child(even) { background: #fafbfa; }
.loc-main { font-weight: 600; }
.loc-sub { color: #666; font-size: 0.82rem; }
.dist { color: #0b5d3b; font-size: 0.82rem; font-weight: 600; }
.tag {
  display: inline-block; background: #eef3ef; border: 1px solid #d5ddd6; border-radius: 3px;
  padding: 1px 7px; margin: 2px 3px 2px 0; font-size: 0.78rem; color: #2c463a;
}
.acres { white-space: nowrap; }
.empty { padding: 24px; text-align: center; color: #777; background: #fff; }

button {
  font-size: 0.95rem; padding: 8px 14px; border-radius: 4px; border: 1px solid #0b5d3b;
  background: #0b5d3b; color: #fff; cursor: pointer;
}
button.secondary { background: #fff; color: #0b5d3b; }
button.danger { background: #fff; color: #a11; border-color: #d99; }
button:disabled { opacity: .5; cursor: default; }

footer {
  max-width: 1000px; margin: 20px auto 40px; padding: 0 16px;
  font-size: 0.8rem; color: #666;
}

/* ---- Admin form ---- */
.card { background: #fff; border: 1px solid #dfe4df; border-radius: 6px; padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.8rem; color: #445; margin-bottom: 4px; }
.field input {
  font-size: 1rem; padding: 8px 10px; border: 1px solid #b9c1b9; border-radius: 4px;
}
.field small { color: #778; font-size: 0.72rem; margin-top: 3px; }
.row-actions { display: flex; gap: 8px; }
.token-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.token-bar input { flex: 1 1 260px; }

/* ---- Responsive: stack tables into cards on small screens ---- */
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    background: #fff; border: 1px solid #dfe4df; border-radius: 5px;
    margin-bottom: 10px; padding: 4px 2px;
  }
  tbody tr:nth-child(even) { background: #fff; }
  tbody td { border: none; padding: 6px 12px; }
  tbody td::before {
    content: attr(data-label); display: block; font-size: 0.7rem; text-transform: uppercase;
    letter-spacing: .03em; color: #7a867e; margin-bottom: 2px;
  }
}
