/* Brigg & District Community Map — shared styles */

:root {
  --ink: #14231f;
  --ink-2: #2c3f39;
  --muted: #5c6f68;
  --faint: #84948e;
  --paper: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f4efe7;
  --line: #e2dcd1;
  --line-strong: #cfc6b7;
  --accent: #0d6b58;
  --accent-dark: #094f41;
  --accent-soft: #e4f2ec;
  --accent-ink: #07443a;
  --warm: #b4702a;
  --warm-soft: #fbefdf;
  --danger: #9c3a2b;
  --danger-soft: #fbeae7;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(20, 35, 31, 0.06), 0 2px 8px rgba(20, 35, 31, 0.05);
  --shadow-lg: 0 12px 40px rgba(20, 35, 31, 0.16);
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --header-h: 68px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a { color: var(--accent-dark); text-underline-offset: 2px; }
a:hover { color: var(--accent); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--surface);
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 clamp(16px, 4vw, 40px);
  background: rgba(251, 248, 243, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 4px;
  background: var(--accent);
  display: grid;
  place-items: center;
  transform: rotate(-45deg);
  flex: none;
}
.brand-mark span {
  transform: rotate(45deg);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.brand-short { display: none; }
.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.2;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 560;
  padding: 8px 12px;
  border-radius: 999px;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); }
.site-nav .nav-pro { border: 1px solid var(--line-strong); }
.site-nav .nav-pro[aria-current="page"] { border-color: transparent; }
@media (max-width: 720px) {
  .site-nav a { padding: 7px 9px; font-size: 13.5px; }
  .brand-short { display: none; }
.brand-text small { display: none; }
  .site-header { gap: 10px; }
}
@media (max-width: 560px) {
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .brand-text { font-size: 15px; }
}
@media (max-width: 460px) {
  .site-nav a:not(.nav-pro) { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .site-nav .nav-pro { padding: 7px 10px; font-size: 12.5px; }
  .site-header { padding: 0 12px; gap: 8px; }
}
.site-nav a { white-space: nowrap; }

/* ---------- Hero ---------- */

.hero {
  padding: clamp(24px, 5vw, 52px) clamp(16px, 4vw, 40px) 20px;
  max-width: 1400px;
  margin: 0 auto;
}
.hero-inner { max-width: 760px; }
@media (max-width: 480px) {
  .eyebrow { font-size: 11.5px; letter-spacing: 0.08em; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  font-weight: 600;
  color: var(--ink);
}
.hero p {
  font-size: clamp(16px, 1.6vw, 18px);
  color: var(--ink-2);
  margin: 0;
  max-width: 620px;
}

/* ---------- Search & filters ---------- */

.controls {
  position: sticky;
  top: var(--header-h);
  z-index: 800;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  padding: 14px clamp(16px, 4vw, 40px);
}
.controls-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}
.search {
  position: relative;
  flex: 1 1 300px;
  min-width: 220px;
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--faint);
  pointer-events: none;
}
.search input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  padding: 0 44px 0 42px;
  font: inherit;
  font-size: 15.5px;
  color: var(--ink);
}
.search input::-webkit-search-cancel-button { display: none; }
.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  display: none;
  place-items: center;
}
.search-clear:hover { background: var(--surface-2); }
.search.has-value .search-clear { display: grid; }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink-2);
  font: inherit;
  font-size: 14.5px;
  padding: 0 38px 0 16px;
  cursor: pointer;
  max-width: 240px;
}
.select-wrap select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14.5px;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle .switch {
  width: 32px;
  height: 18px;
  border-radius: 999px;
  background: var(--line-strong);
  position: relative;
  transition: background 0.15s;
  flex: none;
}
.toggle .switch::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.toggle input:checked + .switch { background: var(--accent); }
.toggle input:checked + .switch::after { transform: translateX(14px); }
.toggle:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.result-count {
  font-size: 13.5px;
  color: var(--muted);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .controls { position: static; }
  .controls-inner { gap: 8px; }
  .select-wrap { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .select-wrap select { max-width: 100%; width: 100%; }
  .toggle { flex: 1 1 calc(50% - 8px); justify-content: center; min-width: 0; gap: 6px; padding: 0 8px; font-size: 13px; }
  .search { flex-basis: 100%; }
  .result-count { flex-basis: 100%; order: 10; }
}

/* ---------- Layout ---------- */

.layout {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(340px, 440px) 1fr;
  gap: 24px;
  padding: 24px clamp(16px, 4vw, 40px) 60px;
  align-items: start;
}
@media (max-width: 960px) {
  .layout { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
}

.map-panel { position: sticky; top: calc(var(--header-h) + 82px); }
#map {
  height: calc(100vh - var(--header-h) - 130px);
  min-height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: #dfe7e2;
  z-index: 1;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 560px) {
  .toggle-extra { display: none; }
}
@media (max-width: 380px) {
  .toggle { flex-basis: 100%; font-size: 13.5px; }
}
@media (max-width: 960px) {
  .map-panel { position: relative; top: auto; order: -1; }
  #map { height: 46vh; min-height: 300px; }
}

.map-caption {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 12.5px;
  color: var(--muted);
  padding: 8px 4px 0;
}
.map-caption .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--warm);
  margin-right: 5px;
}

