:root {
  --navy: #002D72;
  --navy-deep: #001F54;
  --navy-soft: #E4EAF5;
  --green: #5EBA46;
  --green-deep: #3E9A2C;
  --green-soft: #E4F5DF;
  --teal: #00A3AD;
  --teal-deep: #007A82;
  --teal-soft: #D6F1F3;
  --paper: #F6F3EC;
  --paper-deep: #EBE6DA;
  --surface: #FFFDF8;
  --ink: #1A1C22;
  --ink-soft: #2A2E38;
  --muted: #5C6170;
  --line: #DDD6C8;
  --amber: #8a5a1f;
  --amber-soft: #f3e6cf;
  --ok: #2F7A24;
  --danger: #7a2d12;
  --danger-soft: #f3d4c6;
  --shadow: 0 1px 2px rgba(26, 28, 34, 0.05), 0 12px 28px rgba(0, 45, 114, 0.07);
  --shadow-hover: 0 2px 6px rgba(26, 28, 34, 0.06), 0 16px 36px rgba(0, 45, 114, 0.1);
  --radius: 14px;
  --radius-lg: 20px;
  --header-h: 124px;
  --font-display: "Outfit", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 8% -12%, rgba(0, 45, 114, 0.08), transparent 55%),
    radial-gradient(900px 380px at 92% 0%, rgba(94, 186, 70, 0.08), transparent 50%),
    var(--paper);
  min-height: 100vh;
  line-height: 1.55;
  font-size: 1.02rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal-deep); }
