:root {
  --brand-green: #3A603C;
  --brand-green-deep: #29482E;
  --brand-green-soft: #E9F0E9;
  --brand-brown: #7C5239;
  --brand-orange: #E0804E;
  --brand-orange-soft: #FCEDE4;
  --brand-bright-green: #72C04E;
  --ink: #243128;
  --muted: #667069;
  --line: #DDE4DD;
  --paper: #FFFFFF;
  --bg: #F7F8F5;
  --pending: #9B5D28;
  --shadow: 0 8px 24px rgba(42, 63, 45, .08);
  --shadow-soft: 0 2px 10px rgba(42, 63, 45, .06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Open Sans", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand-green); }
a:hover { color: var(--brand-green-deep); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
.wrap { width: min(1200px, calc(100% - 32px)); margin-inline: auto; }
.skip-link { position: absolute; left: -9999px; top: 0; padding: 8px 12px; background: white; z-index: 1000; }
.skip-link:focus { left: 10px; }

h1, h2, h3, .eyebrow, .field, .tab, .link-button, .button-link, .status-pill, .result-summary, .calendar-date {
  font-family: "Cairo", "Open Sans", Arial, sans-serif;
}

.site-header {
  background: var(--paper);
  color: var(--ink);
  border-top: 6px solid var(--brand-green);
  border-bottom: 1px solid var(--line);
  padding: 26px 0 25px;
  box-shadow: var(--shadow-soft);
}
.header-inner {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: center;
}
.brand-block {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 52px);
  min-width: 0;
}
.brand-logo {
  display: block;
  width: min(390px, 36vw);
  height: auto;
  flex: 0 1 auto;
}
.guide-heading {
  padding-left: clamp(22px, 3vw, 40px);
  border-left: 1px solid var(--line);
  min-width: 0;
}
.eyebrow {
  margin: 0 0 3px;
  color: var(--brand-brown);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .13em;
}
.eyebrow.dark { color: var(--brand-green); }
h1 {
  margin: 0;
  color: var(--brand-green-deep);
  font-size: clamp(2rem, 4.3vw, 3.45rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -.025em;
}
h2 {
  margin: 0;
  color: var(--brand-green-deep);
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.15;
}
.subtitle {
  max-width: 700px;
  margin: 8px 0 0;
  color: #536057;
  font-size: 1rem;
}
.live-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--brand-green-deep);
  background: var(--brand-green-soft);
  border: 1px solid #C9D8CB;
  border-radius: 999px;
  padding: 8px 12px;
  font-family: "Cairo", sans-serif;
  font-size: .78rem;
  font-weight: 700;
  white-space: nowrap;
}
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--brand-bright-green);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(114,192,78,.15);
}

.coverage-note {
  background: var(--brand-orange-soft);
  border-bottom: 1px solid #F1CFBA;
  padding: 12px 0;
  color: #694A39;
}
.coverage-inner {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: .92rem;
}
.coverage-kicker {
  color: var(--brand-brown);
  font-family: "Cairo", sans-serif;
  font-weight: 800;
  white-space: nowrap;
}

.controls {
  margin-top: 28px;
  padding: 24px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}