/* Leaflet tweaks */
.leaflet-container { font-family: var(--sans); font-size: 13px; }
.leaflet-popup-content-wrapper { border-radius: 12px; box-shadow: var(--shadow-lg); }
.leaflet-popup-content { margin: 14px 16px; line-height: 1.45; }
.leaflet-popup-content h3 { margin: 0 0 4px; font-size: 15px; }
.leaflet-popup-content p { margin: 0 0 8px; color: var(--muted); }
.leaflet-popup-content a { font-weight: 600; }
.leaflet-bar a { color: var(--ink); }
.map-pin {
  width: 26px;
  height: 26px;
  border-radius: 50% 50% 50% 3px;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
  display: grid;
  place-items: center;
}
.map-pin span {
  transform: rotate(45deg);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: transparent; }
.marker-cluster div {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-family: var(--sans);
  box-shadow: 0 0 0 4px rgba(13, 107, 88, 0.22);
  border: 2px solid #fff;
}
.marker-cluster div span { font-size: 12.5px; }

/* ---------- Service list ---------- */

.list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
}
.list-head h2 {
  font-size: 13px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  font-weight: 700;
}
.button-link {
  border: 0;
  background: none;
  color: var(--accent-dark);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}
.button-link:hover { background: var(--accent-soft); }

.card-list { display: flex; flex-direction: column; gap: 10px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.12s, box-shadow 0.12s, transform 0.12s;
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 4px 16px rgba(20, 35, 31, 0.09); }
.card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.card h3 {
  margin: 0;
  font-size: 16.5px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.card h3 a {
  color: var(--ink);
  text-decoration: none;
}
.card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}
.card { position: relative; }
.card h3 a:hover { color: var(--accent-dark); }
.card .theme-pill { align-self: flex-start; }
.card p {
  margin: 0 0 6px;
  color: var(--ink-2);
  font-size: 14.5px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12.8px;
  color: var(--muted);
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  align-items: center;
}
.card-meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-meta svg { width: 14px; height: 14px; flex: none; color: var(--faint); }
.card-actions {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  position: relative;
  z-index: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  padding: 9px 16px;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.2;
  transition: background 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--accent-dark); color: #fff; }
.btn.secondary {
  background: var(--surface);
  color: var(--ink-2);
  border-color: var(--line-strong);
}
.btn.secondary:hover { background: var(--surface-2); color: var(--ink); }
.btn.ghost {
  background: transparent;
  color: var(--accent-dark);
  padding: 8px 10px;
}
.btn.ghost:hover { background: var(--accent-soft); }
.btn.small { font-size: 13px; padding: 7px 12px; }
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.2;
  color: var(--ink-2);
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px 9px 4px 7px;
  max-width: 100%;
}
.theme-pill i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
}
.theme-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .theme-pill { max-width: none; }

