/* ==========================================================================
   Practice Finder (New Patients Inc) — Airtable design system
   Shared token layer + components are kept identical to local-yobi's style.css;
   site-specific rules live in the last section
   Source: claude.ai/artifact/CRiaPkQCwEiaqzi3BJ8UgA (project/tokens.json)
   White canvas · Deep Navy text · NPI Navy accent (#21386c, from npi-logo.png) · Haas type
   ========================================================================== */

:root {
  /* Color — tokens.json */
  --bg: #ffffff;
  --surface: #ffffff;
  --fg: #181d26;
  --fg-2: #333333;
  --muted: rgba(4, 14, 32, 0.69);
  --border: #e0e2e6;
  --border-soft: #eef0f3;
  --accent: #21386c;
  --accent-on: #ffffff;
  --accent-hover: #1b2e59;
  --accent-active: #162649;
  --success: #006400;
  --warn: #eab308;
  --danger: #dc2626;
  /* Rating stars (amber); checkmarks use --success */
  --star: #f59e0b;
  /* README "Light Surface" */
  --surface-soft: #f8fafc;
  /* 12% / 8% tints of the tokens above, flattened on white (no color-mix) */
  --accent-tint: #e4e7ed;
  --success-tint: #e0ece0;
  --danger-tint: #fbe5e5;
  --warn-tint: #fcf6e1;
  --fg-tint: #ecedee;
  /* Top bar: 8% accent on white */
  --header-bg: #edeff3;

  /* Type */
  --font-display: "Haas Groot Disp", Haas, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-body: Haas, -apple-system, system-ui, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 20px;
  --text-xl: 24px;
  --text-2xl: 32px;
  --text-3xl: 40px;
  --text-4xl: 48px;
  --leading-body: 1.35;
  --leading-tight: 1.2;
  --tracking-display: 0;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --section-y-desktop: 96px;
  --section-y-tablet: 64px;
  --section-y-phone: 48px;
  --container-max: 1200px;
  --container-gutter-desktop: 24px;
  --container-gutter-tablet: 16px;
  --container-gutter-phone: 12px;
  --gutter: var(--container-gutter-desktop);

  /* Radius */
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 9999px;

  /* Elevation */
  --elev-ring: 0 0 0 1px var(--border);
  --elev-raised: 0 0 1px rgba(0, 0, 0, 0.32), 0 0 2px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(33, 56, 108, 0.28), inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
  --elev-soft: 0 0 20px rgba(15, 48, 106, 0.05);
  --focus-ring: 0 0 0 3px rgba(33, 56, 108, 0.3);

  /* Legacy aliases — keep older selectors and inline var() uses on-system */
  --primary: var(--accent);
  --primary-hover: var(--accent-hover);
  --primary-light: var(--accent-tint);
  --text: var(--fg);
  --text-secondary: var(--muted);
  --bg-soft: var(--surface-soft);
  --radius: var(--radius-sm);
}

/* ─── Reset & base ─────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  letter-spacing: 0.01em;
  color: var(--fg-2);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--fg);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
}
h1 { font-size: var(--text-3xl); margin: var(--space-8) 0 var(--space-4); }
h2 { font-size: var(--text-xl); margin: var(--space-12) 0 var(--space-4); letter-spacing: 0.12px; }
h3 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-2); letter-spacing: 0.1px; }
h4 { font-size: var(--text-base); }
p { line-height: 1.5; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Links inside running text carry an underline, not color alone (link vs body text is only 2.2:1) */
main p a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
/* Readable measure for body copy (~45–75 characters per line) */
.practice-profile p, .summary, .aeo-summary, .landing-desc, .best-page .intro, .city-intro p,
.taxonomy-page > p, .section-list > p, .faq-item p, .emergency-guide > p, .content { max-width: 32em; }
.nowrap, a[href^="tel:"] { white-space: nowrap; }

img { max-width: 100%; }

