/* Patient-web UI kit styles */
@import url("./colors_and_type.css");

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity:1; } 50% { opacity:.3; } }

.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ===== Masthead ===== */
.masthead {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-8);
  background: var(--paper);
  border-bottom: 0.5px solid var(--ink-5);
  position: sticky; top: 0; z-index: 50;
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink-1); }
.brand:hover { color: var(--ink-1); }
.wordmark { font-family: var(--font-display); font-size: 22px; font-weight: 500; letter-spacing: -0.02em; }
.nav-links { display: flex; gap: var(--s-6); }
.nav-links a { font-size: 14px; text-decoration: none; color: var(--ink-2); }
.nav-links a:hover { color: var(--ink-1); }
.nav-right { display: flex; align-items: center; gap: var(--s-3); }

.lang-toggle { display: inline-flex; background: var(--bone); border-radius: 999px; padding: 2px; }
.lang-toggle button { background: transparent; border: none; padding: 6px 12px; font-size: 13px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-family: inherit; }
.lang-toggle button.active { background: var(--paper); color: var(--ink-1); box-shadow: var(--shadow-soft); }

/* ===== Buttons ===== */
.btn {
  font-family: var(--font-body); font-weight: 500; cursor: pointer;
  border: 0.5px solid transparent; border-radius: var(--r-4);
  transition: background var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-out);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:active { transform: scale(0.98); }
