:root {
  --ink: #14243a;
  --ink-2: #33445c;
  --muted: #5b6676;
  --line: #dfe3ea;
  --paper: #ffffff;
  --bg: #f5f3ef;
  --accent: #c84605;
  --accent-ink: #ffffff;
  --accent-soft: #fbe9df;
  --ok: #17703c;
  --ok-soft: #e3f3e8;
  --warn: #8a5a00;
  --warn-soft: #fdf1d8;
  --bad: #a3221b;
  --bad-soft: #fbe5e3;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 36, 58, .06), 0 4px 16px rgba(20, 36, 58, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 16px/1.5 var(--font); color: var(--ink); background: var(--bg); }
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3vw, 1.9rem); letter-spacing: -.01em; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid #1a73e8; outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 1000; }
.skip:focus { left: 8px; top: 8px; }

.wrap { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.topbar { background: var(--ink); color: #fff; }
.topbar .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; }
.topbar nav { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.topbar nav a, .topbar nav button { color: #fff; text-decoration: none; padding: 8px 12px; border-radius: 8px; background: none; border: 0; font: inherit; cursor: pointer; }
.topbar nav a:hover, .topbar nav button:hover, .topbar nav a[aria-current="page"] { background: rgba(255, 255, 255, .12); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--paper); color: var(--ink); font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none; }
.btn:hover { background: #eef1f5; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #a93a03; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.ghost { border-color: var(--line); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #eef1f5; color: var(--ink-2); margin: 0 4px 4px 0; }
.tag.accent { background: var(--accent-soft); color: #8c3203; }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.bad { background: var(--bad-soft); color: var(--bad); }

label { display: block; font-weight: 600; font-size: 14px; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #c3cad5; border-radius: 10px; font: 16px var(--font); color: var(--ink); background: #fff; }
textarea { min-height: 80px; resize: vertical; }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips label { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; background: #fff; margin: 0; min-height: 36px; }
.chips input { width: 16px; height: 16px; margin: 0; }
.chips label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.error { color: var(--bad); font-weight: 600; }
.notice { padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: #5c3c00; }
.notice.ok { background: var(--ok-soft); color: #0f4d2a; }

table.data { width: 100%; border-collapse: collapse; font-size: 14.5px; }
table.data th, table.data td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

.map { width: 100%; height: 420px; border-radius: var(--radius); border: 1px solid var(--line); background: #e8ecf1; }
.leaflet-container { font: 14px var(--font); }
.pin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }
.pin.t-new_building { background: #c84605; } .pin.t-addition_alteration { background: #1d5fbf; } .pin.t-demolition { background: #7a1f9e; }
.pin.t-mechanical { background: #0d7f73; } .pin.t-outdoor { background: #3d7a12; } .pin.t-salvage_abatement { background: #7a5a12; }
.pin.t-temporary, .pin.t-other { background: #5b6676; } .pin.here { background: #14243a; width: 18px; height: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .pin { width: 11px; height: 11px; }

.permit { padding: 14px 0; border-bottom: 1px solid var(--line); }
.permit:last-child { border-bottom: 0; }
.permit h3 { font-size: 1rem; margin: 0 0 4px; }
.permit .meta { font-size: 14px; color: var(--muted); }
.permit .desc { font-size: 14.5px; margin: 6px 0; color: var(--ink-2); }

.grid-2 > *, .grid-3 > *, .hero-grid > *, .layout > * { min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
footer.site { padding: 36px 0 50px; color: var(--muted); font-size: 14px; }
footer.site a { color: var(--ink-2); }
dialog { border: 0; border-radius: var(--radius); padding: 0; max-width: min(560px, 94vw); width: 100%; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(10, 20, 35, .5); }
dialog .card { box-shadow: none; border: 0; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