/* ─── Header ───────────────────────────────────────────────────────────── */
header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  padding: var(--space-3) var(--gutter);
  position: sticky;
  top: 0;
  z-index: 100;
}
header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: var(--space-2); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-img { height: 28px; width: auto; display: block; }
.logo-divider { color: var(--border); }
.logo-local {
  color: var(--muted);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.07px;
}
.nav-links { display: flex; align-items: center; gap: var(--space-6); }
.nav-links a {
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.07px;
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-cta {
  display: inline-flex;
  align-items: center;
  background: var(--accent) !important;
  color: var(--accent-on) !important;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  letter-spacing: 0.08px;
  text-decoration: none;
}
.nav-cta:hover { background: var(--accent-hover) !important; text-decoration: none; }

/* Nav dropdown */
.nav-dropdown { position: relative; cursor: pointer; }
.nav-dropdown-trigger { color: var(--fg); text-decoration: none; padding: var(--space-2) 0; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--elev-raised);
  min-width: 180px;
  z-index: 100;
  padding: var(--space-2) 0;
}
.nav-dropdown:hover .nav-dropdown-menu { display: block; }
.nav-dropdown-menu a { display: block; padding: var(--space-2) var(--space-4); color: var(--fg) !important; text-decoration: none; }
.nav-dropdown-menu a:hover { background: var(--surface-soft); }

/* Hamburger */
.nav-toggle {
  display: none !important;
  background: none;
  border: 0;
  color: var(--fg);
  font-size: var(--text-xl);
  line-height: 1;
  cursor: pointer;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
}

/* ─── Main ─────────────────────────────────────────────────────────────── */
main { max-width: 1000px; margin: 0 auto; padding: 0 var(--gutter); }

/* ─── Buttons — 12px radius, positive tracking ─────────────────────────── */
.btn-primary,
.btn-secondary,
.claim-button,
.claim-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 500;
  letter-spacing: 0.08px;
  line-height: 1.25;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 150ms cubic-bezier(0.2, 0, 0, 1), border-color 150ms cubic-bezier(0.2, 0, 0, 1), box-shadow 150ms cubic-bezier(0.2, 0, 0, 1);
}
.btn-primary:hover,
.btn-secondary:hover,
.claim-button:hover,
.claim-toggle:hover { text-decoration: none; }
.btn-primary:focus-visible,
.btn-secondary:focus-visible,
.claim-button:focus-visible,
.claim-toggle:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn-primary { background: var(--accent); color: var(--accent-on); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-on); }
.btn-primary:active { background: var(--accent-active); }

.btn-secondary, .claim-toggle, .claim-button { background: var(--surface); color: var(--fg); border-color: var(--border); }
.btn-secondary:hover, .claim-toggle:hover, .claim-button:hover { border-color: var(--fg); color: var(--fg); }

.btn-sm { padding: var(--space-2) var(--space-4); font-size: var(--text-sm); letter-spacing: 0.07px; }
.btn-block { width: 100%; }
button:disabled, .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.button-row { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-4) 0; }
.link-arrow { font-weight: 500; }

/* ─── Chips — one pill shape for every tag, filter, and nav chip ───────── */
.chip,
.state-card,
.filter-btn,
.best-city-link,
.industry-tag,
.tag-list li {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--fg);
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: 0.14px;
  line-height: 1.35;
  text-decoration: none;
}
a.chip:hover,
.state-card:hover,
.filter-btn:hover,
.best-city-link:hover { border-color: var(--fg); color: var(--fg); text-decoration: none; }
.filter-btn.active,
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--accent-on); }
.state-card span,
.state-card .state-count { color: var(--muted); font-weight: 400; }
.state-card .state-name { color: var(--fg); }
.industry-tag { padding: 2px 10px; font-size: var(--text-xs); margin-top: var(--space-1); align-self: flex-start; }

.tag-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.state-grid,
.best-city-grid { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* ─── Badges — status pills ────────────────────────────────────────────── */
.badge,
.claimed-badge,
.new-patients-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.14px;
  line-height: 1.6;
  color: var(--fg-2);
  background: var(--fg-tint);
}
.badge-success,
.badge-accepting,
.claimed-badge,
.new-patients-badge { color: var(--success); background: var(--success-tint); }
.claimed-badge, .new-patients-badge { margin: var(--space-2) 0 var(--space-4); font-size: var(--text-sm); padding: 4px 12px; }
.claimed-badge svg { flex-shrink: 0; }

