:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #efece5;
  --ink: #1b272b;
  --muted: #5a696d;
  --line: #e2ddd3;
  --accent: #1f6f6b;
  --accent-hover: #185a57;
  --accent-ink: #ffffff;
  --accent-soft: #e2efec;
  --brand-glyph: #ffffff;
  --focus: #2f8f89;
  --warn-bg: #fbf1dc;
  --warn-ink: #7a5213;
  --shadow: 0 1px 2px rgba(27, 39, 43, .05), 0 4px 16px rgba(27, 39, 43, .05);
  --radius: 14px;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1719;
    --surface: #152124;
    --surface-2: #1a292c;
    --ink: #e6eeec;
    --muted: #9aaeae;
    --line: #25373b;
    --accent: #5cc3b8;
    --accent-hover: #7fd3ca;
    --accent-ink: #08201e;
    --accent-soft: #173331;
    --brand-glyph: #08201e;
    --focus: #7fd3ca;
    --warn-bg: #3a2e16;
    --warn-ink: #f0cf8e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1719; --surface: #152124; --surface-2: #1a292c; --ink: #e6eeec; --muted: #9aaeae; --line: #25373b;
  --accent: #5cc3b8; --accent-hover: #7fd3ca; --accent-ink: #08201e; --accent-soft: #173331; --brand-glyph: #08201e;
  --focus: #7fd3ca; --warn-bg: #3a2e16; --warn-ink: #f0cf8e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
svg { width: 1em; height: 1em; flex: none; }
[hidden] { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.crisis {
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  padding: 7px 16px;
  border-bottom: 1px solid var(--line);
}
.crisis a { color: var(--ink); }

/* header */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 19px; letter-spacing: -.01em; }
.brand b { color: var(--accent); font-weight: 650; }
.brand-mark { width: 30px; height: 30px; color: var(--accent); }
.nav { display: flex; gap: 18px; }
.nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--ink); }

/* hero + search */
.hero { padding: 40px 0 28px; }
.hero h1 {
  font-family: var(--serif);
  font-weight: 560;
  font-size: clamp(30px, 5vw, 46px);
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0 0 12px;
  max-width: 17em;
  text-wrap: balance;
}
.lede { color: var(--muted); font-size: 17px; max-width: 40em; margin: 0 0 26px; text-wrap: pretty; }

.search {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.field { display: flex; flex-direction: column; gap: 5px; grid-column: span 4; min-width: 0; }
.field-zip { grid-column: span 3; }
.field-radius { grid-column: span 3; }
.field-name { grid-column: span 6; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .01em; }
input[type="search"], input:not([type]), select {
  width: 100%;
  height: 44px;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  appearance: none;
  -webkit-appearance: none;
}
select {
  padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}
input:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.zip-row { display: flex; gap: 8px; }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.icon-btn svg circle:first-child { fill: currentColor; stroke: none; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn.busy { opacity: .6; cursor: progress; }

.checks { grid-column: span 9; display: grid; gap: 8px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; user-select: none; }
.name .acc-badge { margin-left: 8px; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); margin: 0; }
.link-btn { grid-column: span 3; justify-self: end; align-self: center; background: none; border: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; padding: 6px; }
.link-btn:hover { color: var(--ink); }

/* results */
.results-wrap { padding-bottom: 48px; scroll-margin-top: 12px; }
.results-bar { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 8px 0 14px; flex-wrap: wrap; }
.count { font-family: var(--serif); font-weight: 560; font-size: 23px; margin: 0; letter-spacing: -.01em; }
.sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); }
.sort select { height: 38px; width: auto; font-size: 15px; background-color: var(--surface); }
.zip-note { color: var(--muted); font-size: 14px; margin: -6px 0 14px; }

