:root {
  --color-bg: #F2EEE2;
  --color-surface: #FFFFFF;
  --color-ink: #16323E;
  --color-ink-soft: #4A5B60;
  --color-accent: #3F7D6E;
  --color-accent-dark: #2E5C51;
  --color-gold: #C9962C;
  --color-border: #DDD6C4;
  --color-danger: #A6432F;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 4px;
  --max-width: 900px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-ink);
  line-height: 1.15;
  font-weight: 600;
  margin: 0 0 0.4em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; max-width: 65ch; }

a { color: var(--color-accent-dark); }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.muted { color: var(--color-ink-soft); font-size: 0.92rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary { background: var(--color-gold); color: #2A2109; }
.btn-primary:hover { background: #B98622; }

.btn-quiet { background: transparent; color: var(--color-ink); border: 1px solid var(--color-border); }
.btn-quiet:hover { border-color: var(--color-ink-soft); }

.btn-approve { background: var(--color-accent); color: #fff; }
.btn-approve:hover { background: var(--color-accent-dark); }

.btn-reject, .btn-delete { background: transparent; color: var(--color-danger); border: 1px solid var(--color-danger); }
.btn-reject:hover, .btn-delete:hover { background: var(--color-danger); color: #fff; }

/* Header / hero */
.site-header {
  background: var(--color-ink);
  color: #F2EEE2;
  padding: 3rem 0 2.5rem;
}

.site-header .site-mark {
  margin: 0 0 0.6em;
  font-size: 0.95rem;
  color: #B9C7C2;
}

.site-header h1 { color: #fff; }

.site-header .lede {
  color: #D6DEDB;
  max-width: 52ch;
}

/* Map */
.map-section { width: 100%; }
#map, #street-preview {
  width: 100%;
  background: #E7E2D3;
}
#map { height: 62vh; min-height: 380px; }
#street-preview { height: 220px; margin-top: 0.6rem; border-radius: var(--radius); overflow: hidden; }

/* About / steps */
.about { padding: 3rem 0; }

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.6rem;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.6rem 0;
  color: var(--color-ink-soft);
  font-size: 0.9rem;
}

/* Forms */
.form-page { padding: 2.5rem 0 4rem; }

.form-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  max-width: 560px;
}

.field { margin-bottom: 1.3rem; }

.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.field .hint { display: block; font-weight: 400; color: var(--color-ink-soft); font-size: 0.88rem; margin-top: 0.25rem; }

input[type="text"], input[type="email"], select, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--color-ink);
}

input:focus, select:focus, textarea:focus {
  outline: 3px solid var(--color-gold);
  outline-offset: 1px;
}

.honeypot { position: absolute; left: -9999px; }

#street-results {
  list-style: none;
  margin: 0.4rem 0 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  max-height: 220px;
  overflow-y: auto;
}

#street-results li {
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  border-bottom: 1px solid var(--color-border);
}
#street-results li:last-child { border-bottom: none; }
#street-results li:hover, #street-results li:focus { background: var(--color-bg); }

.alert {
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.alert-error { background: #F6E4DF; color: var(--color-danger); border: 1px solid var(--color-danger); }
.alert-success { background: #E4EFEA; color: var(--color-accent-dark); border: 1px solid var(--color-accent); }

/* Admin */
.admin-header {
  background: var(--color-ink);
  color: #fff;
  padding: 1.2rem 0;
  margin-bottom: 2rem;
}
.admin-header .wrap { display: flex; justify-content: space-between; align-items: center; }
.admin-header a { color: #D6DEDB; }
.admin-header h1 { color: #fff; font-size: 1.3rem; margin: 0; }

.admin-page { padding-bottom: 4rem; }

table.pledges {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5rem;
  background: var(--color-surface);
}
table.pledges th, table.pledges td {
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
  vertical-align: top;
}
table.pledges th { color: var(--color-ink-soft); font-weight: 600; }
table.pledges .actions { white-space: nowrap; }
table.pledges .actions form { display: inline-block; margin-right: 0.4rem; }

@media (max-width: 640px) {
  h1 { font-size: 1.9rem; }
  .site-header { padding: 2.2rem 0 2rem; }
  #map { height: 50vh; }
  .form-card { padding: 1.4rem; }
  table.pledges { display: block; overflow-x: auto; }
}