/* ─── Cards ────────────────────────────────────────────────────────────── */
.practice-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}
.practice-card,
.industry-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-5) var(--space-6);
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-raised);
  color: var(--fg-2);
  text-decoration: none;
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
}
.practice-card:hover,
.industry-card:hover { transform: translateY(-2px); color: var(--fg-2); text-decoration: none; }
.practice-card strong { color: var(--fg); font-size: var(--text-base); font-weight: 500; }
.practice-card .location { color: var(--muted); font-size: var(--text-sm); letter-spacing: 0.07px; }
.rating,
.result-rating { color: var(--fg); font-weight: 500; }
.star { color: var(--star); }
.practice-card .rating { font-size: var(--text-sm); }

.industry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  margin: var(--space-6) 0;
}
.industry-card h3 { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.industry-card p { margin: 0; color: var(--muted); font-size: var(--text-sm); }

/* ─── Hero & search ────────────────────────────────────────────────────── */
.hero { text-align: center; padding: var(--section-y-tablet) 0 var(--space-8); }
.hero h1 { font-size: var(--text-4xl); margin: 0 0 var(--space-4); }
.hero p {
  font-size: var(--text-lg);
  line-height: 1.5;
  letter-spacing: 0.1px;
  color: var(--fg-2);
  max-width: 600px;
  margin: 0 auto var(--space-8);
}

.search-box {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-raised);
  padding: var(--space-6);
  max-width: 650px;
  margin: var(--space-6) auto 0;
  position: relative;
  text-align: left;
}
#find-practice { display: flex; gap: var(--space-2); }
#find-dentist { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
#find-dentist:focus-within { border-color: var(--accent); box-shadow: var(--focus-ring); }

/* Inputs — 12px radius, navy on white */
#search-input,
#search-filter,
#city-search,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  letter-spacing: 0.08px;
  outline: none;
  transition: border-color 150ms cubic-bezier(0.2, 0, 0, 1), box-shadow 150ms cubic-bezier(0.2, 0, 0, 1);
}
#search-filter { width: auto; min-width: 170px; flex: 0 0 auto; cursor: pointer; }
/* Selects: one chevron, inset like the text padding (the native arrow hugs the edge and ignores padding) */
#search-filter,
.form-group select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23525965' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px 14px;
  cursor: pointer;
}
#search-input:focus,
#search-filter:focus,
#city-search:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); box-shadow: var(--focus-ring); }
#search-input:disabled { background: var(--surface-soft); cursor: not-allowed; }
#search-input::placeholder,
#city-search::placeholder,
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--muted); }

.search-loading { text-align: center; padding: var(--space-3); color: var(--muted); font-size: var(--text-sm); }
.search-results-list {
  text-align: left;
  margin-top: var(--space-3);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--elev-raised);
}
.search-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
  color: var(--fg);
  text-decoration: none;
}
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: var(--surface-soft); color: var(--fg); text-decoration: none; }
.result-name { font-weight: 500; color: var(--fg); }
.result-location { color: var(--muted); font-size: var(--text-sm); white-space: nowrap; }
.result-type { color: var(--muted); font-size: var(--text-xs); }
.no-results {
  text-align: center;
  color: var(--muted);
  padding: var(--space-6);
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  margin-top: var(--space-3);
}
.no-results strong { color: var(--fg); }
.no-results-link { display: inline-block; margin-top: var(--space-2); font-weight: 500; }

/* ─── Home sections ────────────────────────────────────────────────────── */
.browse { padding: var(--space-12) 0 var(--space-8); }
.browse h2, .recent h2, .near-you h2, .emergency-browse h2 { margin-top: 0; }
.recent { padding: var(--space-8) 0 var(--space-12); }
.emergency-browse { margin: var(--space-8) 0; }
.emergency-browse > p { color: var(--fg-2); }

.cta-section {
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-12) var(--space-8);
  margin: var(--space-12) auto;
  text-align: center;
  max-width: 900px;
}
.cta-section h2 { margin: 0 0 var(--space-3); font-size: var(--text-2xl); }
.cta-section > p { color: var(--fg-2); max-width: 640px; margin: 0 auto var(--space-6); }
.cta-section .cta-sub { color: var(--muted); font-size: var(--text-sm); margin: var(--space-4) auto 0; }

/* Near you */
.near-you { text-align: center; padding: var(--space-6) 0 var(--space-2); }
.near-you h2 { margin-bottom: var(--space-1); }
.near-you p { color: var(--muted); font-size: var(--text-sm); margin-bottom: var(--space-4); }
.near-you-links { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }
.nearby-cities { width: 100%; margin-top: var(--space-3); font-size: var(--text-sm); color: var(--muted); }
.nearby-cities span { margin-right: var(--space-1); }
.nearby-cities a { margin: 0 var(--space-2); }