.btn-md { font-size: 15px; padding: 14px 22px; }
.btn-sm { font-size: 13px; padding: 10px 16px; }
.btn-lg { font-size: 16px; padding: 16px 28px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #122E47; }
.btn-seal { background: var(--seal); color: #fff; }
.btn-seal:hover { background: #A03E25; }
.btn-secondary { background: transparent; color: var(--ink-1); border-color: var(--ink-1); }
.btn-secondary:hover { background: var(--bone); }
.btn-tertiary { background: var(--bone); color: var(--ink-1); border-color: var(--ink-5); }
.btn-tertiary:hover { background: var(--bone-2); }
.btn-ghost { background: transparent; color: var(--ink-1); border: none; padding: 8px 12px; }
.btn-ghost:hover { color: var(--seal); }
.btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ===== Cards ===== */
.card {
  background: var(--bone);
  border: 0.5px solid var(--ink-5);
  border-radius: var(--r-5);
  padding: var(--s-6);
  box-shadow: var(--shadow-soft);
}
.card-paper { background: var(--paper); }

/* ===== Inputs ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-1); }
.field input, .field select, .field textarea {
  font-family: var(--font-body); font-size: 15px;
  padding: 12px 14px; border-radius: var(--r-3);
  border: 0.5px solid var(--ink-5); background: #fff; color: var(--ink-1);
  font-feature-settings: "tnum" on;
  transition: border-color var(--t-base) var(--ease-out);
}
.field input:focus, .field select:focus { outline: none; border-color: var(--seal); border-width: 1.5px; }
.field-help { font-size: 12px; color: var(--ink-3); }

/* ===== Pills ===== */
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: var(--r-pill); border: 0.5px solid var(--ink-5);
  background: var(--paper); color: var(--ink-1); }
.pill-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pill-sage { background: var(--sage-tint); color: #2A4D3F; border-color: transparent; }
.pill-seal { background: var(--seal-tint); color: #6E2A19; border-color: transparent; }
.pill-ok { background: var(--ok-tint); color: #1F4A36; border-color: transparent; }

/* ===== Progress dots ===== */
.dots { display: inline-flex; gap: 6px; }
.dots span { width: 6px; height: 6px; border-radius: 999px; background: var(--ink-5); display: inline-block; }
.dots span.on { background: var(--ink); }

/* ===== Footer ===== */
.footer { margin-top: auto; padding: var(--s-12) var(--s-8) var(--s-8); border-top: 0.5px solid var(--ink-5); background: var(--bone); }
.footer-row { display: flex; flex-wrap: wrap; gap: var(--s-6); align-items: center; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-8); max-width: var(--content-max); margin: 0 auto; padding-bottom: var(--s-8); border-bottom: 0.5px solid var(--ink-5); }
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-col .t-eyebrow { margin-bottom: 4px; }
.footer-disclosure { max-width: var(--content-max); margin: var(--s-6) auto 0; }
.footer-fine { max-width: var(--content-max); margin: var(--s-2) auto 0; }
.footer a { font-size: 14px; color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--seal); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ===== Profile tabs ===== */
.profile-tabs { display: flex; gap: 2px; border-bottom: 0.5px solid var(--ink-5); margin-bottom: var(--s-4); overflow-x: auto; }
.profile-tab { background: transparent; border: none; padding: 12px 18px; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.profile-tab:hover { color: var(--ink-1); }
.profile-tab.on { color: var(--ink-1); border-bottom-color: var(--seal); }

.disclosure { font-size: var(--t-fine); color: var(--ink-3); font-feature-settings: "tnum"; }

/* ===== Layout ===== */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--s-8); width: 100%; }
.article { max-width: var(--article-max); }

/* ===== Hero ===== */
.hero { padding: var(--s-16) 0 var(--s-12); display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--s-12); align-items: center; }
.hero-eyebrow { font-size: 13px; font-weight: 600; color: var(--seal); text-transform: uppercase; letter-spacing: 0.12em; margin-bottom: var(--s-3); }
.hero h1 { font-family: var(--font-display); font-size: 64px; font-weight: 500; line-height: 1.05; letter-spacing: -0.02em; margin: 0 0 var(--s-4); }
.hero p.lead { font-size: 19px; line-height: 1.55; color: var(--ink-2); margin: 0 0 var(--s-6); max-width: 520px; }
.hero-cta { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.hero-trust { margin-top: var(--s-6); font-size: 13px; color: var(--ink-3); display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.hero-trust span:not(:last-child)::after { content: '·'; margin-left: var(--s-3); color: var(--ink-4); }
.hero-art { border-radius: var(--r-5); overflow: hidden; }
.hero-art img { width: 100%; display: block; }
@media (max-width: 900px){ .hero { grid-template-columns: 1fr; padding: var(--s-8) 0; } .hero h1 { font-size: 44px; } }

/* ===== Section heading ===== */
.section-h { font-family: var(--font-display); font-size: 32px; font-weight: 500; letter-spacing: -0.02em; margin: 0 0 var(--s-6); }

/* ===== Three feature cards under hero ===== */
.three-up { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin-bottom: var(--s-12); }
@media (max-width: 900px){ .three-up { grid-template-columns: 1fr; } }
.feature-card { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.feature-card h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 22px; }
.feature-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }

/* ===== Audit flow ===== */
.audit { min-height: 100vh; display: flex; flex-direction: column; padding: var(--s-6) var(--s-8) var(--s-8); }
.audit-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s-12); }
.audit-body { max-width: 720px; margin: 0 auto; width: 100%; flex: 1; }
.audit-h { font-family: var(--font-display); font-size: 36px; font-weight: 500; line-height: 1.15; margin: 0 0 var(--s-3); }
.audit-sub { font-size: 17px; color: var(--ink-2); margin: 0 0 var(--s-8); }
.audit-foot { display: flex; justify-content: space-between; align-items: center; margin-top: var(--s-8); padding-top: var(--s-6); border-top: 0.5px solid var(--ink-5); max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }

/* ===== Tooth map ===== */
.toothmap { background: var(--bone); border-radius: var(--r-5); padding: var(--s-8) var(--s-6); }
.toothmap-row { display: flex; gap: 4px; justify-content: center; padding: 6px 0; }
.tooth { width: 28px; height: 36px; border-radius: 10px 10px 6px 6px; background: var(--paper); border: 1px solid var(--ink-5); cursor: pointer; transition: all var(--t-base) var(--ease-out); }
.toothmap-row.lower .tooth { border-radius: 6px 6px 10px 10px; }
.tooth:hover { border-color: var(--ink-2); background: #fff; }
.tooth.sel { background: var(--seal-tint); border-color: var(--seal); border-width: 2px; }
.toothmap-label { text-align: center; font-family: var(--font-display); font-size: 13px; font-style: italic; color: var(--ink-3); margin: 4px 0; }

/* ===== Symptom chips ===== */
.symptoms { display: flex; flex-wrap: wrap; gap: 8px; }
.symptom-chip { padding: 10px 16px; border-radius: var(--r-pill); border: 0.5px solid var(--ink-5); background: var(--paper); cursor: pointer; font-size: 14px; transition: all var(--t-base); }
.symptom-chip:hover { border-color: var(--ink-2); }
.symptom-chip.sel { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ===== Severity slider ===== */
.severity { display: flex; flex-direction: column; gap: 8px; }
.severity-anchors { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.severity input[type=range] { width: 100%; accent-color: var(--seal); }
.severity-readout { font-family: var(--font-display); font-size: 28px; font-weight: 500; }

/* ===== Snapshot ===== */
.snap-page { background: var(--paper); padding: var(--s-12) 0; }
.snap-card {
  background: linear-gradient(180deg, #E7EEEB 0%, #F2EEE6 100%);
  border-radius: var(--r-6);
  padding: var(--s-12);
  border: 0.5px solid var(--ink-5);
  box-shadow: var(--shadow-soft);
}
.snap-eyebrow { font-size: 13px; font-weight: 600; color: var(--seal); letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--s-3); }
.snap-title { font-family: var(--font-display); font-size: 48px; font-weight: 500; line-height: 1.1; margin: 0 0 var(--s-6); }
.snap-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); margin: var(--s-8) 0; }
@media (max-width: 800px){ .snap-three { grid-template-columns: 1fr; } }
.snap-three .card h3 { margin: 0 0 var(--s-2); font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.snap-three .card p { margin: 0; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.snap-cost { font-family: var(--font-display); font-size: 28px; font-weight: 500; font-feature-settings: "tnum"; }

/* ===== Directory ===== */
.dir-toolbar { display: flex; justify-content: space-between; align-items: center; padding: var(--s-6) 0; gap: var(--s-4); flex-wrap: wrap; }
.dir-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.dir-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
@media (max-width: 900px){ .dir-grid { grid-template-columns: 1fr; } }
.dir-card { padding: var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); }
.dir-card-top { display: flex; justify-content: space-between; gap: var(--s-3); }
.dir-card h3 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: 20px; }
.dir-card .practice { color: var(--ink-2); font-size: 14px; margin: 2px 0 0; }
.dir-card .badges { display: flex; gap: 4px; flex-shrink: 0; }
.dir-card .why { background: var(--paper); border-radius: var(--r-3); padding: 12px 14px; font-size: 13px; color: var(--ink-2); }
.dir-card .why strong { color: var(--ink-1); font-weight: 600; }
.dir-card .meta-row { display: flex; gap: var(--s-3); flex-wrap: wrap; font-size: 13px; color: var(--ink-3); align-items: center; }
.dir-card .actions { display: flex; gap: 8px; }
.dir-card .actions .btn { flex: 1; }

/* ===== Profile ===== */
.profile-grid { display: grid; grid-template-columns: 1fr 320px; gap: var(--s-8); padding: var(--s-8) 0; }
@media (max-width: 900px){ .profile-grid { grid-template-columns: 1fr; } }
.profile-hero { display: flex; gap: var(--s-6); align-items: center; margin-bottom: var(--s-8); padding-bottom: var(--s-8); border-bottom: 0.5px solid var(--ink-5); }
.profile-photo { width: 96px; height: 96px; border-radius: 50%; background: var(--bone); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 36px; font-weight: 500; color: var(--ink-1); flex-shrink: 0; }
.profile-name { font-family: var(--font-display); font-size: 32px; font-weight: 500; margin: 0; }
.profile-practice { color: var(--ink-2); margin: 4px 0 var(--s-3); }
.profile-section { padding: var(--s-6) 0; border-bottom: 0.5px solid var(--ink-5); }
.profile-section h2 { font-family: var(--font-display); font-size: 22px; font-weight: 500; margin: 0 0 var(--s-3); }
.profile-axes { display: flex; gap: 12px; flex-wrap: wrap; }
.profile-axis { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.profile-axis .t-tier { font-size: 10px; }
.profile-cost-table { width: 100%; border-collapse: collapse; }
.profile-cost-table td { padding: 10px 0; border-bottom: 0.5px solid var(--ink-5); font-size: 14px; font-feature-settings: "tnum"; }
.profile-cost-table td:last-child { text-align: right; }
.profile-side { display: flex; flex-direction: column; gap: var(--s-3); position: sticky; top: 80px; align-self: start; }

/* ===== Mobile hamburger ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: var(--r-3);
  flex-shrink: 0;
}
.hamburger:hover { background: var(--bone); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink-1);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  background: var(--paper);
  border-bottom: 0.5px solid var(--ink-5);
  flex-direction: column;
  padding: var(--s-3) var(--s-6) var(--s-6);
  gap: 0;
  z-index: 48;
  box-shadow: var(--shadow-medium);
}
.mobile-menu.open { display: flex; }
.mobile-menu .mm-link {
  font-size: 16px;
  color: var(--ink-2);
  text-decoration: none;
  padding: var(--s-4) 0;
  border-bottom: 0.5px solid var(--ink-5);
  background: transparent;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-body);
  font-weight: 400;
  cursor: pointer;
  text-align: left;
  display: block;
  width: 100%;
}
.mobile-menu .mm-link:hover { color: var(--ink-1); }
.mobile-menu .mm-back {
  font-weight: 600;
  border-bottom: 1px solid var(--ink-5);
  margin-bottom: var(--s-2);
  padding-bottom: var(--s-3);
}
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: var(--s-1);
}
.mobile-menu .mm-cta { display: flex; flex-direction: column; gap: var(--s-2); margin-top: var(--s-5); }

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
  padding: var(--s-2) 0 var(--s-4);
  flex-wrap: wrap;
}
.breadcrumbs .bc-link {
  color: var(--ink-2);
  text-decoration: none;
  background: transparent;
  border: none;
  font-size: 13px;
  font-family: var(--font-body);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.breadcrumbs .bc-link:hover { color: var(--seal); text-decoration: underline; }
.breadcrumbs .bc-sep { color: var(--ink-5); line-height: 1; }
.breadcrumbs .bc-current { color: var(--ink-3); font-weight: 500; }

/* ===== Responsive overrides ===== */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-right { display: none; }
  .hamburger { display: flex; }
  .masthead { padding: var(--s-3) var(--s-5); }
  .hero h1 { font-size: 38px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .audit { padding: var(--s-4) var(--s-4) var(--s-6); }
  .container { padding: 0 var(--s-4); }
  .snap-card { padding: var(--s-6); }
  .snap-title { font-size: 32px; }
  .footer { padding: var(--s-8) var(--s-5) var(--s-6); }
}

/* ===== Emergency overlay ===== */
.emergency-backdrop { position: fixed; inset: 0; background: rgba(10,31,51,0.6); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 100; padding: var(--s-6); }
.emergency-modal { background: var(--paper); border: 1px solid var(--alert); border-radius: var(--r-6); padding: var(--s-8); max-width: 520px; width: 100%; box-shadow: var(--shadow-lift); }
.emergency-modal h2 { font-family: var(--font-display); font-size: 28px; font-weight: 500; color: var(--alert); margin: 0 0 var(--s-3); display: flex; gap: 12px; align-items: center; }
.emergency-modal .actions { display: flex; flex-direction: column; gap: 8px; margin-top: var(--s-6); }
.emergency-modal .btn-alert { background: var(--alert); color: var(--paper); justify-content: flex-start; }
.emergency-modal .btn-alert-out { background: var(--paper); color: var(--alert); border: 0.5px solid var(--alert); justify-content: flex-start; }

/* ===== Directory search ===== */
.dir-search {
  display: flex; align-items: center; gap: var(--s-2);
  background: var(--paper); border: 0.5px solid var(--ink-5);
  border-radius: var(--r-4); padding: 8px 8px 8px var(--s-4);
  margin: var(--s-2) 0 var(--s-4); color: var(--ink-3);
}
.dir-search:focus-within { box-shadow: var(--shadow-focus); border-color: transparent; }
.dir-search input {
  flex: 1; border: none; background: transparent; outline: none;
  font-family: var(--font-body); font-size: 15px; color: var(--ink-1);
  padding: 6px 0;
}
.dir-search input::placeholder { color: var(--ink-4); }

/* ===== Loading skeletons ===== */
.skel {
  background: linear-gradient(90deg, var(--bone) 25%, var(--bone-2) 37%, var(--bone) 63%);
  background-size: 400% 100%;
  animation: skel-shimmer 1.4s ease infinite;
  border-radius: var(--r-2);
}
.skel-line { border-radius: 4px; }
.skel-circle { width: 52px; height: 52px; border-radius: 50%; }
.skeleton-card { pointer-events: none; }
@keyframes skel-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

/* ===== Directory empty state ===== */
.dir-empty {
  text-align: center; max-width: 460px; margin: var(--s-12) auto;
  padding: var(--s-12) var(--s-6); color: var(--ink-3);
}
.dir-empty h3 { font-family: var(--font-display); font-size: 22px; font-weight: 500; color: var(--ink-1); margin: var(--s-4) 0 var(--s-2); }
.dir-empty p { font-size: 15px; line-height: 1.6; margin: 0 0 var(--s-6); }

/* ===== Subspecialty grade chips (directory cards) ===== */
.subspec-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: var(--s-3) 0 var(--s-2); }
.subspec-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--ink-1);
  background: var(--bone); border-radius: var(--r-pill);
  padding: 4px 10px 4px 12px; line-height: 1.3;
}
.subspec-chip .subspec-tier {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 2px 6px; border-radius: var(--r-pill);
}
.subspec-gold   { box-shadow: inset 0 0 0 1px var(--gold); }
.subspec-gold .subspec-tier   { background: var(--gold-tint); color: #6b5410; }
.subspec-silver { box-shadow: inset 0 0 0 1px var(--silver); }
.subspec-silver .subspec-tier { background: #ECEAE6; color: #54524c; }
.subspec-bronze { box-shadow: inset 0 0 0 1px var(--bronze); }
.subspec-bronze .subspec-tier { background: #F2E4D2; color: #6b4f33; }
.subspec-neutral { box-shadow: inset 0 0 0 1px var(--ink-5); }
.subspec-neutral .subspec-tier { background: var(--bone-2); color: var(--ink-3); }

/* ===== Clinical performance (profile tab) ===== */
.clin-group { margin-bottom: var(--s-5); }
.clin-group-h {
  font-family: var(--font-body); font-size: 11px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3);
  padding-bottom: var(--s-2); border-bottom: 0.5px solid var(--ink-5); margin-bottom: var(--s-2);
}
.clin-row {
  display: grid; grid-template-columns: 1fr auto 44px; align-items: center;
  gap: var(--s-3); padding: var(--s-3) 0; border-bottom: 0.5px solid var(--ink-6);
}
.clin-row:last-child { border-bottom: none; }
.clin-sub { font-size: 15px; font-weight: 500; color: var(--ink-1); }
.clin-axes { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.clin-tier {
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap;
}
.clin-tier.subspec-gold   { background: var(--gold-tint); color: #6b5410; box-shadow: none; }
.clin-tier.subspec-silver { background: #ECEAE6; color: #54524c; box-shadow: none; }
.clin-tier.subspec-bronze { background: #F2E4D2; color: #6b4f33; box-shadow: none; }
.clin-tier.subspec-neutral { background: var(--bone-2); color: var(--ink-3); box-shadow: none; }
.clin-vps {
  font-family: var(--font-display); font-size: 20px; font-weight: 500;
  color: var(--ink-1); text-align: right; font-feature-settings: "tnum";
}
@media (max-width: 640px) {
  .clin-row { grid-template-columns: 1fr auto; }
  .clin-vps { display: none; }
}

/* =====================================================================
   AI-Hero — "Everyone needs ai dentist" wordplay + 3-user router
   ===================================================================== */
.ai-hero {
  padding: var(--s-12) 0 var(--s-12);
  text-align: center;
  max-width: 980px;
  margin: 0 auto;
}
.ai-hero-eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--seal);
  margin-bottom: var(--s-4);
}

/* Headline — large, calm, editorial; wordplay carried by .ai-mark */
.ai-headline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 8.5vw, 88px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--ink-1);
  margin: 0 0 var(--s-5);
}

/* The "ai" mark — natural reading is "a dentist"; brand reading is "ai dentist". */
.ai-mark {
  display: inline-block;
  white-space: nowrap;
  position: relative;
  font-family: var(--font-display);
}
.ai-mark-a {
  /* The article. Same weight as the rest of the headline. */
  color: var(--ink-1);
}
.ai-mark-i {
  /* Upright 'i' in seal, kerned tight so the eye reads "ai" as one mark. */
  color: var(--seal);
  font-style: normal;
  font-weight: 700;
  margin-left: -0.02em;
  letter-spacing: -0.04em;
}
/* Tiny underline accent that ties the two letters into one mark */
.ai-mark::after {
  content: "";
  position: absolute;
  left: 0.05em;
  right: 0.05em;
  bottom: -0.05em;
  height: 0.06em;
  background: var(--seal);
  border-radius: 0.04em;
  opacity: 0.55;
}

.ai-hero-lead {
  font-family: var(--font-body);
  font-size: clamp(17px, 2.1vw, 21px);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 64ch;
  margin: 0 auto var(--s-12);
}

/* 3-user router cards */
.ai-router {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-4);
  margin: 0 auto var(--s-8);
  text-align: left;
}
.router-card {
  /* element-type-agnostic: works as <button> and <a> */
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  background: var(--bone);
  border: 0.5px solid var(--ink-5);
  border-radius: var(--r-5);
  padding: var(--s-6);
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  text-decoration: none;
  color: var(--ink-1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform var(--t-base) var(--ease-out),
              border-color var(--t-base) var(--ease-out),
              background-color var(--t-base) var(--ease-out),
              box-shadow var(--t-base) var(--ease-out);
}
.router-card::before {
  /* Subtle wash that becomes visible on hover — communicates "you can pick this" */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, var(--seal-tint) 100%);
  opacity: 0;
  transition: opacity var(--t-base) var(--ease-out);
  pointer-events: none;
}
.router-card:hover,
.router-card:focus-visible {
  transform: translateY(-2px);
  border-color: var(--seal);
  box-shadow: var(--shadow-lift);
  outline: none;
}
.router-card:hover::before,
.router-card:focus-visible::before {
  opacity: 0.5;
}

.router-card-icon {
  width: 56px; height: 56px;
  border-radius: var(--r-pill);
  background: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--seal);
  box-shadow: var(--shadow-soft);
}
.router-card--patient .router-card-icon { color: var(--seal); }
.router-card--dentist .router-card-icon { color: var(--sage); }
.router-card--pro .router-card-icon { color: var(--ink-2); }