a:hover { color: var(--navy); }
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.22;
  color: var(--ink);
}
h1 { font-size: clamp(1.7rem, 2.6vw, 2.15rem); margin: 0 0 0.35rem; }
h2 { font-size: 1.22rem; margin: 1.4rem 0 0.5rem; }
h3 { font-size: 1.08rem; margin: 0; }
p { margin: 0 0 0.85rem; }
button, input, select, textarea { font: inherit; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
}
.skip-link:focus {
  left: 14px;
  top: 14px;
  z-index: 40;
  background: var(--surface);
  color: var(--ink);
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-header {
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}
.type-nav { border-top: 1px solid var(--line); background: rgba(255, 253, 248, 0.96); }
.type-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.1rem;
  display: flex;
  gap: 0.15rem;
  overflow-x: auto;
}
.type-link {
  flex: none;
  padding: 0.72rem 0.8rem 0.7rem;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.type-link:hover { color: var(--navy); }
.type-link.is-active {
  color: var(--navy);
  border-bottom-color: var(--green);
}
.brand {
  display: flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand-logo {
  display: block;
  height: 32px;
  width: auto;
}
.nav { display: flex; align-items: center; gap: 1.05rem; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.96rem;
}
.nav a:hover { color: var(--navy); }
.nav-user { color: var(--muted); font-size: 0.92rem; }
.inline-form { display: inline; }

.btn, button.btn {
  appearance: none;
  border: 0;
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.68rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  line-height: 1.2;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset;
}
.btn:hover { background: var(--navy-deep); color: #fff; }
.btn-secondary {
  background: transparent;
  color: var(--navy);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-secondary:hover {
  background: var(--navy-soft);
  color: var(--navy);
  border-color: #b8c4db;
}
.btn-small { padding: 0.42rem 0.85rem; font-size: 0.9rem; }
.text-btn {
  background: none;
  border: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.16em;
  padding: 0;
}

.flash {
  max-width: 1280px;
  margin: 0.9rem auto 0;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  width: calc(100% - 2.4rem);
  font-weight: 600;
}
.flash-success { background: var(--green-soft); color: var(--ok); }
.flash-error { background: var(--danger-soft); color: var(--danger); }
.flash-info { background: var(--paper-deep); color: var(--ink); }

.lede, .help, .meta { color: var(--muted); }
.lede { margin-top: 0; max-width: 42rem; font-size: 1.05rem; }
.help { font-size: 0.92rem; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 0.4rem;
}

.page-directory {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.page-directory #main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.directory {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.directory-masthead {
  padding: 0.85rem 1.4rem;
  max-width: none;
  width: 100%;
  margin: 0;
  flex: none;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
}
.directory-masthead-copy h1 { margin-bottom: 0; }
.directory-search {
  margin-top: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1fr);
  gap: 0.65rem;
  max-width: 640px;
  align-items: end;
  flex: 1;
  justify-content: end;
}
.directory-search .field { margin: 0; }
.ask { display: grid; gap: 0.45rem; width: 100%; }
.ask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
  align-items: end;
}
.ask-log:empty { display: none; }
.ask-log {
  display: grid;
  gap: 0.28rem;
  max-height: 4.8rem;
  overflow: auto;
  padding: 0.45rem 0.15rem 0;
}
.ask-you, .ask-bot {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
}
.ask-you { color: var(--muted); }
.ask-you::before { content: "You · "; font-weight: 750; color: var(--ink-soft); }
.ask-bot { color: var(--navy); font-weight: 600; }
.ask-bot::before { content: "CareStream · "; font-weight: 750; }
.directory-workspace {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.35);
}

.filters {
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 1.35rem 1.3rem 2rem;
  overflow: auto;
}
.filters > summary {
  display: none;
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.filters > summary::-webkit-details-marker { display: none; }
.filter-form { display: grid; gap: 0.85rem; }
.filter-form .field { font-size: 0.9rem; }
.field { display: grid; gap: 0.38rem; font-weight: 650; }
.field > span { color: var(--ink-soft); font-size: 0.9rem; letter-spacing: 0.01em; }
.field input, .field select, .field textarea {
  font-weight: 500;
  color: var(--ink);
  border: 1.5px solid #cfc6b6;
  background: #fff;
  border-radius: 11px;
  padding: 0.7rem 0.8rem;
  width: 100%;
  min-height: 2.7rem;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%232d2924' d='M1 1.5 6 6.5 11 1.5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.3rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(0, 163, 173, 0.38);
  outline-offset: 1px;
  border-color: var(--teal);
}
.field textarea { resize: vertical; min-height: 8rem; }
.filter-actions { display: flex; align-items: center; gap: 0.9rem; margin-top: 0.2rem; }

.directory-results { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.results-toolbar {
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.88);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  flex: none;
}
.results-toolbar p { margin: 0; }
.results-count { font-size: 0.98rem; }
.active-filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.split {
  display: grid;
  grid-template-columns: minmax(460px, 1.7fr) minmax(260px, 0.55fr);
  flex: 1;
  min-height: 0;
}
.page-events .split {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 1fr);
}
.home-list {
  overflow: auto;
  padding: 1.05rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
}
.home-card {
  display: grid;
  grid-template-columns: 228px 1fr;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  min-height: 188px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.home-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
  border-color: #c9c0ae;
  color: inherit;
}
.home-card.is-active {
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(94, 186, 70, 0.28), var(--shadow);
}
.card-photo, .photo-fallback {
  position: relative;
  min-height: 188px;
  background:
    linear-gradient(180deg, rgba(27, 25, 22, 0.04), rgba(27, 25, 22, 0.12)),
    var(--paper-deep);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 188px;
  transition: transform 0.45s ease;
}
.home-card:hover .card-photo img { transform: scale(1.04); }
.photo-fallback {
  display: grid;
  place-items: center;
  color: var(--muted);
  font-weight: 650;
  height: 100%;
  font-size: 0.88rem;
}
.photo-badge {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 1;
}
.card-body { padding: 1rem 1.1rem 1.05rem; display: grid; align-content: start; gap: 0.15rem; }
.card-body h2, .card-body h3 { margin: 0 0 0.15rem; font-size: 1.2rem; }
.card-kicker { margin: 0 0 0.28rem; font-size: 0.9rem; color: var(--muted); font-weight: 600; }
.card-address {
  margin: 0;
  font-size: 0.94rem;
  color: var(--ink-soft);
  font-style: normal;
  line-height: 1.4;
}
.card-desc {
  margin: 0.45rem 0 0;
  font-size: 0.93rem;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body .chips { margin-top: 0.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.chip {
  background: var(--green-soft);
  color: var(--navy);
  border-radius: 999px;
  padding: 0.22rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 750;
  letter-spacing: 0.01em;
  border: 1px solid #8ec97a;
}
.chip-warn { background: #f0d7b0; color: #6b4312; border-color: #e0bf88; }
.chip-muted { background: var(--paper-deep); color: var(--ink-soft); border-color: var(--line); }
.chip-lg { padding: 0.32rem 0.7rem; font-size: 0.8rem; }

.map-pane {
  min-height: 0;
  padding: 0.85rem 0.85rem 0.85rem 0;
  height: 100%;
  max-height: calc(100vh - var(--header-h) - 4.8rem);
}
.map-frame {
  height: 100%;
  min-height: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: #c8d6d4;
}
#directory-map, #listing-map, #editor-map, #events-map {
  width: 100%;
  height: 100%;
  background: #c8d6d4;
}
.leaflet-container {
  font-family: var(--font-body);
  background: #c8d6d4;
}
.leaflet-tile-pane { filter: saturate(0.72) contrast(0.96) brightness(1.03); }
.leaflet-control-attribution {
  background: rgba(255, 253, 248, 0.92) !important;
  color: var(--muted);
  font-size: 0.68rem;
  border-radius: 8px 0 0 0;
}
.leaflet-popup-content-wrapper {
  border-radius: 12px;
  box-shadow: var(--shadow);
  color: var(--ink);
}
.leaflet-popup-content {
  font-family: var(--font-body);
  margin: 0.7rem 0.85rem;
  line-height: 1.4;
}
.leaflet-popup-content a { font-weight: 700; }
.leaflet-bar {
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  overflow: hidden;
  box-shadow: var(--shadow) !important;
}
.leaflet-bar a {
  background: var(--surface) !important;
  color: var(--ink) !important;
  border-bottom-color: var(--line) !important;
}
.leaflet-bar a:hover {
  background: var(--teal-soft) !important;
  color: var(--navy) !important;
}
.map-pin {
  background: none !important;
  border: 0 !important;
}
.map-pin-inner {
  display: block;
  width: 18px;
  height: 18px;
  margin: 4px auto 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--green);
  box-shadow: 0 2px 8px rgba(0, 45, 114, 0.28);
  border: 2px solid #fffdf8;
}
.map-pin-inner::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fffdf8;
}

.listing { max-width: none; margin: 0; padding: 0 0 3.5rem; }
.listing-hero { margin: 0; }
.gallery {
  background: var(--surface);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  overflow: hidden;
}
.gallery img#gallery-main {
  width: 100%;
  height: min(40vh, 380px);
  object-fit: cover;
  background: var(--paper-deep);
}
.thumbs {
  display: flex;
  gap: 0.5rem;
  padding: 0.7rem 0.75rem 0.8rem;
  overflow: auto;
  background: var(--surface);
}
.thumb {
  border: 2px solid transparent;
  padding: 0;
  background: none;
  border-radius: 12px;
  cursor: pointer;
}
.thumb img { width: 92px; height: 68px; object-fit: cover; border-radius: 10px; }
.thumb.is-active { border-color: var(--green); }
.gallery-empty {
  height: 280px;
  display: grid;
  place-items: center;
  background: var(--paper-deep);
  border-radius: var(--radius-lg);
  color: var(--muted);
  border: 1px dashed var(--line);
}
.listing-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.85fr;
  gap: 2rem;
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.6rem 1.2rem 2.5rem;
}
.listing-side { align-self: start; position: sticky; top: calc(var(--header-h) + 1rem); }
.listing-main > h1 { margin-bottom: 0.55rem; }
.address-block {
  font-style: normal;
  display: grid;
  gap: 0.12rem;
  margin: 0 0 1.1rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.address-street { font-weight: 700; color: var(--ink); }
.address-locality { color: var(--muted); }
.listing-chips { margin: 0 0 1.2rem; }
.claim-banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: var(--amber-soft);
  border: 1px solid #e4cba3;
  border-radius: 14px;
  padding: 1rem 1.1rem;
  margin: 0 0 1.3rem;
}
.claim-banner p { margin: 0.25rem 0 0; color: var(--muted); }
.prose { font-size: 1.08rem; max-width: 62ch; color: var(--ink-soft); }
.side-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.side-card .map-frame,
.side-card #listing-map {
  min-height: 230px;
  height: 230px;
  border-radius: 0;
  border: 0;
  box-shadow: none;
}
.side-card-body { padding: 1.05rem 1.15rem 1.2rem; }
.side-card dl { padding: 0; margin: 0; }
.side-card dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 0.8rem;
}
.side-card dd { margin: 0.2rem 0 0; }
.side-card-body .btn { width: 100%; margin: 0 0 0.7rem; }