/* ─── Taxonomy / list pages ────────────────────────────────────────────── */
.taxonomy-page { padding: var(--space-2) 0 var(--space-12); }
.taxonomy-page > p { color: var(--fg-2); margin-bottom: var(--space-6); }
.section-list { max-width: var(--container-max); margin: 0 auto; padding: var(--space-8) 0; }
.section-list > p { color: var(--fg-2); }

.city-intro {
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  padding: var(--space-5) var(--space-6);
  margin-bottom: var(--space-6);
}
.city-intro p { margin: 0 0 var(--space-2); color: var(--fg-2); }
.city-intro p:last-child { margin-bottom: 0; }
.city-search-box { margin: var(--space-6) 0; }
.best-in-city-section { margin: var(--space-8) 0; }
.best-in-city-section h2 { margin-top: 0; }

.practice-list { list-style: none; }
.practice-list li { padding: var(--space-3) 0; border-bottom: 1px solid var(--border-soft); color: var(--muted); }
.practice-list li a { color: var(--accent); font-weight: 500; }

.industry-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: var(--space-6) 0;
  padding: var(--space-4);
  background: var(--surface-soft);
  border-radius: var(--radius-md);
}
.industry-filter-bar span { color: var(--muted); font-weight: 500; font-size: var(--text-sm); }

.breadcrumbs { font-size: var(--text-sm); color: var(--muted); margin: var(--space-6) 0 var(--space-4); letter-spacing: 0.07px; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-2); }
.breadcrumbs li + li::before { content: "›"; color: var(--muted); }
.breadcrumbs [aria-current="page"] { color: var(--fg-2); }
.breadcrumbs + h1 { margin-top: 0; }

/* Practice page — internal links to nearby practices and city / best / emergency hubs */
.nearby-list { list-style: none; columns: 2; column-gap: var(--space-6); margin: 0 0 var(--space-5); }
.nearby-list li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border-soft); break-inside: avoid; }
.nearby-list a { font-weight: 500; }
.nearby-rating { color: var(--fg); font-size: var(--text-sm); margin-left: var(--space-1); white-space: nowrap; }
.nearby-hubs { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* Markdown body copy ({{ .Content }} on hub/list pages) — the reset strips <p> margins */
.content { color: var(--fg-2); font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0.1px; max-width: 32em; margin-bottom: var(--space-8); }
.content > * + * { margin-top: var(--space-4); }
.content ul, .content ol { padding-left: var(--space-6); }
.content h2, .content h3 { margin-top: var(--space-8); }
.emergency-hub h2 { margin-top: 0; }

/* City grid (emergency hub) */
.city-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--space-3); }
.city-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: var(--elev-ring);
  color: var(--fg);
  font-size: var(--text-sm);
  text-decoration: none;
}
.city-row:hover { box-shadow: 0 0 0 1px var(--fg); color: var(--fg); text-decoration: none; }
.city-row strong { font-weight: 500; }
.city-row-count { color: var(--muted); font-size: var(--text-xs); white-space: nowrap; }

/* 404 */
.page-404 { text-align: center; padding: var(--section-y-tablet) 0; }
.page-404 p { color: var(--muted); margin-bottom: var(--space-8); }
.page-404 .page-404-links { margin: var(--space-8) 0 0; }

/* ─── Practice profile ─────────────────────────────────────────────────── */
.practice-profile { padding-bottom: var(--space-8); }
.practice-profile h1 { margin: var(--space-8) 0 var(--space-4); }
.summary { font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0.1px; color: var(--fg-2); margin-bottom: var(--space-6); }

.claim-banner-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin: var(--space-2) 0 var(--space-4);
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--fg-2);
}
.claim-banner-top strong { color: var(--fg); font-weight: 500; }
.claim-banner-top .btn-secondary { white-space: nowrap; }

