/* Site shell, home, map, status list, and staff view. Loaded after styles.css. */

/* Header: staff link */
.brand { text-decoration: none; }
.jurisdiction { margin-left: auto; }
.staff-link {
  min-height: 44px; display: inline-flex; align-items: center; padding: 0 18px;
  border: 2px solid var(--green); border-radius: 999px; color: var(--green); font-weight: 600; text-decoration: none;
}
.staff-link:hover { background: var(--green-tint); }
.staff-link[aria-current="page"] { background: var(--green); color: #fff; }

/* Tab bar: bottom on phones, row under the header on desktop */
body { padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--surface); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600;
}
.tabbar svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.tabbar a[aria-current="page"] { color: var(--green); box-shadow: inset 0 3px 0 var(--yellow); }
@media (min-width: 900px) {
  body { padding-bottom: 0; }
  .tabbar { position: sticky; top: 0; bottom: auto; display: flex; justify-content: center; gap: 8px; border-top: 0; border-bottom: 1px solid var(--border); }
  .tabbar a { flex-direction: row; min-height: 50px; padding: 0 20px; font-size: 15px; gap: 8px; }
  .tabbar a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--yellow); }
  .tabbar svg { width: 20px; height: 20px; }
}
@media (max-width: 559px) {
  .jurisdiction { order: 3; margin-left: 0; }
  .staff-link { margin-left: auto; }
}