.list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.card.has-site { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.name { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.25; margin: 0 0 6px; letter-spacing: -.005em; }
.name a { color: inherit; text-decoration: none; }
.name a:hover { color: var(--accent); text-decoration: underline; }
.deg { font-family: var(--sans); font-size: 13px; font-weight: 650; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 2px 7px; margin-left: 9px; vertical-align: 3px; letter-spacing: .03em; }
.deg:empty { display: none; }
.chips { list-style: none; padding: 0; margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 13px; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.where, .tel, .lic { display: flex; align-items: flex-start; gap: 8px; margin: 3px 0; font-size: 15px; }
.where svg, .tel svg { margin-top: 4px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.tel a { color: var(--ink); text-decoration: none; }
.tel a:hover { color: var(--accent); text-decoration: underline; }
.lic { color: var(--muted); font-size: 14px; margin-top: 8px; }
.lic-note { font-size: 13.5px; color: var(--warn-ink); background: var(--warn-bg); border-radius: 8px; padding: 5px 10px; margin: 6px 0 0; width: fit-content; max-width: 100%; }
.pending { display: inline-block; width: 14em; max-width: 100%; height: .9em; border-radius: 4px; background: var(--surface-2); vertical-align: middle; }
.more-info { margin-top: 8px; font-size: 14px; }
.more-info summary { cursor: pointer; color: var(--muted); width: fit-content; }
.more-info summary:hover { color: var(--ink); }
.more-body { padding: 8px 0 0; color: var(--muted); }
.more-body h4 { margin: 8px 0 2px; font-size: 13px; color: var(--ink); }
.more-body ul { margin: 0; padding-left: 18px; }
.more-body a { color: var(--muted); }

.card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; min-width: 180px; }
.dist { font-size: 14px; font-weight: 600; color: var(--ink); background: var(--surface-2); border-radius: 999px; padding: 3px 10px; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 600; font-size: 15px;
  transition: background .15s;
}
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-primary svg { fill: none; stroke: currentColor; stroke-width: 2; }
.site-domain { font-size: 13px; color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.skeleton { min-height: 138px; background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; }
@keyframes shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }

.empty { text-align: center; padding: 40px 16px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-family: var(--serif); font-size: 20px; margin-bottom: 4px; }
.more-row { display: flex; justify-content: center; margin-top: 18px; }
.btn-secondary { height: 44px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* about + footer */
.about { background: var(--surface); border-top: 1px solid var(--line); padding: 44px 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about h2 { font-family: var(--serif); font-weight: 560; font-size: 24px; margin: 0 0 10px; }
.about p { color: var(--muted); margin: 0 0 12px; max-width: 34em; }
.about .fine { font-size: 14px; }
.site-footer { border-top: 1px solid var(--line); padding: 18px 0 28px; color: var(--muted); font-size: 13.5px; }
.footer-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-more { margin-top: 10px; }

/* static directory pages (profiles, states, cities, specialties) */
.page { padding: 24px 16px 48px; }
.page h1 { font-family: var(--serif); font-weight: 560; font-size: clamp(28px, 4.2vw, 40px); line-height: 1.12; letter-spacing: -.012em; margin: 6px 0 10px; text-wrap: balance; }
.page h1 small { font-size: .5em; color: var(--muted); font-family: var(--sans); font-weight: 500; }
.page h2 { font-family: var(--serif); font-weight: 560; font-size: 22px; margin: 26px 0 10px; }
.page .lede { color: var(--muted); font-size: 17px; margin: 0 0 16px; max-width: 46em; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; font-size: 14px; color: var(--muted); }
.crumbs li + li::before { content: "›"; margin-right: 6px; }
.crumbs a { color: var(--muted); }
.dir-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.dir-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.dir-row.has-site { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.dir-name { font-family: var(--serif); font-weight: 600; font-size: 19px; color: var(--ink); text-decoration: none; }
.dir-name:hover { color: var(--accent); text-decoration: underline; }
.dir-row .chips { margin: 6px 0 4px; }
.dir-meta { margin: 0; color: var(--muted); font-size: 14.5px; }
.dir-meta a { color: var(--ink); }
.dir-row .btn-primary { flex: none; height: 38px; font-size: 14px; }
.spec-links { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 15px; }
.city-grid { list-style: none; padding: 0; margin: 10px 0 18px; columns: 4 200px; column-gap: 24px; font-size: 15px; }
.city-grid li { break-inside: avoid; padding: 3px 0; }
.city-grid span { color: var(--muted); font-size: 13px; }
.pager { display: flex; gap: 16px; align-items: center; justify-content: center; margin: 18px 0; color: var(--muted); }
.profile-head .btn-primary { margin-right: 10px; }
.profile-card { display: block; margin-top: 10px; }
.profile-card h2 { margin-top: 6px; }
.loc-list, .lic-list { margin: 0 0 8px; padding-left: 18px; }
.loc-list li { margin-bottom: 8px; }
.near-list { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 6px; font-size: 15.5px; }
.near-list span { color: var(--muted); font-size: 14px; }
.browse { padding-top: 8px; padding-bottom: 36px; }
.acc-badge { display: inline-block; font-family: var(--sans); font-size: 12.5px; font-weight: 650; border-radius: 999px; padding: 2px 10px; vertical-align: 3px; letter-spacing: .01em; }
.acc-yes { color: #145c34; background: #dcf2e3; }
.acc-wait { color: var(--warn-ink); background: var(--warn-bg); }
.acc-no { color: var(--muted); background: var(--surface-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .acc-yes { color: #9fe0b5; background: #173a26; } }
.listing-card { display: block; margin-top: 14px; }
.listing-card h2 { margin-top: 4px; }
.facts { padding-left: 18px; margin: 6px 0 10px; }
.bio { white-space: pre-line; }
.claim-link { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.claim .claim-card { display: grid; gap: 14px; max-width: 620px; grid-template-columns: 1fr; margin: 8px 0 26px; }
.claim .claim-card > * { grid-column: 1 / -1; }  /* the search form's .field spans 4 columns; not here */
.claim .field { display: grid; gap: 6px; border: 0; padding: 0; margin: 0; }
.claim .field > span, .claim legend { font-size: 14px; font-weight: 600; color: var(--muted); }
.claim input:not([type=radio]):not([type=checkbox]), .claim textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.claim input:not([type=radio]):not([type=checkbox]) { height: 44px; }
.claim .check { font-size: 15px; }
.claim .check.danger { color: #9b2c2c; }
.claim .btn-primary { justify-self: start; border: 0; cursor: pointer; font-family: inherit; }
.claim .claim-card > h2:first-child { margin-top: 0; }
.claim .claim-card p { margin: 0; }
.claim .btn-primary:disabled { opacity: .6; cursor: progress; }
.form-msg.error, .claim-card.error { color: #9b2c2c; }
.claim .idcheck-offer { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.claim .idcheck-offer p { margin-top: 4px; }
.claim-help ol { padding-left: 18px; }
.browse h2 { font-family: var(--serif); font-weight: 560; font-size: 24px; margin: 0 0 8px; }
.fine { font-size: 14px; color: var(--muted); }

@media (max-width: 820px) {
  .field, .field-zip, .field-radius, .field-name { grid-column: span 6; }
  .checks { grid-column: span 12; }
  .link-btn { grid-column: span 12; justify-self: start; padding-left: 0; }
  .about-grid { grid-template-columns: 1fr; gap: 12px; }
}
@media (max-width: 560px) {
  .dir-row { flex-direction: column; }
  .dir-row .btn-primary { width: 100%; justify-content: center; }
  .hero { padding: 26px 0 18px; }
  .lede { font-size: 16px; }
  .search { padding: 14px; gap: 12px; }
  .field-name { grid-column: span 12; }
  .field, .field-zip, .field-radius { grid-column: span 6; }
  .card { grid-template-columns: 1fr; padding: 16px; gap: 10px; }
  .card-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; text-align: left; min-width: 0; }
  .card-side .dist { order: -1; }
  .card-side .btn-primary { width: 100%; justify-content: center; }
  .card-side:not(:has(:not([hidden]))) { display: none; }
  .name { font-size: 20px; }
}