.appointment-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin: var(--space-6) 0;
  padding: var(--space-6);
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
}
.appointment-cta:empty { display: none; }
.btn-cta { font-size: var(--text-lg); padding: 14px 32px; }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-2); margin: var(--space-6) 0; }
.photo-tile { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--surface-soft); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Tables */
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--space-3) 0;
  border-radius: var(--radius-md);
  box-shadow: var(--elev-ring);
  overflow: hidden;
}
th, td { padding: var(--space-3) var(--space-4); text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
thead th { border-bottom: 1px solid var(--border); }
th { background: var(--surface-soft); font-weight: 500; color: var(--fg); font-size: var(--text-sm); letter-spacing: 0.07px; }
td { color: var(--fg-2); overflow-wrap: anywhere; }
.info-table th { width: 35%; }
.hours-table { max-width: 400px; }
.hours-table th { background: transparent; }

/* Services */
.services ul { columns: 2; list-style: none; padding: 0; }
.services li { margin-bottom: var(--space-2); padding-left: var(--space-6); position: relative; break-inside: avoid; }
.services li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 500; }

.patient-highlights ul { list-style: none; padding: 0; }
.patient-highlights li { padding: var(--space-2) 0; border-bottom: 1px solid var(--border-soft); }

/* Reviews */
.reviews-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-4); margin: var(--space-12) 0 var(--space-4); }
.reviews-head h2 { margin: 0; }
.reviews-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-5);
  background: var(--surface-soft);
  border-radius: var(--radius-md);
}
.reviews-summary strong { color: var(--fg); font-size: var(--text-lg); font-weight: 500; }
.reviews-summary .reviews-basis { color: var(--muted); }
.stars { color: var(--star); letter-spacing: 2px; }
.stars-lg { font-size: var(--text-xl); }
.review {
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-ring);
}
.review-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); margin-bottom: var(--space-2); }
.review-head strong { color: var(--fg); font-weight: 500; }
.review-date { color: var(--muted); font-size: var(--text-sm); }
.review-rating { margin-bottom: var(--space-2); }
.review-title { font-weight: 500; color: var(--fg); margin-bottom: var(--space-1); }
.review-body { margin: 0; color: var(--fg-2); }
.owner-response { margin-top: var(--space-3); padding: var(--space-3) var(--space-4); background: var(--surface-soft); border-radius: var(--radius-sm); }
.owner-response-head { font-size: var(--text-sm); color: var(--fg); font-weight: 500; margin-bottom: var(--space-1); }
.owner-response-body { color: var(--fg-2); line-height: 1.5; }
.reviews-empty { color: var(--muted); }

/* Review modal (display toggled inline by JS) */
.review-overlay { position: fixed; inset: 0; background: rgba(24, 29, 38, 0.5); z-index: 9999; align-items: center; justify-content: center; }
.review-modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-raised);
  padding: var(--space-8);
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}
.review-modal-head { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.review-modal-head h3 { margin: 0; }
.modal-close { background: none; border: 0; font-size: var(--text-xl); line-height: 1; cursor: pointer; color: var(--muted); padding: var(--space-1); border-radius: var(--radius-sm); }
.modal-close:hover { color: var(--fg); }
.rating-picker { font-size: var(--text-2xl); letter-spacing: 0.4rem; cursor: pointer; user-select: none; }
.rating-picker span { color: transparent; -webkit-text-stroke: 1.5px var(--muted); }
.rating-picker .is-on { color: var(--star); -webkit-text-stroke: 1.5px var(--star); }
.field-help { color: var(--muted); font-size: var(--text-xs); letter-spacing: 0.07px; }
.otp-input { letter-spacing: 4px; }
.review-status { margin-bottom: var(--space-4); color: var(--muted); font-size: var(--text-sm); }
.review-status.is-success { color: var(--success); }
.review-status.is-error { color: var(--danger); }

/* FAQ */
.faq p, .faq-item p { margin-bottom: var(--space-4); color: var(--fg-2); }
.faq h3, .faq-item h3 { font-size: var(--text-base); font-weight: 500; letter-spacing: 0.08px; }

/* Appointment CTA (bottom) */
.cta {
  background: var(--surface-soft);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-top: var(--space-8);
}
.cta h2 { margin-top: 0; }
.cta-yobi { margin-top: var(--space-4); display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.cta-logo { height: 20px; vertical-align: middle; }
.cta-buttons { display: flex; gap: var(--space-3); margin-top: var(--space-5); flex-wrap: wrap; }

/* Claim listing */
.claim-listing {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-raised);
  padding: var(--space-8);
  margin-top: var(--space-8);
}
.claim-listing h2 { margin-top: 0; }
.claim-listing p { color: var(--fg-2); margin-bottom: var(--space-4); }
.claim-header p { color: var(--fg-2); }
.claim-benefits { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-6); margin: var(--space-5) 0 var(--space-6); }
.claim-benefit { display: flex; align-items: flex-start; gap: var(--space-3); color: var(--fg-2); }
.benefit-icon {
  flex: 0 0 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  background: var(--success-tint);
  color: var(--success);
  font-size: var(--text-xs);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.claim-note { color: var(--muted) !important; font-size: var(--text-xs); margin: var(--space-3) 0 0 !important; }
.claim-box--verified h2 { color: var(--success); }

/* Listing forms (claim + request) */
.listing-form { margin-top: var(--space-6); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); margin-bottom: var(--space-4); }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4); }
.form-group label { font-size: var(--text-sm); font-weight: 500; color: var(--fg); letter-spacing: 0.07px; }
.form-group textarea { resize: vertical; }
.required { color: var(--danger); }
.listing-form .btn-primary { margin-top: var(--space-2); }
.form-success {
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--success-tint);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Doctor-to-practice link */
.practice-link {
  padding: var(--space-3) var(--space-4);
  background: var(--surface-soft);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
}
.practice-link a { font-weight: 500; }