.router-card-body { display: flex; flex-direction: column; gap: var(--s-2); flex: 1; }
.router-card-eyebrow {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-3);
}
.router-card-h {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink-1);
  margin: 0;
}
.router-card-p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.router-card-arrow {
  margin-top: auto;
  padding-top: var(--s-3);
  font-size: 14px;
  font-weight: 600;
  color: var(--seal);
  text-decoration: underline;
  text-decoration-color: var(--ink-5);
  text-underline-offset: 4px;
  align-self: flex-start;
}
.router-card:hover .router-card-arrow,
.router-card:focus-visible .router-card-arrow {
  text-decoration-color: var(--seal);
}

.ai-hero-fine {
  font-size: 13px;
  color: var(--ink-3);
  margin-top: var(--s-6);
  line-height: 1.6;
}
.ai-hero-fine em {
  font-style: italic;
  color: var(--ink-2);
}

/* Below-fold supporting promises */
.below-fold { padding: var(--s-12) 0 var(--s-16); border-top: 0.5px solid var(--ink-5); }
.trust-row {
  margin-top: var(--s-6);
  font-size: 13px;
  color: var(--ink-3);
  display: flex;
  gap: var(--s-3);
  flex-wrap: wrap;
  justify-content: center;
}
.trust-row span:not(:last-child)::after {
  content: '·';
  margin-left: var(--s-3);
  color: var(--ink-4);
}

