:root {
  /* Genesee logo green is #69813b; these darker shades keep white text readable (contrast ≥ 7:1). */
  --brand: #69813b;
  --green: #4d5f2a;
  --green-dark: #3a4820;
  --green-light: #eef2e3;
  --ink: #1d2327;
  --muted: #5b6770;
  --line: #d6dde1;
  --bg: #f6f7f5;
  --card: #ffffff;
  --red: #a32a2a;
  --red-light: #fbeaea;
  --amber: #8a5a00;
  --amber-light: #fff4dc;
  --blue: #1f5f99;
  --radius: 8px;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); line-height: 1.5; }
a { color: var(--green); }
h1 { font-size: 1.6rem; margin: 0 0 .75rem; }
h2 { font-size: 1.2rem; margin: 1.5rem 0 .5rem; }
.site-header { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; padding: .6rem 1rem; background: #fff; border-bottom: 4px solid var(--brand); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; display: block; }
.brand span { font-weight: 600; font-size: .95rem; color: var(--green); border-left: 1px solid var(--line); padding-left: .75rem; line-height: 1.2; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem; }
.site-nav a { color: var(--green); text-decoration: none; font-weight: 600; padding: .35rem .7rem; border-radius: 999px; }
.site-nav a.active, .site-nav a:hover { background: var(--green-light); }
.signout { margin-left: auto; display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: var(--muted); }
.link-button { background: none; border: 1px solid var(--green); color: var(--green); border-radius: 999px; padding: .2rem .7rem; cursor: pointer; font: inherit; }
.page { max-width: 1100px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 1.5rem 1rem; }
.lead { color: var(--muted); max-width: 60ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.flash { border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.flash-success { background: var(--green-light); border: 1px solid #b9d3c8; }
.flash-error { background: var(--red-light); border: 1px solid #e3b4b4; color: var(--red); }
.form { max-width: 720px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 1rem 1.25rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .25rem; }
.field { margin-bottom: .9rem; }
.field label { display: block; font-weight: 600; margin-bottom: .25rem; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 1rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input:not([type]), select, textarea {
  width: 100%; padding: .55rem .65rem; border: 1px solid #b8c2c8; border-radius: 6px; font: inherit; background: #fff;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid #9cc3b5; border-color: var(--green); }
.req { color: var(--red); }
.hint { color: var(--muted); font-size: .85rem; margin: .25rem 0 0; }
.field-error { color: var(--red); font-size: .9rem; margin: .25rem 0 0; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.type-intro, .category-intro, .liability {
  background: var(--green-light);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  margin: 0 0 1rem;
  font-size: .95rem;
}
.type-intro p, .category-intro p, .liability p { margin: 0 0 .5rem; }
.type-intro p:last-child, .category-intro p:last-child, .liability p:last-child { margin-bottom: 0; }
.choices { display: flex; flex-direction: column; gap: .4rem; }
.choices label { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
.checkbox-label { display: flex; align-items: center; gap: .4rem; font-weight: 400; }
@media (min-width: 640px) {
  .choices { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem 1rem; }
}
.other-text { margin-top: .5rem; }
.details { color: var(--muted); font-size: .85rem; margin: .25rem 0 .6rem; padding-left: 1.2rem; }
.muted { color: var(--muted); }
/* The import review page has up to seven columns; it takes the full window
   width, and its reason column never squeezes below a readable width — the
   table scrolls sideways on a small screen instead. */
.page.page-wide { max-width: none; }
.review-table th.why, .review-table td.why { min-width: 20rem; }
.review-table td { font-size: .95rem; line-height: 1.4; }
td details summary { cursor: pointer; color: var(--green); margin-top: .3rem; }
td details form { display: grid; gap: .35rem; margin-top: .4rem; min-width: 14rem; }
td details label { display: grid; gap: .15rem; font-size: .85rem; }
button, .button { display: inline-block; background: var(--green); color: #fff; border: 0; border-radius: 6px; padding: .6rem 1.1rem; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: var(--green-dark); }
.button.secondary, button.secondary { background: #fff; color: var(--green); border: 1px solid var(--green); }
button.danger { background: var(--red); }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; background: #eef1f3; color: var(--muted); margin: 0 .25rem .25rem 0; white-space: nowrap; }
.badge-new { background: #e3eefa; color: var(--blue); }
.badge-warn { background: var(--amber-light); color: var(--amber); }
.badge-danger { background: var(--red-light); color: var(--red); }
.badge-ok { background: var(--green-light); color: var(--green-dark); }
.badge-overdue { background: var(--red); color: #fff; }
.reminder-failed { color: var(--red); }
.reminder-skipped { color: var(--muted); }
.inline-form { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-bottom: .5rem; }
.inline-form input, .inline-form select { width: auto; padding: .3rem .4rem; }
.inline-form button { padding: .3rem .7rem; font-size: .85rem; }
.row-actions summary { cursor: pointer; color: var(--green); font-weight: 600; font-size: .85rem; }
.row-actions[open] summary { margin-bottom: .5rem; }
@media (max-width: 480px) {
  .inline-form { flex-direction: column; align-items: stretch; }
  .inline-form input, .inline-form select { width: 100%; }
}
.danger-zone { border-color: #e3b4b4; margin-top: 2rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: end; margin-bottom: 1rem; }
.filters label { font-size: .85rem; font-weight: 600; }
.filters select { width: auto; min-width: 10rem; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1rem; margin: 0; }
.facts dt { font-weight: 600; color: var(--muted); }
.facts dd { margin: 0; }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
.notes { list-style: none; padding: 0; margin: 0 0 1rem; }
.notes li { border-left: 3px solid var(--line); padding: .25rem .75rem; margin-bottom: .75rem; }
.notes .meta { color: var(--muted); font-size: .85rem; }
.notes .body { white-space: pre-wrap; }
.note-row td { background: var(--green-light); border-left: 3px solid var(--brand); }
.note-row .body { white-space: pre-line; }
.note-row .meta { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.legend { display: flex; flex-wrap: wrap; gap: 1rem; margin: .5rem 0 1rem; font-size: .9rem; }
.legend .dot { display: inline-block; width: .8rem; height: .8rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
#map { height: 70vh; min-height: 360px; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 760px) {
  .two-col { grid-template-columns: 1fr; }
  .signout { margin-left: 0; width: 100%; justify-content: space-between; }
  h1 { font-size: 1.35rem; }
}
@media print {
  .site-header, .site-footer, .no-print, form, .flash { display: none !important; }
  body { background: #fff; }
  .page { max-width: none; padding: 0; }
  .table-wrap { border: 0; }
  th, td { padding: .25rem .4rem; }
}
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Directory: search, street list, household cards -- phone-first, tap
   targets at least 44px tall, nothing that forces sideways scroll at 375px. */
.search-form { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.search-form input[type=search] { flex: 1 1 200px; min-width: 0; }
.street-list, .result-list, .people-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.street-list li, .result-list li, .people-list li {
  padding: .7rem 0; border-bottom: 1px solid var(--line); min-height: 44px;
  display: flex; align-items: center; flex-wrap: wrap; gap: .3rem .5rem;
}
.street-list li:last-child, .result-list li:last-child, .people-list li:last-child { border-bottom: 0; }
.street-list a, .result-list > li > a { font-weight: 600; }
.household-card { overflow-wrap: anywhere; }
.household-card h2 { margin-top: 0; }
.contact-list { list-style: none; padding: 0; margin: .2rem 0 0; }
.contact-list li { padding: .15rem 0; }
.contact-list a { display: inline-block; padding: .2rem 0; }

/* Claim page: home-picker.js enhances the plain <select> with a
   type-to-search text input. Once JS has built the datalist, the select
   itself is no longer needed on screen -- it stays in the DOM (and keeps
   its value in sync) purely as the field the form submits. */
.home-select-enhanced { display: none; }
/* The Foundation office: pinned card on /directory, and /office itself. */
.office-card, .office-details { overflow-wrap: anywhere; }
.office-card-name { margin: 0 0 .35rem; font-size: 1.1rem; }
.office-card-lines, .office-card-more { margin: 0 0 .35rem; }
.office-card-more { margin-bottom: 0; }
.office-phone a { font-size: 1.25rem; font-weight: 600; }
.office-staff li { display: block; overflow-wrap: anywhere; }
