:root {
  --bg: #f7f5f0;
  --panel: #ffffff;
  --ink: #1f2428;
  --muted: #667078;
  --line: #ded8ce;
  --accent: #b6422c;
  --accent-dark: #8f321f;
  --soft: #f1e8dd;
  --radius: 8px;
  --shadow: 0 18px 45px rgba(38, 31, 25, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  color: var(--ink);
  min-height: 100%;
}

body {
  font-family:
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
  margin: 0;
  min-height: 100%;
}

a {
  color: var(--accent-dark);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.page-shell {
  margin: 0 auto;
  max-width: 1240px;
  padding: 32px 20px;
}

.masthead {
  border-bottom: 1px solid var(--line);
  padding: 18px 0 24px;
}

.masthead-grid {
  align-items: end;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.eyebrow,
.kicker {
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 7vw, 76px);
  letter-spacing: -0.03em;
  line-height: 0.96;
  margin-bottom: 18px;
  max-width: 760px;
}

h2 {
  font-size: clamp(22px, 2vw, 30px);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 0;
}

h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 6px;
}

.tagline {
  color: var(--muted);
  font-size: 18px;
  margin-bottom: 0;
  max-width: 720px;
}

.note {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.note p {
  color: var(--muted);
  font-size: 14px;
  margin: 6px 0 0;
}

.toolbar,
.sort-row,
.actions,
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar {
  margin-top: 24px;
}

.tab,
.sort-button,
.button-link,
.card a {
  align-items: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 14px;
  font-weight: 650;
  min-height: 38px;
  padding: 8px 14px;
  text-decoration: none;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.tab:hover,
.sort-button:hover,
.button-link:hover,
.card a:hover {
  border-color: rgba(182, 66, 44, 0.35);
  transform: translateY(-1px);
}

.tab.is-active,
.sort-button.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.layout {
  margin-top: 28px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-title {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.directory-panel {
  margin: 0 auto;
  max-width: 980px;
  min-width: 0;
  width: 100%;
}

.search-wrap {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  gap: 10px;
  min-height: 42px;
  min-width: min(100%, 340px);
  padding: 0 14px;
}

.search-wrap span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.search-wrap input {
  background: transparent;
  border: 0;
  min-width: 0;
  outline: none;
  width: 100%;
}

.sort-row {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 14px;
}

.sort-button {
  min-height: 34px;
  padding: 6px 12px;
}

.cards {
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  grid-template-columns: auto minmax(0, 1fr);
  padding: 16px;
}

.rank {
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--accent);
  display: grid;
  font-size: 13px;
  font-weight: 800;
  height: 42px;
  justify-items: center;
  width: 42px;
}

.card h3 {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.area-pill,
.tag {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 6px 9px;
}

.area-pill {
  background: var(--soft);
  color: var(--accent-dark);
}

.meta {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 8px;
}

.name-help {
  color: var(--muted);
  font-size: 14px;
  margin: -2px 0 8px;
}

.specialty {
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 8px;
}

.blurb {
  margin-bottom: 12px;
}

.tag {
  background: var(--bg);
  color: var(--muted);
}

.pulse {
  background: #f8f2ea;
  border-radius: var(--radius);
  color: var(--muted);
  display: block;
  font-size: 13px;
  line-height: 1.45;
  margin-bottom: 12px;
  padding: 9px 11px;
}

.pulse strong {
  color: var(--ink);
}

.card a {
  min-height: 34px;
  padding: 6px 12px;
}

.empty {
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 920px) {
  .masthead-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .page-shell {
    padding: 20px 14px;
  }

  .masthead {
    padding-top: 6px;
  }

  .note {
    display: none;
  }

  .panel {
    padding: 14px;
  }

  .panel-title {
    align-items: stretch;
    flex-direction: column;
  }

  .directory-title {
    gap: 12px;
  }

  .search-wrap {
    width: 100%;
  }

  .card {
    grid-template-columns: 1fr;
  }

  .rank {
    border-radius: var(--radius);
    height: 34px;
    width: 48px;
  }
}