.page-auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.page-auth #main {
  flex: 1;
  display: grid;
  place-items: center;
}
.page-auth .site-footer { display: none; }
.auth-page, .portal, .form-page { max-width: 980px; margin: 0 auto; padding: 2.2rem 1.2rem 4rem; }
.page-auth .auth-page {
  flex: 1;
  display: grid;
  place-items: center;
  max-width: none;
  width: 100%;
  padding: 1.5rem 1.2rem 2rem;
}
.auth-card, .empty-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem 1.7rem 1.6rem;
  box-shadow: var(--shadow);
  max-width: 460px;
  width: 100%;
}
.auth-card h1 { font-size: 1.85rem; }
.auth-card form { display: grid; gap: 0.85rem; margin: 1.1rem 0 1rem; }
.demo-note {
  display: grid;
  gap: 0.25rem;
  background: var(--navy-soft);
  border: 1px solid #b8c4db;
  padding: 1rem 1.05rem;
  border-radius: 12px;
  font-size: 0.98rem;
  color: var(--ink-soft);
  margin: 0;
}
.demo-note p { margin: 0; }
.demo-kicker {
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.type-fields[hidden] { display: none !important; }
.auth-switch { margin: 1rem 0 0; color: var(--muted); }

.portal-head, .form-intro {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}
.form-intro { align-items: flex-start; flex-direction: column; }
.portal-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.portal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.1rem; }
.portal-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.portal-card .card-photo,
.portal-card .card-photo img,
.portal-card .photo-fallback { min-height: 168px; }
.portal-card .card-photo img { height: 168px; width: 100%; object-fit: cover; }
.portal-card-actions { display: flex; gap: 0.85rem; align-items: center; margin-top: 0.8rem; }
.portal-events { margin-top: 2.4rem; }
.portal-events .portal-head { margin-bottom: 1rem; }
.portal-event-list { display: grid; gap: 0.7rem; }
.portal-event {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.portal-event h3 { margin: 0 0 0.2rem; }
.portal-event .card-kicker, .portal-event .card-address { margin: 0; }
.portal-event .portal-card-actions { margin: 0; }

.calendar-pane { display: grid; align-content: start; gap: 0.85rem; }
.calendar-nav {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.4rem;
}
.calendar-nav h2 {
  margin: 0;
  text-align: center;
  font-size: 1.15rem;
}
.calendar-nav .text-btn {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  line-height: 1;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.28rem;
}
.cal-dow {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.15rem 0 0.35rem;
}
.cal-empty { min-height: 2.2rem; }
.cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 650;
  font-size: 0.92rem;
  position: relative;
}
.cal-day:hover { background: var(--teal-soft); color: var(--navy); }
.cal-day.has-events::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}
.cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px var(--teal);
}
.cal-day.is-selected {
  background: var(--navy);
  color: #fff;
}
.cal-day.is-selected.has-events::after { background: #fffdf8; }
.calendar-hint {
  margin: 0.2rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
  font-weight: 500;
}
.events-masthead-actions {
  justify-content: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  max-width: 720px;
}
.event-card {
  grid-template-columns: 168px 1fr;
  min-height: 0;
}
.event-when {
  background: var(--teal-soft);
  padding: 1.05rem 1rem;
  display: grid;
  align-content: center;
  gap: 0.35rem;
}
.event-time {
  margin: 0;
  font-weight: 750;
  color: var(--navy);
  font-size: 0.95rem;
  line-height: 1.35;
}
.event-host {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-weight: 600;
}
.event-contact {
  margin: 0.55rem 0 0;
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--teal-deep);
}
.field em { font-style: normal; font-weight: 500; color: var(--muted); }