.empty-state {
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state h3 { color: var(--ink); margin: 0 0 6px; font-size: 17px; }
.empty-state p { margin: 0 auto 14px; max-width: 38ch; font-size: 14.5px; }

/* County-wide note */
.wide-note {
  margin-top: 4px;
  background: var(--warm-soft);
  border: 1px solid #eedcc2;
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: 13.5px;
  color: #6b4a1d;
}
.wide-note strong { display: block; font-size: 14px; color: #553a15; margin-bottom: 2px; }
.wide-note ul { margin: 6px 0 0; padding-left: 18px; }
.wide-note button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  color: #6b4a1d;
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Dialog / detail sheet ---------- */

dialog.sheet {
  padding: 0;
  border: 0;
  border-radius: 18px;
  width: min(560px, calc(100vw - 24px));
  max-height: min(88vh, 900px);
  margin: auto;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(12, 24, 20, 0.45); backdrop-filter: blur(2px); }
@media (min-width: 900px) {
  dialog.sheet.detail { margin-right: max(24px, calc((100vw - 1400px) / 2 + 24px)); }
}
.sheet-inner { overflow-y: auto; max-height: inherit; }
.sheet-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 0;
}
.sheet-head h2 {
  font-family: var(--serif);
  font-size: 25px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  font-weight: 600;
}
.sheet-head .theme-pill { margin-bottom: 8px; }
.sheet-close {
  margin-left: auto;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
  line-height: 1;
}
.sheet-close:hover { background: var(--surface-2); color: var(--ink); }
.sheet-body { padding: 4px 22px 22px; }
.sheet-body > p.lede { margin: 12px 0 18px; color: var(--ink-2); font-size: 15.5px; }

.detail-grid { display: grid; gap: 14px; margin: 0; }
.detail-grid > div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.detail-grid > div:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-grid dt { color: var(--muted); font-size: 13px; font-weight: 600; }
.detail-grid dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.detail-grid dd .subtle { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
@media (max-width: 480px) {
  .detail-grid > div { grid-template-columns: 1fr; gap: 3px; }
}
.contact-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.pro-contact {
  margin-top: 20px;
  background: var(--accent-soft);
  border: 1px solid #c6e2d8;
  border-radius: 12px;
  padding: 14px 16px;
}
.pro-contact h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.pro-contact p { margin: 0 0 6px; font-size: 14.5px; }
.pro-contact p:last-child { margin-bottom: 0; }
.pro-contact .copy-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.copy-btn {
  border: 1px solid #b6d8cc;
  background: #fff;
  border-radius: 7px;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  padding: 4px 9px;
  cursor: pointer;
  flex: none;
}
.copy-btn:hover { background: #fff; border-color: var(--accent); }

.source-note {
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- Pro page ---------- */

.pro-banner {
  background: var(--accent-ink);
  color: #e8f4ef;
  font-size: 13.5px;
  padding: 9px clamp(16px, 4vw, 40px);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.pro-banner strong { color: #fff; }
.pro-banner .badge {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pro-main { max-width: 1400px; margin: 0 auto; padding: 28px clamp(16px, 4vw, 40px) 70px; }
.pro-head { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.pro-head h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.02em; margin: 0 0 6px; }
.pro-head p { margin: 0; color: var(--muted); max-width: 62ch; }
.pro-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.pro-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius) var(--radius) 0 0;
  border-bottom: 0;
}
.pro-toolbar .search { flex: 1 1 260px; }
.pro-toolbar .search input { height: 42px; background: var(--paper); }
.pro-toolbar .select-wrap select { height: 42px; background: var(--paper); }
.pro-toolbar .result-count { margin-left: auto; }

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow-x: auto;
}
table.directory {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 860px;
}
table.directory th {
  text-align: left;
  font-size: 11.5px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  white-space: nowrap;
}
table.directory td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.directory tr:last-child td { border-bottom: 0; }
table.directory tbody tr { cursor: pointer; }
table.directory tbody tr:hover { background: #fbf6ee; }
table.directory td.name { font-weight: 650; color: var(--ink); min-width: 210px; }
table.directory td.name button {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 650; color: var(--accent-dark);
  text-align: left; cursor: pointer;
}
table.directory td.name small { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
table.directory td.contact { min-width: 190px; font-size: 13px; }
table.directory td.contact a { display: block; overflow-wrap: anywhere; }
table.directory td.updated { white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.stale { color: var(--warm); font-weight: 600; }

.pro-footnote { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* Tabs */
.tabs { display: flex; gap: 6px; margin: 0 0 18px; flex-wrap: wrap; }
.tab {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  padding: 8px 15px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tab:hover { background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.tab .count {
  background: rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 12px;
}
.tab[aria-selected="true"] .count { background: rgba(255, 255, 255, 0.2); }
.panel[hidden] { display: none; }

/* Submissions */
.sub-list { display: grid; gap: 12px; }
.sub-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.sub-card header { display: flex; gap: 12px; align-items: start; justify-content: space-between; }
.sub-card h3 { margin: 0 0 3px; font-size: 16.5px; }
.sub-card .meta { font-size: 12.5px; color: var(--muted); }
.sub-card .sub-body { margin: 10px 0 0; color: var(--ink-2); font-size: 14px; }
.sub-card .sub-body p { margin: 0 0 5px; }
.sub-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.status {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}
.status.pending { background: var(--warm-soft); color: #7a4f17; }
.status.approved { background: var(--accent-soft); color: var(--accent-ink); }
.status.rejected { background: var(--danger-soft); color: var(--danger); }

/* ---------- Forms ---------- */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: 13px; font-weight: 650; color: var(--ink-2); margin-bottom: 5px; }
.field label .req { color: var(--danger); }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; display: block; }
.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--paper);
  padding: 10px 12px;
  font: inherit;
  font-size: 14.5px;
  color: var(--ink);
}
.field textarea { min-height: 88px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  background: #fff;
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .error { display: none; color: var(--danger); font-size: 12.5px; margin-top: 4px; }
.field.invalid .error { display: block; }
.form-section { margin: 22px 0 14px; padding-top: 18px; border-top: 1px solid var(--line); }
.form-section:first-of-type { margin-top: 0; border-top: 0; padding-top: 0; }
.form-section h3 { margin: 0 0 3px; font-size: 14px; letter-spacing: 0.02em; }
.form-section p { margin: 0 0 12px; font-size: 12.5px; color: var(--muted); }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.form-actions .note { font-size: 12px; color: var(--muted); }

/* Login */
.login-wrap {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  padding: 32px 20px 60px;
}
.login-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--shadow-sm);
}
.login-card h1 { font-family: var(--serif); font-size: 28px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.01em; }
.login-card > p { margin: 0 0 20px; color: var(--muted); font-size: 14.5px; }
.login-card .field { margin-bottom: 14px; }
.login-card .btn { width: 100%; }
.demo-note {
  margin-top: 18px;
  background: var(--warm-soft);
  border: 1px solid #eedcc2;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 12.5px;
  color: #6b4a1d;
}
.demo-note strong { display: block; margin-bottom: 3px; }
.form-error {
  display: none;
  background: var(--danger-soft);
  border: 1px solid #efc9c1;
  color: var(--danger);
  font-size: 13.5px;
  padding: 10px 12px;
  border-radius: 9px;
  margin-bottom: 14px;
}
.form-error.show { display: block; }

/* ---------- About / footer ---------- */

.about-strip {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 20px;
}
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
@media (max-width: 800px) { .about-grid { grid-template-columns: 1fr; } }
.about-grid h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 10px; font-weight: 600; }
.about-grid p { color: var(--ink-2); margin: 0 0 10px; font-size: 15px; max-width: 60ch; }
.about-grid ul { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 14.5px; }
.about-grid li { margin-bottom: 5px; }
.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.callout h3 { margin: 0 0 6px; font-size: 15px; }
.callout p { font-size: 13.5px; margin: 0 0 10px; }
.callout .btn { font-size: 13.5px; padding: 8px 14px; }

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px clamp(16px, 4vw, 40px) 40px;
  color: var(--muted);
  font-size: 13px;
}
.site-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}
.site-footer a { color: var(--muted); }
.site-footer .proto { font-size: 12px; color: var(--faint); }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  padding: 11px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 2000;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Utilities */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

/* Print: professional directory as a clean handout */
@media print {
  .site-header, .pro-banner, .pro-actions, .pro-toolbar, .tabs, .about-strip, .site-footer,
  .map-panel, .controls, .toast, dialog { display: none !important; }
  body { background: #fff; font-size: 10.5pt; }
  .pro-main { padding: 0; }
  .table-wrap { border: 0; overflow: visible; }
  table.directory { min-width: 0; }
  table.directory th, table.directory td { padding: 5px 6px; }
  table.directory td.contact a { color: #000; text-decoration: none; }
  table.directory tbody tr { break-inside: avoid; }
}