/* Mobile — stack the router; the wordplay holds together at all sizes thanks to clamp() */
@media (max-width: 880px) {
  .ai-router { grid-template-columns: 1fr; gap: var(--s-3); }
  .ai-hero { padding: var(--s-8) 0; }
  .ai-hero-lead { margin-bottom: var(--s-6); }
}
@media (max-width: 480px) {
  .router-card { padding: var(--s-5); }
  .router-card-h { font-size: 22px; }
}


/* ============================================================
   DIR V2 — Zocdoc-style directory redesign
   Uses --td-* tokens from design-system/tokens-v2.css
   ============================================================ */

/* Page background override */
.dir-v2-page main { background: var(--td-bg, #F8F9FC); }

/* ── Header band ──────────────────────────────────────────── */
.dir-v2-header {
  background: var(--td-surface, #fff);
  border-bottom: 1px solid var(--td-border, #E8EDF5);
  padding: var(--td-sp-4, 16px) 0 var(--td-sp-6, 24px);
}
.dir-v2-header-inner {
  display: flex;
  align-items: flex-end;
  gap: var(--td-sp-6, 24px);
  flex-wrap: wrap;
  margin-top: var(--td-sp-3, 12px);
}
.dir-v2-title {
  font-family: var(--td-font-display, 'Source Serif 4', Georgia, serif);
  font-size: var(--td-text-2xl, 32px);
  font-weight: 600;
  color: var(--td-text-primary, #0A1628);
  margin: 0;
  line-height: 1.15;
}

/* ── Search bar ───────────────────────────────────────────── */
.dir-v2-search {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--td-surface, #fff);
  border: 1.5px solid var(--td-border-strong, #C8D2E4);
  border-radius: var(--td-radius-md, 10px);
  padding: 8px 12px;
  transition: box-shadow .15s, border-color .15s;
}
.dir-v2-search:focus-within {
  border-color: var(--td-primary, #0057FF);
  box-shadow: 0 0 0 3px rgba(0,87,255,.12);
}
.dir-v2-search svg { color: var(--td-text-muted, #94A3B8); flex-shrink: 0; }
.dir-v2-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--td-font, 'Inter', system-ui, sans-serif);
  font-size: var(--td-text-base, 15px);
  color: var(--td-text-primary, #0A1628);
}
.dir-v2-search input::placeholder { color: var(--td-text-muted, #94A3B8); }

.dir-v2-header-forms {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dir-v2-zip-form { display: flex; flex-direction: column; gap: 4px; }
.dir-v2-zip-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--td-text-muted, #94A3B8);
}
.dir-v2-zip-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--td-surface, #fff);
  border: 1.5px solid var(--td-border-strong, #C8D2E4);
  border-radius: var(--td-radius-md, 10px);
  padding: 8px 10px;
  max-width: 220px;
}
.dir-v2-zip-wrap.has-error { border-color: var(--td-danger, #DC2626); }
.dir-v2-zip-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-family: var(--td-font-mono, 'DM Mono', monospace);
  font-size: var(--td-text-base, 15px);
  color: var(--td-text-primary, #0A1628);
  letter-spacing: .04em;
}
.dir-v2-zip-error {
  margin: 0;
  font-size: 12px;
  color: var(--td-danger, #DC2626);
}
.dir-v2-trust-line {
  margin: var(--td-sp-6, 24px) 0 0;
  padding-top: var(--td-sp-4, 16px);
  border-top: 1px solid var(--td-border, #E8EDF5);
  color: var(--td-text-muted, #94A3B8);
  line-height: 1.55;
}
.dir-v2-trust-line a { color: var(--td-primary, #0057FF); }

/* ── Body layout: sidebar + results ─────────────────────── */
.dir-v2-body {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: var(--td-sp-8, 32px);
  padding: var(--td-sp-8, 32px) 0 var(--td-sp-12, 48px);
  align-items: start;
}
@media (max-width: 860px) {
  .dir-v2-body { grid-template-columns: 1fr; }
}

/* ── Filter sidebar (desktop sticky) ─────────────────────── */
.dir-v2-sidebar {
  position: sticky;
  top: 80px;
  background: var(--td-surface, #fff);
  border: 1px solid var(--td-border, #E8EDF5);
  border-radius: var(--td-radius-lg, 14px);
  padding: var(--td-sp-5, 20px);
  display: flex;
  flex-direction: column;
  gap: var(--td-sp-4, 16px);
}
@media (max-width: 860px) { .dir-v2-sidebar { display: none; } }

.dir-v2-sidebar-section { display: flex; flex-direction: column; gap: 0; }
.dir-v2-sidebar-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--td-text-muted, #94A3B8);
  margin-bottom: var(--td-sp-2, 8px);
}
.dir-v2-filter-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: var(--td-radius-sm, 6px);
  padding: 7px 10px;
  font-family: var(--td-font, system-ui, sans-serif);
  font-size: var(--td-text-sm, 13px);
  color: var(--td-text-secondary, #475569);
  cursor: pointer;
  transition: background .1s, color .1s;
  margin-bottom: 1px;
  line-height: 1.3;
}
.dir-v2-filter-btn:hover { background: var(--td-bg, #F8F9FC); color: var(--td-text-primary, #0A1628); }
.dir-v2-filter-btn.is-active {
  background: var(--td-primary-light, #EBF0FF);
  color: var(--td-primary, #0057FF);
  font-weight: 600;
}
.dir-v2-clear-btn {
  background: transparent;
  border: none;
  font-family: var(--td-font, system-ui, sans-serif);
  font-size: var(--td-text-sm, 13px);
  color: var(--td-primary, #0057FF);
  cursor: pointer;
  padding: 4px 10px;
  text-align: left;
}
.dir-v2-clear-btn:hover { text-decoration: underline; }

/* ── Toolbar ──────────────────────────────────────────────── */
.dir-v2-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--td-sp-4, 16px);
  flex-wrap: wrap;
  gap: 8px;
}
.dir-v2-count { font-size: var(--td-text-sm, 13px); color: var(--td-text-secondary, #475569); }
.dir-v2-count strong { color: var(--td-text-primary, #0A1628); }
.dir-v2-note { color: var(--td-text-muted, #94A3B8); }
.dir-v2-mobile-filter-btn {
  display: none;
  align-items: center;
  gap: 6px;
  background: var(--td-surface, #fff);
  border: 1px solid var(--td-border-strong, #C8D2E4);
  border-radius: var(--td-radius-sm, 6px);
  padding: 6px 12px;
  font-family: var(--td-font, system-ui, sans-serif);
  font-size: var(--td-text-sm, 13px);
  color: var(--td-text-secondary, #475569);
  cursor: pointer;
}
@media (max-width: 860px) { .dir-v2-mobile-filter-btn { display: flex; } }
.dir-v2-filter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--td-primary, #0057FF);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Mobile filters strip ─────────────────────────────────── */
.dir-v2-mobile-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: var(--td-sp-4, 16px);
}

/* ── Card list ────────────────────────────────────────────── */
.dir-v2-list {
  display: flex;
  flex-direction: column;
  gap: var(--td-sp-3, 12px);
}

/* ── Dentist card ─────────────────────────────────────────── */
.dir-v2-card {
  background: var(--td-surface, #fff);
  border: 1px solid var(--td-border, #E8EDF5);
  border-radius: var(--td-radius-lg, 14px);
  box-shadow: var(--td-shadow-sm, 0 1px 3px rgba(0,0,0,.06));
  padding: var(--td-sp-5, 20px);
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: var(--td-sp-4, 16px);
  align-items: start;
  transition: box-shadow .15s, border-color .15s, transform .12s;
  cursor: default;
}
.dir-v2-card.is-hov {
  border-color: var(--td-border-strong, #C8D2E4);
  box-shadow: var(--td-shadow-md, 0 4px 12px rgba(0,0,0,.08));
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .dir-v2-card {
    grid-template-columns: 48px 1fr;
    grid-template-rows: auto auto;
  }
  .dir-v2-card-cta {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
  .dir-v2-card-cta .btn { flex: 1; min-width: 120px; }
}

/* ── Avatar circle ────────────────────────────────────────── */
.dir-v2-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--td-font, system-ui, sans-serif);
  font-size: 18px;
  font-weight: 600;
  flex-shrink: 0;
  user-select: none;
}

/* ── Card body (center column) ────────────────────────────── */
.dir-v2-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.dir-v2-card-name {
  font-family: var(--td-font-display, 'Source Serif 4', Georgia, serif);
  font-size: var(--td-text-md, 17px);
  font-weight: 600;
  color: var(--td-text-primary, #0A1628);
  line-height: 1.2;
}
.dir-v2-card-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--td-text-sm, 13px);
  color: var(--td-text-secondary, #475569);
  flex-wrap: wrap;
}
.dir-v2-sep { color: var(--td-text-muted, #94A3B8); }
.dir-v2-card-dist { color: var(--td-text-muted, #94A3B8); }
.dir-v2-card-addr {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--td-text-muted, #94A3B8);
}
.dir-v2-card-addr svg { color: var(--td-primary, #0057FF); flex-shrink: 0; }

/* Recognition badges row + methodology link */
.dir-v2-card-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin: 3px 0;
}
.dir-v2-err { color: var(--td-danger); margin-left: 6px; }
.dir-v2-more-badges {
  font-size: 11px;
  color: var(--td-text-muted, #94A3B8);
  padding: 2px 7px;
  border-radius: var(--td-radius-pill, 999px);
  background: var(--td-bg, #F8F9FC);
  border: 1px solid var(--td-border, #E8EDF5);
}
/* Methodology link — brand invariant: within 200px of any score */
.dir-v2-method-link {
  font-size: 11px;
  color: var(--td-text-muted, #94A3B8);
  text-decoration: none;
  padding: 2px 5px;
  border-radius: var(--td-radius-sm, 6px);
  transition: color .1s, background .1s;
  white-space: nowrap;
}
.dir-v2-method-link:hover {
  color: var(--td-primary, #0057FF);
  background: var(--td-primary-light, #EBF0FF);
}

/* Info chips row */
.dir-v2-card-info {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 2px;
}
.dir-v2-info-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--td-text-secondary, #475569);
  background: var(--td-bg, #F8F9FC);
  border-radius: var(--td-radius-sm, 6px);
  padding: 3px 8px;
  border: 1px solid var(--td-border, #E8EDF5);
  white-space: nowrap;
}
.dir-v2-info-chip svg { color: var(--td-text-muted, #94A3B8); flex-shrink: 0; }
.dir-v2-cost {
  font-family: var(--td-font-mono, 'JetBrains Mono', monospace);
  font-feature-settings: "tnum";
}

/* ── CTA column (right) ───────────────────────────────────── */
.dir-v2-card-cta {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 116px;
  align-items: stretch;
  flex-shrink: 0;
}
.dir-v2-next-avail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--td-text-secondary, #475569);
  padding: 0 2px;
}
.dir-v2-next-avail svg { color: var(--td-text-muted, #94A3B8); }

/* Skeleton overrides for v2 card shape */
.dir-v2-list .skeleton-card {
  background: var(--td-surface, #fff);
  border: 1px solid var(--td-border, #E8EDF5);
  border-radius: var(--td-radius-lg, 14px);
  box-shadow: none;
}