/* ─── Landing pages (insurance / language / procedure / best-in-state) ─── */
.landing-page { max-width: 900px; margin: 0 auto; padding: var(--space-6) 0; }
.landing-page h1 { margin-top: var(--space-2); }
.landing-desc { color: var(--fg-2); font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0.1px; }
.callout {
  background: var(--surface-soft);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: var(--space-6) 0;
}
.callout strong { color: var(--fg); font-weight: 500; }
.callout p { margin: var(--space-2) 0 0; color: var(--fg-2); font-size: var(--text-sm); }
.landing-results { display: grid; gap: var(--space-3); }
.landing-results .practice-card { display: block; }
.pc-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); flex-wrap: wrap; }
.pc-meta { color: var(--muted); font-size: var(--text-sm); margin-top: var(--space-1); }
.pc-phone { color: var(--accent); font-size: var(--text-sm); margin-top: var(--space-1); }
.results-note { color: var(--muted); text-align: center; margin-top: var(--space-4); }
.empty-note { color: var(--muted); text-align: center; margin: var(--space-8) 0; }
.browse-more { margin-top: var(--space-8); padding-top: var(--space-6); border-top: 1px solid var(--border); }
.browse-more h2 { font-size: var(--text-lg); margin-top: 0; }
.browse-more ul { columns: 2; column-gap: var(--space-6); list-style: none; padding: 0; }
.browse-more li { margin-bottom: var(--space-2); }

/* ─── Best-in-city ─────────────────────────────────────────────────────── */
.best-page { max-width: 800px; margin: 0 auto; padding: var(--space-4) 0 var(--space-8); }
.best-page h1 { margin: 0 0 var(--space-3); }
.best-page .intro { color: var(--fg-2); font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0.1px; margin-bottom: var(--space-8); }
.best-list { margin: var(--space-8) 0; display: grid; gap: var(--space-4); }
.best-card {
  position: relative;
  padding: var(--space-5) var(--space-6) var(--space-5) 72px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-raised);
}
.best-card p { color: var(--fg-2); margin-top: var(--space-1); }
.best-card h2 { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.best-card h2 a { color: var(--fg); }
.best-card h2 a:hover { color: var(--accent); }
.rank,
.card-rank {
  position: absolute;
  top: var(--space-5);
  left: var(--space-5);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-pill);
  background: var(--fg-tint);
  color: var(--fg);
  font-weight: 500;
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.best-page .view-all { margin-top: var(--space-8); font-size: var(--text-base); font-weight: 500; }

/* ─── Emergency dentist pages ──────────────────────────────────────────── */
.emergency-page { padding-bottom: var(--space-8); }
.emergency-page h1 { margin-top: 0; }
.aeo-summary { font-size: var(--text-lg); line-height: 1.5; letter-spacing: 0.1px; color: var(--fg-2); margin-bottom: var(--space-6); }
.aeo-summary strong { color: var(--fg); font-weight: 500; }
.stats-row { table-layout: fixed; }
.stats-row th, .stats-row td { text-align: center; }
.stats-row td strong { font-family: var(--font-display); font-size: var(--text-xl); font-weight: 500; color: var(--fg); }
.emergency-list { display: grid; gap: var(--space-4); margin: var(--space-8) 0; }
.emergency-card {
  position: relative;
  padding: var(--space-5) var(--space-6) var(--space-5) 72px;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--elev-raised);
}
.card-name { margin: 0 0 var(--space-1); font-size: var(--text-lg); }
.card-name a { color: var(--fg); }
.card-name a:hover { color: var(--accent); }
.card-body p { margin-top: var(--space-1); color: var(--fg-2); }
.card-address, .card-hours, .card-specialties { font-size: var(--text-sm); }
.card-rating .review-count { color: var(--muted); }
.card-badges { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-2); margin: var(--space-3) 0; }
.view-more { color: var(--muted); text-align: center; }
.emergency-guide > p { color: var(--fg-2); }
.related-cities ul { list-style: none; columns: 2; column-gap: var(--space-6); }
.related-cities li { margin-bottom: var(--space-2); }
.city-count { color: var(--muted); font-size: var(--text-sm); }

