/* Palette: parkland greens with a survey-marker orange for "selected". */
:root {
  --ground: #eef1ec;
  --panel: #ffffff;
  --ink: #1f2a22;
  --muted: #5d6b60;
  --line: #cfd8cf;
  --forest: #33513a;
  --marker: #e36414;
  --trad: #2e8b57;
  --mystery: #2f5da8;
  --multi: #c68a00;
  --other: #7a6a8f;
  --danger: #b3261e;
  --radius: 6px;
  --body: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --head: "Bitter", Georgia, serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--ground); color: var(--ink); font: 16px/1.5 var(--body); }
a { color: var(--forest); }
h1, h2 { font-family: var(--head); font-weight: 700; line-height: 1.2; margin: 0; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.1rem; }
:focus-visible { outline: 3px solid var(--marker); outline-offset: 2px; }

button, input { font: inherit; }
button {
  border: 1px solid var(--forest); background: var(--panel); color: var(--forest);
  border-radius: var(--radius); padding: 0.45rem 0.9rem; cursor: pointer;
}
button:hover { background: #e3ebe3; }
button.primary { background: var(--forest); color: #fff; }
button.primary:hover { background: #26402c; }
button:disabled { opacity: 0.45; cursor: not-allowed; }
button:disabled:hover { background: var(--panel); }
button.primary:disabled { opacity: 1; background: #9aa89c; border-color: #9aa89c; }
input:disabled { background: #f0f2ef; cursor: not-allowed; }
button.active { background: var(--marker); border-color: var(--marker); color: #fff; }
button.link { border: none; background: none; padding: 0 0.25rem; color: var(--muted); }
button.link:hover { color: var(--danger); background: none; }
input[type=text], input[type=password] {
  width: 100%; padding: 0.5rem 0.6rem; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}

/* ---------- Map page ---------- */
.map-layout { display: grid; grid-template-columns: 1fr 380px; height: 100%; }
#map { height: 100%; }
#map.selecting { cursor: crosshair; }
.panel {
  background: var(--panel); border-left: 1px solid var(--line);
  padding: 1.25rem; overflow-y: auto; display: flex; flex-direction: column; gap: 1.1rem;
}
.panel header p { margin: 0.35rem 0 0; color: var(--muted); }
.steps { margin: 0.4rem 0 0; padding-left: 1.2rem; color: var(--muted); }
.steps li { margin-bottom: 0.3rem; }
.tools { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.count { color: var(--muted); font-size: 0.9rem; }

.selection { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.selection li {
  display: flex; align-items: baseline; gap: 0.5rem;
  padding: 0.4rem 0; border-bottom: 1px solid var(--line);
}
.selection .gc { font-weight: 700; color: var(--forest); min-width: 5.2rem; }
.selection .nm { flex: 1; }
.selection .empty { color: var(--muted); border-bottom: none; }

label.field, div.field { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 700; }
div.field .message { font-weight: 400; }
.pw-row { display: flex; gap: 0.5rem; }
.pw-row input { flex: 1; min-width: 0; }
label.field small { font-weight: 400; color: var(--muted); }

.message { padding: 0.6rem 0.8rem; border-radius: var(--radius); display: none; }
.message.ok { display: block; background: #e2f0e4; border: 1px solid var(--trad); }
.message.err { display: block; background: #fbe9e7; border: 1px solid var(--danger); }

.legend { display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.85rem; color: var(--muted); }
.legend span::before {
  content: ""; display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%;
  margin-right: 0.3rem; vertical-align: -1px; background: var(--c);
}
.nav { font-size: 0.95rem; }

.cache-tip { font-family: var(--body); font-size: 0.85rem; }
.cache-tip strong { display: block; }

@media (max-width: 800px) {
  html, body { height: auto; }
  .map-layout { grid-template-columns: 1fr; height: auto; }
  #map { height: 60vh; }
  .panel { border-left: none; border-top: 1px solid var(--line); }
}

/* ---------- List pages (adopted, admin) ---------- */
.page { max-width: 60rem; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.page > header { margin-bottom: 1.25rem; }
.page > header p { margin: 0.35rem 0 0; color: var(--muted); }
.table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--head); font-size: 0.95rem; background: #f5f7f4; }
tr:last-child td { border-bottom: none; }
td.gc a { font-weight: 700; text-decoration: none; }
.bar { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; margin: 1rem 0; }
.login { max-width: 22rem; display: flex; flex-direction: column; gap: 0.75rem; }
[hidden] { display: none !important; }

/* ---------- Thank-you page ---------- */
.photo { height: 100%; overflow: hidden; background: var(--ground); }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.thanks h2 { margin: 0 0 0.9rem; }
@media (max-width: 800px) {
  .photo { height: auto; }
  .photo img { height: auto; }
}