.home-form, .photo-manager {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.4rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}
.home-form fieldset {
  border: 0;
  margin: 0 0 1.6rem;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
.home-form legend {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.45rem;
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.field-row.three { grid-template-columns: 1.3fr 0.7fr 0.8fr; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 0.85rem; }
.check-grid.compact { grid-template-columns: 1fr; }
.check { display: flex; gap: 0.5rem; align-items: flex-start; font-weight: 600; }
.split-input { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }
#editor-map {
  min-height: 280px;
  height: 280px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.form-actions { display: flex; gap: 1rem; align-items: center; }
.upload-form { display: grid; gap: 0.8rem; max-width: 420px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.9rem; margin-top: 1rem; }
.photo-grid figure { margin: 0; }
.photo-grid img { height: 118px; width: 100%; object-fit: cover; border-radius: 10px; }

.site-footer {
  color: var(--muted);
  padding: 2rem 1.2rem 2.4rem;
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.55);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  text-align: center;
}
.footer-logo {
  display: block;
  height: 26px;
  width: auto;
  margin: 0 auto 0.55rem;
}
.site-footer p { margin: 0.2rem 0; font-size: 0.92rem; }
.page-directory .site-footer { display: none; }

@media (min-width: 961px) {
  .filters .filter-form { display: grid !important; }
}

@media (max-width: 960px) {
  .page-directory {
    height: auto;
    overflow: visible;
  }
  .header-inner { padding: 0.7rem 1rem; }
  .type-nav-inner { padding: 0 0.6rem; }
  .type-link { font-size: 0.82rem; padding: 0.65rem 0.55rem; }
  .directory-masthead { padding: 1rem 1rem 0.9rem; flex-direction: column; align-items: stretch; }
  .directory-search { grid-template-columns: 1fr; justify-content: stretch; max-width: none; }
  .ask-form { grid-template-columns: 1fr; }
  .events-masthead-actions { grid-template-columns: 1fr; }
  .directory-workspace { grid-template-columns: 1fr; }
  .filters {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.85rem 1rem 1rem;
    overflow: visible;
  }
  .filters > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.2rem 0 0.15rem;
  }
  .filters > summary::after {
    content: "Show";
    font-size: 0.85rem;
    color: var(--navy);
    font-weight: 700;
  }
  .filters[open] > summary::after { content: "Hide"; }
  .filters .filter-form { margin-top: 0.85rem; }
  .split,
  .page-events .split { grid-template-columns: 1fr; min-height: 0; }
  .map-pane {
    order: -1;
    position: relative;
    top: 0;
    height: auto;
    padding: 0.9rem 1rem 0;
  }
  .map-frame, #directory-map, #events-map { min-height: 260px; height: 260px; }
  .event-card { grid-template-columns: 1fr; }
  .event-when { padding: 0.85rem 1rem; }
  .portal-event { flex-direction: column; align-items: flex-start; }
  .listing-grid, .field-row, .field-row.three, .check-grid {
    grid-template-columns: 1fr;
  }
  .home-card { grid-template-columns: 1fr; min-height: 0; }
  .card-photo, .card-photo img, .photo-fallback { min-height: 180px; height: 180px; }
  .portal-head { flex-direction: column; align-items: flex-start; }
  .claim-banner { flex-direction: column; align-items: flex-start; }
  .home-list { padding: 0.9rem 1rem 1.4rem; }
}

@media (max-width: 560px) {
  .nav a:not(.btn) { font-size: 0.9rem; }
  .brand-logo { height: 26px; }
  .gallery img#gallery-main { height: 42vh; }
}