/* ─── Request listing page ─────────────────────────────────────────────── */
.request-listing-page { padding-bottom: var(--space-12); }
.page-header { text-align: center; padding: var(--space-12) 0 var(--space-6); }
.page-header h1 { margin: 0 0 var(--space-3); }
.page-header p { color: var(--fg-2); font-size: var(--text-lg); }
.request-listing-page .listing-form {
  max-width: 700px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elev-raised);
  padding: var(--space-8);
}
.request-listing-page h2 { font-size: var(--text-lg); margin: var(--space-6) 0 var(--space-3); }
.request-listing-page h2:first-of-type { margin-top: 0; }
.embed-frame-wrap { max-width: 700px; margin: 0 auto; }
.embed-frame { display: block; border: 0; border-radius: var(--radius-md); }

/* ─── Footer ───────────────────────────────────────────────────────────── */
footer {
  background: var(--surface-soft);
  border-top: 1px solid var(--border);
  color: var(--muted);
  padding: var(--space-12) var(--gutter) var(--space-6);
  margin-top: var(--space-12);
  font-size: var(--text-sm);
  letter-spacing: 0.07px;
}
.footer-content {
  display: flex;
  gap: 64px;
  max-width: var(--container-max);
  margin: 0 auto;
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border);
}
.footer-brand { max-width: 300px; }
.footer-logo-text { display: block; margin-bottom: var(--space-3); text-decoration: none; }
.footer-brand p { color: var(--muted); }
.footer-links { display: flex; gap: var(--space-12); }
.footer-col { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col h4 { font-size: var(--text-sm); margin-bottom: var(--space-1); letter-spacing: 0.07px; }
.footer-col a, .footer-social a { color: var(--fg-2); text-decoration: none; }
.footer-col a:hover, .footer-social a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-max);
  margin: var(--space-4) auto 0;
}
.footer-social { display: flex; gap: var(--space-5); }

