:root {
  color-scheme: light;
  --ink: #172b26;
  --muted: #51665d;
  --green: #133a31;
  --brand: #226046;
  --background: #f3f5ef;
  --paper: #fff;
  --line: #dce3d8;
  --soft: #e9f1e7;
  font: 100%/1.55 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--background);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
[hidden] { display: none !important; }
button, input, select { font: inherit; }
button, select, summary { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #c97728; outline-offset: 3px; }
p { margin: 0; color: var(--muted); }
h1, h2, h3 { margin: 0; letter-spacing: -.035em; line-height: 1.12; }
h1 { font-size: clamp(2rem, 5.2vw, 3.7rem); }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.1rem; }
.topbar { background: var(--green); color: white; }
.top-inner { max-width: 1240px; margin: auto; padding: .95rem 2rem; display: flex; align-items: center; gap: 1.25rem; }
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-size: 1.25rem; font-weight: 750; letter-spacing: -.025em; white-space: nowrap; }
.brand-icon { display: block; width: 2.375rem; height: 2.375rem; }
.top-caption { color: #c5d9ce; font-size: .875rem; }
.quiet { margin-inline-start: auto; color: white; border: 1px solid #78978a; border-radius: .5rem; padding: .4rem .8rem; background: transparent; }
main { width: min(100%, 1240px); padding: 2.5rem 2rem; margin: 0 auto; flex: 1; }
footer { text-align: center; color: var(--muted); padding: 1rem 1.25rem; border-top: 1px solid var(--line); font-size: .88rem; }
footer span { padding-inline: .3rem; }
.welcome { min-height: 505px; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: clamp(2rem, 7vw, 7rem); padding: clamp(1rem, 5vw, 4rem); background: linear-gradient(135deg, #e1eddf, #eff4e9 62%, #f9f4e4); border: 1px solid var(--line); border-radius: 1.35rem; }
.welcome h1 { font-size: clamp(3rem, 7.8vw, 6.5rem); letter-spacing: -.07em; color: var(--green); }
.welcome-copy > p:last-child { margin-top: 1.25rem; max-width: 31ch; font-size: 1.15rem; }
.eyebrow { font-size: .8rem; font-weight: 800; letter-spacing: .10em; color: var(--brand); margin-bottom: .65rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 .15rem .5rem #16372a08; }
.login { display: grid; gap: .65rem; padding: clamp(1.15rem, 3vw, 2rem); }
.login label { margin-top: .45rem; }
label { display: block; font-size: .9rem; font-weight: 700; }
input, select { color: var(--ink); background: white; border: 1px solid #9daf9f; border-radius: .55rem; min-height: 2.85rem; padding: .5rem .75rem; min-width: 0; }
input::placeholder { color: #596b61; }
.primary { background: var(--brand); color: white; border: 1px solid var(--brand); border-radius: .55rem; padding: .58rem 1rem; font-weight: 700; min-height: 2.85rem; margin-top: .6rem; }
.primary:hover { background: var(--green); }
.primary:disabled { opacity: .65; cursor: wait; }
.text-button { border: 0; color: var(--brand); background: transparent; font-weight: 700; padding: .5rem 0; text-decoration: underline; text-underline-offset: .22em; }
.login-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem 1rem; }
.status { color: #863219; }
#dashboard-status { margin-top: 1rem; padding: .8rem 1rem; }
.public-form { width: min(100%, 34rem); margin-inline: auto; }
.public-form > .text-button { margin-bottom: .65rem; }
.public-form h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.public-form .guide-card p { margin-top: .8rem; }
.status.success { color: var(--brand); }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.55rem; }
.page-heading p:last-child { margin-top: .35rem; }
.neighborhood-choice { min-width: 13rem; }
.neighborhood-choice select { width: 100%; margin-top: .25rem; appearance: none; padding-right: 2.35rem; }
.neighborhood-choice { position: relative; }
.neighborhood-choice::after { content: ''; pointer-events: none; position: absolute; right: 1rem; bottom: 1.15rem; width: .42rem; height: .42rem; border: solid var(--brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.tabs { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.2rem; }
.tabs button { padding: .7rem .2rem; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); font-weight: 700; }
.tabs button[aria-current='page'] { color: var(--green); border-color: var(--brand); }
.admin-filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: .8rem 0 1.1rem; }
.admin-filters button { padding: .55rem .8rem; border: 1px solid var(--line); border-radius: .5rem; background: white; color: var(--green); font-weight: 650; }
.admin-filters button[aria-pressed='true'] { border-color: var(--brand); background: var(--soft); }
.profile-editor { width: min(28rem, calc(100% - 2rem)); padding: 1.25rem; }
.profile-editor::backdrop { background: #10282082; }
.profile-editor form { display: grid; gap: .55rem; }
.profile-editor label { margin-top: .35rem; }
.profile-editor input[type='checkbox'] { min-height: auto; }
#edit-pin-details input { width: 100%; margin-block: .3rem; }
.profile-actions { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.request-actions, #request-form .profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
.secondary { border: 1px solid var(--line); border-radius: .55rem; padding: .55rem .8rem; color: var(--green); background: var(--soft); font-weight: 700; }
#request-form .primary { margin-top: 0; }
#notification-dialog p { margin-block: .7rem; }
.map-layout { display: grid; grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: start; gap: 1rem; }
main:has(#map-view:not([hidden])) { padding-top: clamp(1rem, 3svh, 1.65rem); }
#dashboard:has(#map-view:not([hidden])) .page-heading { margin-bottom: .65rem; }
#dashboard:has(#map-view:not([hidden])) .page-heading h1 { font-size: clamp(1.85rem, 4vw, 3.15rem); }
#dashboard:has(#map-view:not([hidden])) .tabs { margin-bottom: .85rem; }
.map-panel, .lot-detail, .directory, .guide-card, .neighborhood-notices { padding: 1.2rem; }
.neighborhood-notices { margin-bottom: 1rem; border-inline-start: .25rem solid var(--brand); }
.notice-card { padding-block: .85rem; overflow-wrap: anywhere; }
.notice-card + .notice-card { border-top: 1px solid var(--line); }
.notice-card time { font-size: .875rem; color: var(--muted); }
.notice-message { margin-top: .35rem; white-space: pre-wrap; color: var(--ink); }
#admin-notices { margin-bottom: 1rem; }
#notice-form { display: grid; gap: .45rem; max-width: 38rem; margin-block: .7rem; }
#notice-form textarea { font: inherit; color: var(--ink); border: 1px solid #9daf9f; border-radius: .55rem; padding: .5rem .75rem; resize: vertical; }
#notice-form button { justify-self: start; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.section-heading p { margin-top: .3rem; }
.map {
  position: relative;
  overflow: clip;
  border: 1px solid #dfe2d4;
  border-radius: .8rem;
  background-color: #f2f3e9;
  background-image: radial-gradient(#c2c9b78a .75px, transparent .75px);
  background-size: 16px 16px;
  height: clamp(16rem, calc(100svh - 30rem), 32rem);
}
.map canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: pointer; }
.map canvas.map-zoomed { cursor: grab; }
.map canvas.map-dragging { cursor: grabbing; }
.map canvas:focus-visible { outline-offset: -4px; border-radius: inherit; }
.map-lots { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .55rem; }
.map-lots:not(:empty):has(+ .map:not([hidden])) { margin-bottom: .7rem; }
.map-lots select { flex: 1; min-width: min(100%, 11rem); max-width: 23rem; }
.map-zoom { display: flex; gap: .28rem; }
.zoom { color: var(--green); font-weight: 700; background: #f5f7f2; border: 1px solid var(--line); border-radius: .55rem; min-width: 2.85rem; min-height: 2.85rem; }
.zoom:nth-child(-n+2) { font-size: 1.3rem; line-height: 1; }
.zoom:last-child { padding-inline: .7rem; font-size: .875rem; }
.zoom:hover:not(:disabled) { background: var(--soft); border-color: #8da99a; }
.zoom:disabled { opacity: .55; cursor: default; }
.map-legend { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: .7rem 0 0; padding: 0; list-style: none; color: var(--muted); font-size: .875rem; }
.map-legend li { display: flex; align-items: center; gap: .35rem; }
.map-legend li::before { content: ''; width: .68rem; height: .68rem; border-radius: .22rem; border: 1px solid #6d9aaf; background: #c7e1ec; }
.map-legend li:nth-child(2)::before { border-color: #a293b7; background: #e3d9ef; }
.map-legend li:nth-child(3)::before { border-color: #bb9274; background: #f1d5bc; }
.lot-detail h2 { margin-bottom: .3rem; }
.lot-detail h3 { margin: 1.1rem 0 .55rem; }
.units { display: grid; gap: .5rem; padding: 0; margin: 0; list-style: none; }
.units li { background: #f3f6f1; border: 1px solid var(--line); border-radius: .6rem; padding: .65rem .75rem; }
.units span { display: block; color: var(--muted); }
.directory input { width: min(100%, 28rem); margin-bottom: 1rem; }
.directory-group { margin-top: 1rem; }
.directory-group + .directory-group { border-top: 1px solid var(--line); padding-top: 1rem; }
.result-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .25rem 1rem; padding: .6rem 0; }
.result-row button { font-size: .9rem; }
.guide-heading { max-width: 43rem; margin: 1rem 0 1.5rem; }
.guide-heading p:last-child { margin-top: .55rem; }
.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.guide-card ol { padding-left: 1.4rem; }
.guide-card li + li { margin-top: .7rem; }
.store-links { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: .55rem; }
.store-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: .5rem; color: var(--green); background: var(--soft); font-size: .9rem; font-weight: 700; text-decoration: none; }
.store-links a:hover { border-color: var(--brand); text-decoration: underline; text-underline-offset: .2em; }
.signals { margin-bottom: 0; display: grid; gap: .55rem; }
.signals div { border-left: .25rem solid; border-radius: .35rem; padding: .45rem .65rem; background: #f5f7f5; }
.signals .red { border-color: #b83043; }
.signals .blue { border-color: #3155a4; }
.signals .green { border-color: #226046; }
.signals dt { font-weight: 750; }
.signals dd { margin: 0; color: var(--muted); }
.faq { margin-top: 1rem; }
.faq h2 { margin-bottom: .55rem; }
details { border-bottom: 1px solid var(--line); padding: .75rem 0; }
details:last-child { border: 0; }
summary { font-weight: 650; }
details p { margin-top: .45rem; }
.guide-source { margin-top: .85rem; font-size: .875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 730px) {
  main { padding: 1.3rem .9rem; }
  .top-inner { padding: .8rem .9rem; }
  .top-caption { display: none; }
  .welcome, .guide-grid, .map-layout { grid-template-columns: 1fr; }
  .welcome { align-items: start; gap: 1.6rem; padding: 1.3rem .85rem .85rem; }
  .welcome-copy { padding-inline: .35rem; }
  .page-heading { align-items: stretch; flex-direction: column; }
  .map-panel, .lot-detail, .directory, .guide-card { padding: .9rem; }
  main:has(#map-view:not([hidden])) { padding-top: 1rem; }
  #dashboard:has(#map-view:not([hidden])) .page-heading { gap: .65rem; }
  #dashboard:has(#map-view:not([hidden])) .page-heading .eyebrow { margin-bottom: .35rem; }
  #dashboard:has(#map-view:not([hidden])) .neighborhood-choice { display: flex; align-items: center; gap: .65rem; }
  #dashboard:has(#map-view:not([hidden])) .neighborhood-choice select { margin: 0; }
  .map-panel .section-heading p { font-size: .9rem; }
  .map { height: clamp(17rem, calc(100svh - 29.5rem), 29rem); }
}
@media (min-width: 350px) and (max-width: 500px) {
  .map-lots { gap: .4rem; }
  .map-lots select { min-width: 0; max-width: none; font-size: .875rem; padding-inline: .55rem; }
  .zoom { min-width: 2.75rem; }
  .zoom:last-child { padding-inline: .45rem; }
}
