:root {
  --bg: #f7f7f5;
  --surface: #ffffff;
  --text: #1d1f21;
  --muted: #5f6368;
  --border: #e1e1dc;
  --accent: #1f6feb;
  --accent-text: #ffffff;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --type-trash: #c2410c;
  --type-overgrowth: #15803d;
  --type-dumping: #b91c1c;
  --type-abandoned: #6d28d9;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15171a;
    --surface: #1e2125;
    --text: #e8e8e6;
    --muted: #a0a4a8;
    --border: #33373c;
    --accent: #5b9bff;
    --accent-text: #0b1220;
    --ok: #4ade80;
    --warn: #fbbf24;
    --danger: #f87171;
    --type-trash: #fb923c;
    --type-overgrowth: #4ade80;
    --type-dumping: #f87171;
    --type-abandoned: #a78bfa;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 520px; }

.nav {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  /* Top and bottom only: .wrap supplies the side gutters. */
  padding-top: 14px; padding-bottom: 14px;
}
.brand { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand img { width: 26px; height: 26px; }
.nav .links { margin-left: auto; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav .links a { color: var(--text); text-decoration: none; font-size: 15px; }
.nav .links a:hover { color: var(--accent); }

.btn {
  display: inline-block; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-text);
  padding: 10px 18px; border-radius: 8px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn.secondary { background: transparent; color: var(--accent); }
.btn.small { padding: 5px 10px; font-size: 14px; font-weight: 500; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .6; cursor: default; }
.nav .links a.btn { color: var(--accent-text); }

h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.15; margin: 32px 0 12px; letter-spacing: -.01em; }
h2 { font-size: clamp(22px, 3.2vw, 28px); margin: 0 0 12px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

section { padding: 36px 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.stat { font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); font-size: 15px; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.dot.TRASH_JUNK { background: var(--type-trash); }
.dot.OVERGROWTH { background: var(--type-overgrowth); }
.dot.DUMPING { background: var(--type-dumping); }
.dot.ABANDONED { background: var(--type-abandoned); }

form .field { display: grid; gap: 6px; margin: 0 0 16px; }
label { font-weight: 600; font-size: 15px; }
input[type=text], input[type=email], input[type=number], select {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; width: 100%;
}
input:focus, select:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 5px; }
.hint { font-size: 14px; color: var(--muted); font-weight: 400; }
.error { color: var(--danger); font-size: 15px; min-height: 1.2em; }
.notice { border-left: 3px solid var(--warn); padding: 8px 12px; background: var(--surface); border-radius: 6px; }

.sample { width: 100%; border-collapse: collapse; font-size: 15px; }
.sample th, .sample td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); }
.sample th { color: var(--muted); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; }

details { border-bottom: 1px solid var(--border); padding: 12px 0; }
summary { cursor: pointer; font-weight: 600; }

footer.site { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 24px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--muted); }

.prose { max-width: 760px; }
.prose h2 { margin-top: 28px; font-size: 22px; }
.draft { border: 1px dashed var(--warn); color: var(--warn); padding: 8px 12px; border-radius: 6px; font-size: 14px; }

@media (max-width: 640px) {
  .nav .links { margin-left: 0; width: 100%; }
  /* Keep the sample table inside a phone screen: drop the date column, tighten cells. */
  .sample { font-size: 14px; }
  .sample th, .sample td { padding: 6px 4px; }
  .sample th:nth-child(4), .sample td:nth-child(4) { display: none; }
  section { padding: 24px 0; }
}