/* Home */
.hero {
  background: var(--green); color: #fff; border-radius: 12px; padding: 32px 28px; margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.hero h1 { color: #fff; }
.hero p { max-width: 36em; font-size: 17px; line-height: 1.55; }
.hero .eyebrow.on-dark { color: var(--sage); }
.hero::after {
  content: ""; position: absolute; right: -40px; top: 0; bottom: 0; width: 120px;
  background: var(--text); transform: skewX(-12deg); box-shadow: inset 4px 0 0 #fff;
}
.hero::before {
  content: ""; position: absolute; right: 18px; top: 0; bottom: 0; width: 4px; z-index: 1;
  background: repeating-linear-gradient(var(--yellow) 0 14px, transparent 14px 26px); transform: skewX(-12deg);
}
.hero > * { position: relative; z-index: 2; max-width: calc(100% - 80px); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.btn-yellow { background: var(--yellow); color: var(--text); }
.btn-yellow:hover { background: #E3A71E; }
.btn-ghost { background: transparent; color: #fff; border: 2px solid #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); }
@media (max-width: 559px) {
  .hero::before, .hero::after { display: none; }
  .hero > * { max-width: none; }
  .hero { border-bottom: 6px solid var(--yellow); padding: 26px 20px; }
}
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); margin-bottom: 16px; }
.pad { padding: 22px 24px; margin-bottom: 16px; }
.grid-2 .pad, .grid-2 .how { margin-bottom: 0; }
.card-h { font: 700 22px var(--head); color: var(--green); margin: 0 0 12px; }
.card-h.big { font-size: 26px; }
.covers { list-style: none; padding: 0; margin: 0; }
.covers li { padding: 9px 0 9px 28px; position: relative; border-bottom: 1px solid var(--row-line); }
.covers li:last-child { border-bottom: 0; }
.covers li::before { content: ""; position: absolute; left: 4px; top: 19px; width: 12px; height: 4px; background: var(--yellow); border-radius: 2px; }
dl.facts { display: grid; grid-template-columns: auto 1fr; gap: 8px 18px; margin: 0 0 16px; }
dl.facts dt { font-weight: 600; color: var(--muted); }
dl.facts dd { margin: 0; }
.pad dl.facts:last-child, .costs dl.facts { margin-bottom: 0; }
.costs { padding: 20px 22px; margin-top: 8px; border-top: 5px solid var(--yellow); }
@media (max-width: 559px) {
  dl.facts { grid-template-columns: 1fr; gap: 2px; }
  dl.facts dd { margin-bottom: 10px; }
}

/* Map */
.map-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.map-svg { display: block; width: 100%; height: auto; }
.map-svg .water { fill: #BFD8E6; }
.map-svg .parcel { fill: none; stroke: #CBD8D1; stroke-width: 1; }
.map-svg .road-hit { fill: none; stroke: transparent; stroke-width: 26; }
.map-svg .road-edge { fill: none; stroke: #fff; stroke-width: 11; stroke-linecap: round; pointer-events: none; }
.map-svg .road-line { fill: none; stroke-width: 7; stroke-linecap: round; pointer-events: none; }
.map-svg .road-line.good { stroke: var(--green); }
.map-svg .road-line.fair { stroke: #8A6A12; }
.map-svg .road-line.poor { stroke: var(--red); }
.map-svg .road-center { fill: none; stroke: var(--yellow); stroke-width: 1.4; stroke-dasharray: 5 5; pointer-events: none; }
.map-svg g.road { cursor: pointer; }
.map-svg g.road:focus { outline: none; }
.map-svg g.road:focus .road-edge, .map-svg g.road.selected .road-edge { stroke: var(--yellow); stroke-width: 15; }
.map-svg .label { font: 600 11px var(--body); fill: var(--text); paint-order: stroke; stroke: #E9F0EC; stroke-width: 3px; pointer-events: none; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px; border-top: 1px solid var(--border); font-size: 14px; align-items: center; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 22px; height: 6px; border-radius: 3px; display: inline-block; }
.swatch.good { background: var(--green); }
.swatch.fair { background: #8A6A12; }
.swatch.poor { background: var(--red); }
.map-layout { display: grid; gap: 16px; }
@media (min-width: 900px) { .map-layout { grid-template-columns: 3fr 2fr; align-items: start; } }
.road-list { list-style: none; padding: 0; margin: 0; }
.road-list button {
  width: 100%; min-height: 56px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  background: none; border: 0; border-bottom: 1px solid var(--row-line); padding: 8px 6px; text-align: left; cursor: pointer;
}
.road-list li:last-child button { border-bottom: 0; }
.road-list button:hover { background: var(--bg); }
.road-list button[aria-pressed="true"] { background: var(--green-tint); }
.road-list .sub { display: block; font-size: 13px; color: var(--muted); }
.mini-h { font-weight: 600; margin: 0 0 8px; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; border: 1px solid transparent;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge.good, .badge.district, .badge.approved { background: var(--green-tint); color: var(--green); }
.badge.fair, .badge.board, .badge.inprogress, .badge.tabled { background: var(--amber-tint); color: var(--amber-text); }
.badge.poor, .badge.denied { background: var(--red-tint); color: var(--red); }
.badge.auditor, .badge.none { background: var(--bg); color: var(--text); border-color: var(--border); }

/* Petition lists (status, map, staff) */
.req-list { list-style: none; padding: 0; margin: 0 0 16px; }
.req-list button {
  width: 100%; display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; text-align: left;
  padding: 14px 16px; min-height: 64px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px; cursor: pointer;
}
.req-list button:hover { border-color: var(--green); }
.req-list .id { font: 700 17px var(--head); color: var(--green); letter-spacing: .02em; }
.req-list .meta { grid-column: 1 / -1; font-size: 14px; color: var(--muted); }
.pad .req-list:last-child { margin-bottom: 0; }
.lookup-row { display: flex; gap: 10px; flex-wrap: wrap; }
.lookup-row input { flex: 1 1 200px; }
main > .backbtn { margin: -8px 0 8px -4px; }

/* Staff */
.filters { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.chip {
  min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border-input); background: var(--surface);
  font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: #fff; }
.chip .count { font-weight: 400; }
.staff-note { background: var(--green-tint); border-radius: 8px; padding: 10px 14px; font-size: 14px; }
.staff-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; }
.staff-grid .summary { margin-bottom: 16px; }
.staff-grid .outcomes { grid-template-columns: 1fr; margin-bottom: 16px; }
select {
  width: 100%; min-height: 46px; padding: 10px 12px; font: 15px var(--body); color: var(--text);
  background: var(--surface); border: 1px solid var(--border-input); border-radius: 8px; margin-bottom: 16px;
}
select:focus { outline: 3px solid var(--yellow); border-color: var(--green); }
.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 84px; z-index: 30;
  background: var(--text); color: #fff; padding: 12px 20px; border-radius: 10px; border-left: 5px solid var(--yellow);
}
@media (min-width: 900px) { .toast { bottom: 24px; } }

/* Home: contacts */
.contacts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.contact { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.contact p { margin: 0; }
.contact-head { background: var(--green); padding: 12px 18px; border-bottom: 4px solid var(--yellow); }
.contact-dept { font: 700 19px var(--head); color: #fff; }
.contact-topic { font-size: 14px; color: var(--sage); }
.contact-body { display: grid; grid-template-columns: 80px 1fr; gap: 0 16px; align-items: start; padding: 18px; }
.avatar { grid-row: span 2; width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--green-tint); }
.contact-name, .contact-links { grid-column: 2; min-width: 0; }
@media (max-width: 559px) {
  .contact-body { grid-template-columns: 64px 1fr; align-items: center; }
  .avatar { grid-row: auto; width: 64px; height: 64px; }
  .contact-links { grid-column: 1 / -1; margin-top: 8px !important; }
}
.contact-name { font: 700 20px var(--head); color: var(--text); }
.contact-name span { display: block; font: 400 14px var(--body); color: var(--muted); margin-bottom: 4px; }
.contact-links { display: flex; flex-direction: column; }
.contact-links a {
  color: var(--green); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; overflow-wrap: anywhere;
}
.contact-links a:hover { text-decoration: underline; }
.contact-links svg { flex: 0 0 18px; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
