:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --text-strong: #0f2e23;
  --text-body: #2c3a35;
  --text-muted: #5d6f69;
  --surface-page: #fbfaf7;
  --surface-alt: #f2f6f3;
  --border-subtle: #dbe7e1;
  --accent: #17866f;
  --accent-strong: #0a5c48;
  --accent-tint: #eaf1ee;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(15, 46, 35, 0.06), 0 1px 1px rgba(15, 46, 35, 0.04);
  --shadow-card-hover: 0 6px 20px rgba(15, 46, 35, 0.10);
  --container-max: 1080px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  color: var(--text-body);
  background: var(--surface-page);
  line-height: 1.5;
}

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  color: inherit;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--border-subtle);
  background: #fff;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand-mark {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Hero */

.hero {
  padding: 64px 0 40px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(30px, 4.5vw, 46px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--text-strong);
  margin: 0 0 14px;
}

.hero p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 17px;
}

/* Search form */

.search-form {
  max-width: 640px;
  margin: 32px auto 0;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.search-form label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.search-form input[type="text"] {
  flex: 1;
  min-width: 180px;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-body);
  background: transparent;
}

.search-form input[type="text"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  background: var(--accent-tint);
}

.search-form button {
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-strong);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 26px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.search-form button:hover,
.search-form button:focus-visible {
  background: var(--accent);
}

.search-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 12px;
}

.search-hint button {
  border: none;
  background: none;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* Results */

#results-view {
  padding: 28px 0 64px;
}

.results-toolbar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 22px;
}

.results-toolbar h2 {
  font-size: 20px;
  color: var(--text-strong);
  margin: 0;
}

.results-toolbar .back-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.results-count {
  color: var(--text-muted);
  font-size: 14px;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.provider-card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.provider-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.provider-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent-tint);
  color: var(--accent-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.provider-name {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-strong);
  margin: 0;
}

.provider-credentials {
  color: var(--text-muted);
  font-weight: 500;
}

.provider-practice {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0;
}

.provider-location {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.specialty-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.specialty-tag {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-tint);
  border-radius: var(--radius-pill);
  padding: 4px 10px;
}

.provider-contact {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.provider-contact a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state h2 {
  color: var(--text-strong);
  margin-bottom: 8px;
}

.data-note {
  max-width: var(--container-max);
  margin: 0 auto 40px;
  padding: 0 20px;
}

.data-note p {
  background: var(--surface-alt);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-muted);
}

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Location/browse pages */

.browse-link {
  display: inline-block;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent-strong);
  text-decoration: none;
}

.breadcrumbs {
  padding: 18px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumbs .sep {
  margin: 0 6px;
  color: var(--border-subtle);
}

.location-page-header {
  padding: 20px 0 24px;
}

.location-page-header h1 {
  font-size: clamp(26px, 3.5vw, 36px);
  color: var(--text-strong);
  margin: 8px 0 10px;
  letter-spacing: -0.01em;
}

.location-page-header p {
  color: var(--text-muted);
  max-width: 640px;
  margin: 0;
}

.browse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin: 20px 0 48px;
}

.browse-card {
  display: block;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
}

.browse-card:hover {
  box-shadow: var(--shadow-card-hover);
}

.browse-card .browse-card-title {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 15px;
  margin-bottom: 4px;
}

.browse-card .browse-card-count {
  color: var(--text-muted);
  font-size: 13px;
}

.sibling-links {
  margin: 40px 0;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.sibling-links h2 {
  font-size: 15px;
  color: var(--text-strong);
  margin: 0 0 10px;
}

.sibling-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.sibling-links a {
  color: var(--accent-strong);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

[hidden] {
  display: none !important;
}

@media (max-width: 560px) {
  .hero {
    padding: 40px 0 28px;
  }

  .search-form {
    flex-direction: column;
  }

  .search-form button {
    width: 100%;
  }
}