/* ─── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1023px) {
  :root { --gutter: var(--container-gutter-tablet); }
}

@media (max-width: 768px) {
  h1 { font-size: var(--text-2xl); }
  .hero { padding-top: var(--space-12); }
  .hero h1 { font-size: var(--text-2xl); }
  .cta-section h2 { font-size: var(--text-xl); }
  .services ul, .browse-more ul, .related-cities ul, .nearby-list { columns: 1; }
  .practice-cards { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .claim-benefits { grid-template-columns: 1fr; }
  #find-practice, #find-dentist { flex-direction: column; }
  #search-filter { width: 100%; }
  #find-dentist button { width: 100%; }
  .search-box { padding: var(--space-4); border-radius: var(--radius-md); }
  .search-result-item { flex-direction: column; align-items: flex-start; gap: var(--space-1); }
  .footer-content { flex-direction: column; gap: var(--space-8); }
  .footer-links { flex-wrap: wrap; gap: var(--space-8); }
  .footer-bottom { flex-direction: column; gap: var(--space-2); text-align: center; }
  .form-grid { grid-template-columns: 1fr; }
  .claim-listing, .cta, .cta-section, .request-listing-page .listing-form { padding: var(--space-6) var(--space-5); }
  .best-card, .emergency-card { padding-left: 64px; }
  .rank, .card-rank { left: var(--space-4); }
  .btn-cta { font-size: var(--text-base); padding: 14px 20px; }

  .nav-toggle { display: block !important; }
  header nav { position: relative; }
  .nav-links {
    display: none !important;
    flex-direction: column;
    align-items: stretch;
    position: absolute;
    top: calc(100% + var(--space-3));
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--elev-soft);
    padding: var(--space-2) var(--gutter) var(--space-4);
    gap: 0;
    z-index: 99;
  }
  .nav-links a { padding: var(--space-3) 0; font-size: var(--text-base); border-bottom: 1px solid var(--border-soft); }
  .nav-links a:last-child { border-bottom: 0; }
  .nav-links.open { display: flex !important; }
  .nav-dropdown-menu { position: static; box-shadow: none; background: transparent; padding: 0 0 0 var(--space-4); }
}

@media (max-width: 639px) {
  :root { --gutter: var(--container-gutter-phone); }
  h1, .hero h1 { font-size: var(--text-xl); }
  .summary, .aeo-summary, .landing-desc, .best-page .intro, .hero p, .content { font-size: var(--text-base); }
  .info-table th { width: 40%; }
  th, td { padding: var(--space-2) var(--space-3); }
  .stats-row th { font-size: var(--text-xs); }
  .stats-row td strong { font-size: var(--text-lg); }
}

/* ==========================================================================
   Practice Finder (New Patients Inc) — site-specific components on the tokens
   ========================================================================== */
.npi-topbar { display: none; }
/* npi-logo.png is 300×125 with no width/height attrs: aspect-ratio reserves its box before load */
.npi-header .logo-img { height: 36px; width: auto; aspect-ratio: 300 / 125; }
.logo-divider { color: var(--border); font-weight: 400; }

/* Footer brand block */
.footer-brand img { display: block; }
.footer-phone { margin-top: var(--space-3); }
.footer-phone a { color: var(--fg); font-size: var(--text-lg); font-weight: 500; letter-spacing: 0.1px; }
.footer-phone a:hover { color: var(--accent); }

/* Home: review count on practice cards */
.practice-card .reviews { color: var(--muted); font-size: var(--text-xs); }

/* Second CTA band (NPI marketing) — Deep Navy section with the white button */
.cta-section--dark { background: var(--fg); }
.cta-section--dark h2 { color: #ffffff; }
.cta-section--dark > p { color: rgba(249, 252, 255, 0.8); }
.btn-white { background: #ffffff; color: var(--fg); border-color: #ffffff; }
.btn-white:hover { background: rgba(249, 252, 255, 0.97); color: var(--fg); border-color: #ffffff; }
.btn-white:focus-visible { box-shadow: 0 0 0 3px rgba(249, 252, 255, 0.5); }

/* For-dentists marketing page */
.fd-section { max-width: 900px; margin: var(--space-12) auto; }
.fd-section > h2 { text-align: center; margin: 0 0 var(--space-8); }
.fd-claim { display: grid; grid-template-columns: 1fr auto; gap: var(--space-6); align-items: center; padding: var(--space-6); }
.fd-claim h2 { margin: 0 0 var(--space-2); font-size: var(--text-xl); }
.fd-claim p { margin: 0; font-size: var(--text-base); line-height: 1.5; }
.fd-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: var(--space-5); margin-bottom: var(--space-12); }
.fd-card { padding: var(--space-6); background: var(--surface); border-radius: var(--radius-md); box-shadow: var(--elev-raised); }
.fd-card h3 { margin: 0 0 var(--space-2); }
.fd-card p { color: var(--muted); }
.fd-closing { margin: 0 0 var(--space-8); }
.fd-closing h3 { margin: 0 0 var(--space-2); font-size: var(--text-xl); }
.fd-closing .fd-call { color: var(--muted); font-size: var(--text-sm); margin: var(--space-4) auto 0; }
.fd-closing .fd-call a { font-weight: 500; }

@media (max-width: 768px) {
  .fd-claim { grid-template-columns: 1fr; }
  .nav-links .nav-cta { justify-content: center; padding: var(--space-3) var(--space-4); margin-top: var(--space-2); }
}