.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  margin-bottom: 18px;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--brand-green);
  font-weight: 700;
  cursor: pointer;
  padding: 5px;
}
.link-button:hover { color: var(--brand-brown); }
.filter-grid { display: grid; grid-template-columns: 2fr repeat(6, minmax(145px, 1fr)); gap: 10px; }
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #4C5A50;
  font-size: .78rem;
  font-weight: 700;
}
.field input, .field select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: white;
  color: var(--ink);
}
.field input:hover, .field select:hover { border-color: #B8C7BA; }
.field input:focus, .field select:focus {
  outline: 3px solid rgba(58,96,60,.14);
  border-color: var(--brand-green);
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin: 20px 0 12px;
}
.result-summary { color: var(--brand-green-deep); font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.dot.verified { background: var(--brand-green); }
.dot.pending { background: var(--brand-orange); }
.view-tabs { display: inline-flex; padding: 4px; background: #EDF1EC; border-radius: 10px; gap: 3px; }
.tab {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 7px;
  font-weight: 700;
  color: #536057;
}
.tab:hover { color: var(--brand-green-deep); }
.tab.active { background: white; color: var(--brand-green-deep); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

.results-section { padding: 24px 0 54px; }
.view-panel { display: none; }
.view-panel.active { display: block; }
#map {
  width: 100%;
  height: min(68vh, 690px);
  min-height: 460px;
  background: #E8EEE9;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.map-note { color: var(--muted); font-size: .8rem; margin-top: 8px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.market-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand-green);
  border-radius: 12px;
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
}
.card-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.market-card h3 {
  margin: 2px 0 4px;
  color: var(--brand-green-deep);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.18;
}
.location-line { margin: 0; color: var(--muted); font-size: .9rem; font-weight: 700; }
.status-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill.pending { background: var(--brand-orange-soft); color: var(--pending); }
.description { margin: 14px 0; color: #3E4B41; }
.info-block { margin-top: 14px; }
.info-label {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-brown);
  font-family: "Cairo", sans-serif;
  font-size: .71rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}
.schedule-row, .special-row { padding: 7px 0; border-top: 1px solid #EDF0ED; font-size: .92rem; }
.schedule-row:first-child, .special-row:first-child { border-top: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  background: var(--brand-green-soft);
  color: var(--brand-green-deep);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: .78rem;
  font-weight: 700;
}
.chip.special { background: var(--brand-orange-soft); color: var(--brand-brown); }
.card-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 17px; }
.button-link {
  display: inline-block;
  text-decoration: none;
  border: 1px solid var(--brand-green);
  color: var(--brand-green);
  background: white;
  border-radius: 8px;
  padding: 7px 10px;
  font-family: "Cairo", sans-serif;
  font-size: .81rem;
  font-weight: 700;
}
.button-link:hover { color: white; background: var(--brand-green-deep); }
.button-link.primary { color: white; background: var(--brand-green); }
.button-link.primary:hover { background: var(--brand-green-deep); }
.caution {
  margin-top: 13px;
  padding: 9px 10px;
  border-left: 3px solid var(--brand-orange);
  background: #FFF8F3;
  font-size: .84rem;
}
.verified-date { margin: 14px 0 0; font-size: .78rem; color: var(--muted); }
.calendar-list { display: grid; gap: 12px; }
.calendar-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  background: white;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand-green);
  border-radius: 10px;
  padding: 16px;
}
.calendar-date { color: var(--brand-brown); font-weight: 800; }
.calendar-item h3 { margin: 0 0 4px; color: var(--brand-green-deep); font-size: 1.05rem; }
.calendar-item p { margin: 2px 0; color: var(--muted); }
.empty-state { padding: 28px; background: white; border: 1px dashed #B9C5BC; border-radius: 12px; color: var(--muted); text-align: center; }
.error-box { padding: 14px; background: #FFF0EF; border: 1px solid #EDB7B0; color: #7D2117; border-radius: 10px; margin-bottom: 14px; }
.hidden { display: none !important; }
.leaflet-popup-content { margin: 12px 14px; min-width: 210px; }
.leaflet-popup-content h3 { margin: 0 0 3px; color: var(--brand-green-deep); font-size: 1rem; }
.leaflet-popup-content p { margin: 3px 0; }

footer {
  background: var(--brand-green-deep);
  border-top: 5px solid var(--brand-orange);
  padding: 30px 0;
  color: rgba(255,255,255,.88);
  font-size: .84rem;
}
.footer-inner {
  display: flex;
  align-items: center;
  gap: clamp(24px, 5vw, 60px);
}
.footer-logo { display: block; width: min(360px, 35vw); height: auto; }
.footer-copy { padding-left: clamp(20px, 4vw, 46px); border-left: 1px solid rgba(255,255,255,.22); }
.footer-inner p { margin: 4px 0; }
.footer-inner strong { color: white; }

@media (max-width: 1120px) {
  .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .field-wide { grid-column: span 2; }
  .brand-logo { width: min(330px, 34vw); }
}
@media (max-width: 860px) {
  .header-inner { align-items: flex-start; }
  .brand-block { align-items: flex-start; flex-direction: column; gap: 18px; }
  .brand-logo { width: min(440px, 76vw); }
  .guide-heading { border-left: 0; padding-left: 0; }
  .live-badge { margin-top: 4px; }
  .footer-inner { align-items: flex-start; flex-direction: column; gap: 20px; }
  .footer-logo { width: min(390px, 76vw); }
  .footer-copy { border-left: 0; padding-left: 0; }
}
@media (max-width: 760px) {
  .wrap { width: min(100% - 22px, 1200px); }
  .site-header { padding-block: 20px 22px; }
  .header-inner, .section-heading, .summary-row { align-items: flex-start; flex-direction: column; }
  .live-badge { align-self: flex-start; }
  .coverage-inner { align-items: flex-start; flex-direction: column; gap: 2px; }
  .coverage-kicker { white-space: normal; }
  .controls { margin-top: 18px; padding: 18px; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
  .field-wide { grid-column: 1 / -1; }
  .card-grid { grid-template-columns: 1fr; }
  #map { min-height: 420px; height: 58vh; }
  .calendar-item { grid-template-columns: 1fr; gap: 4px; }
}
@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .view-tabs { width: 100%; }
  .tab { flex: 1; padding-inline: 8px; }
  .status-pill { white-space: normal; }
  .controls { padding: 15px; }
}

/* =========================================================
   AHFM FARMERS MARKET GUIDE
   Find a Market - Green Search & Filter Panel
   ========================================================= */

main > section.wrap.controls[aria-label="Find a market"] {
    background: #24552f;
    border: 1px solid #1b4224;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

/* Find a Market heading */
main > section.wrap.controls[aria-label="Find a market"] h2,
main > section.wrap.controls[aria-label="Find a market"] h3 {
    color: #ffffff;
}

/* Filter labels and supporting text */
main > section.wrap.controls[aria-label="Find a market"] label {
    color: #ffffff;
}

/* Search field and dropdowns */
main > section.wrap.controls[aria-label="Find a market"] input,
main > section.wrap.controls[aria-label="Find a market"] select {
    background: #ffffff;
    color: #222222;
    border-color: #d4ddd5;
}

/* Search placeholder */
main > section.wrap.controls[aria-label="Find a market"] input::placeholder {
    color: #747a75;
}

/* Clear Filters control */
main > section.wrap.controls[aria-label="Find a market"] .clear-filters,
main > section.wrap.controls[aria-label="Find a market"] a {
    color: #ffffff;
}

/* Results summary text */
main > section.wrap.controls[aria-label="Find a market"] .summary-row {
    color: #ffffff;
}

/* Better keyboard/focus visibility */
main > section.wrap.controls[aria-label="Find a market"] input:focus,
main > section.wrap.controls[aria-label="Find a market"] select:focus {
    outline: 3px solid rgba(255, 255, 255, 0.30);
    border-color: #ffffff;
}