/* wb-doctors - design tokens ported from wb-contacts (whitebridge.ai palette).
   Flat fills only: no gradients, no emoji, per the house style. */

:root {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Consolas, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-md: 1.125rem;
  --text-lg: 1.25rem;
  --text-xl: 1.5rem;
  --text-2xl: 1.875rem;
  --text-3xl: 2.25rem;
  --text-4xl: clamp(2rem, 4vw + 1rem, 3rem);

  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  --leading-tight: 1.15;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.625;

  --tracking-tight: -0.02em;
  --tracking-snug: -0.01em;
  --tracking-wide: 0.04em;

  --accent: #2337E0;
  --accent-dark: #1A2BC8;
  --accent-soft: #F0F2FF;
  --ink: #101828;
  --ink-2: #475467;
  --muted: #667085;
  --muted-2: #98A2B3;
  --line: #EAECF0;
  --line-2: #D0D5DD;
  --surface: #F8F9FA;
  --surface-2: #F9FAFB;

  --good: #027A48;
  --good-bg: #ECFDF3;
  --warn: #B54708;
  --warn-bg: #FFFAEB;
  --bad: #B42318;
  --bad-bg: #FEF3F2;

  --prose-width: 65ch;
  --radius: 8px;
  --radius-lg: 16px;
}

* { box-sizing: border-box; }
html { font-size: 100%; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-weight: var(--font-bold); color: var(--ink);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-snug); margin: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }
img { max-width: 100%; }

.wb-container { max-width: 1248px; margin: 0 auto; padding: 0 20px; width: 100%; }
.wb-muted { color: var(--muted); }
.wb-label {
  font-size: var(--text-xs); font-weight: var(--font-bold); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--muted);
}
.tabular { font-variant-numeric: tabular-nums; }
.wb-stack { display: flex; flex-direction: column; gap: 16px; }

/* ---------------------------------------------------------- header ---- */
.wb-header {
  background: #fff; height: 72px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
}
.wb-header .wb-container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wb-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); flex-shrink: 0; }
.wb-brand:hover { color: var(--ink); }
.wb-brand img { height: 34px; width: auto; display: block; }
/* Section label sits after the logo, separated by a rule, so the brand reads
   as "WhiteBridge → Doctors" without competing with the logotype. */
.wb-brand-section {
  padding-left: 12px; border-left: 1px solid var(--line-2);
  font-size: var(--text-md); font-weight: var(--font-semibold); color: var(--ink-2);
  letter-spacing: var(--tracking-snug);
}
.wb-nav { display: flex; align-items: center; gap: 26px; }
.wb-nav a { font-weight: var(--font-bold); font-size: var(--text-sm); color: var(--ink-2); }
.wb-nav a:hover, .wb-nav a[aria-current] { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; height: 44px; border-radius: var(--radius);
  font-weight: var(--font-semibold); font-size: var(--text-base);
  border: 1px solid transparent; cursor: pointer; font-family: inherit; transition: background-color .2s, border-color .2s, color .2s;
}
.btn-primary { background: var(--accent); color: #fff !important; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: #fff; color: var(--ink-2) !important; border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent) !important; }
.btn-sm { height: 36px; padding: 8px 14px; font-size: var(--text-sm); }

/* ------------------------------------------------------------ hero ---- */
.wb-hero { background: #fff; border-bottom: 1px solid var(--line); padding: 56px 0 48px; text-align: center; }
.wb-hero h1 {
  font-size: var(--text-4xl); font-weight: var(--font-extrabold);
  letter-spacing: var(--tracking-tight); margin-bottom: 14px;
}
.wb-hero .wb-sub {
  font-size: var(--text-lg); color: var(--ink-2); line-height: var(--leading-relaxed);
  max-width: var(--prose-width); margin: 0 auto 32px;
}
.wb-searchbar {
  display: flex; align-items: center; gap: 10px; background: #fff;
  border: 1px solid var(--line-2); border-radius: 12px; padding: 8px 8px 8px 16px;
  max-width: 760px; margin: 0 auto; box-shadow: 0 2px 6px rgba(16,24,40,.05);
}
.wb-searchbar svg { width: 20px; height: 20px; color: var(--muted); flex-shrink: 0; }
.wb-searchbar input, .wb-searchbar select {
  border: 0; outline: none; background: transparent; font-family: inherit;
  font-size: var(--text-base); color: var(--ink); padding: 12px 0; min-width: 0;
}
.wb-searchbar input { flex: 1; }
.wb-searchbar select { border-left: 1px solid var(--line); padding-left: 14px; color: var(--ink-2); cursor: pointer; }
.wb-searchbar .btn { flex-shrink: 0; }

/* ----------------------------------------------------------- stats ---- */
.wb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-top: 34px; }
.wb-stat { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; text-align: center; }
.wb-stat b { display: block; font-size: var(--text-2xl); font-weight: var(--font-extrabold); letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }
.wb-stat span { font-size: var(--text-sm); color: var(--muted); }

/* ------------------------------------------------------------ page ---- */
.wb-section { padding: 44px 0; }
.wb-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.wb-section-head h2 { font-size: var(--text-xl); }
.wb-section-head p { margin: 6px 0 0; color: var(--muted); font-size: var(--text-sm); max-width: var(--prose-width); }

.wb-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.wb-card + .wb-card { margin-top: 16px; }
.wb-card h2 { font-size: var(--text-lg); margin-bottom: 4px; }
.wb-card-note { color: var(--muted); font-size: var(--text-sm); margin: 0 0 18px; line-height: var(--leading-relaxed); }

/* ------------------------------------------------------ doctor grid ---- */
.wb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.wb-doc-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: block; color: inherit; transition: box-shadow .2s, transform .2s, border-color .2s;
}
.wb-doc-card:hover { box-shadow: 0 4px 12px rgba(16,24,40,.12); transform: translateY(-2px); color: inherit; border-color: var(--line-2); }
.wb-doc-top { display: flex; gap: 13px; align-items: center; }
.wb-avatar {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--accent-soft); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: var(--font-bold); font-size: var(--text-md);
}
.wb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wb-doc-id { min-width: 0; flex: 1; }
.wb-doc-name { font-weight: var(--font-semibold); font-size: var(--text-base); color: var(--ink); line-height: var(--leading-snug); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-doc-sub { font-size: var(--text-sm); color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.wb-doc-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------- rating ---- */
.wb-rating { display: inline-flex; align-items: baseline; gap: 6px; }
.wb-rating b { font-size: var(--text-md); font-weight: var(--font-bold); font-variant-numeric: tabular-nums; }
.wb-rating small { color: var(--muted); font-size: var(--text-sm); }
.wb-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.wb-stars svg { width: 15px; height: 15px; }
.wb-star-on { color: #F79009; }
.wb-star-off { color: #E4E7EC; }

.wb-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 100px;
  font-size: var(--text-xs); font-weight: var(--font-semibold); background: var(--surface-2);
  color: var(--ink-2); border: 1px solid var(--line);
}
.wb-chip-accent { background: var(--accent-soft); color: var(--accent); border-color: #D8DDFF; }
.wb-chip-good { background: var(--good-bg); color: var(--good); border-color: #A6F4C5; }
.wb-chip-warn { background: var(--warn-bg); color: var(--warn); border-color: #FEDF89; }
.wb-chip-bad  { background: var(--bad-bg);  color: var(--bad);  border-color: #FECDCA; }

.wb-src-dots { display: inline-flex; gap: 4px; }
.wb-src-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.wb-src-dot.on { background: var(--accent); }

/* --------------------------------------------------------- profile ---- */
.wb-profile { padding: 24px 0 64px; }
.wb-crumbs { font-size: var(--text-sm); color: var(--muted); margin-bottom: 16px; }
.wb-crumbs a { color: var(--muted); }
.wb-crumbs a:hover { color: var(--accent); }
.wb-crumbs span { margin: 0 7px; color: var(--muted-2); }

.wb-pp-hero {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 30px; display: flex; gap: 26px; margin-bottom: 16px; flex-wrap: wrap;
}
.wb-pp-avatar {
  width: 132px; height: 132px; border-radius: 12px; overflow: hidden; flex-shrink: 0;
  background: var(--accent-soft); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-weight: var(--font-extrabold); font-size: 46px;
}
.wb-pp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.wb-pp-body { flex: 1; min-width: 260px; }
.wb-pp-name { font-size: var(--text-2xl); font-weight: var(--font-extrabold); letter-spacing: var(--tracking-tight); margin-bottom: 6px; }
.wb-pp-headline { font-size: var(--text-md); color: var(--ink-2); font-weight: var(--font-medium); margin-bottom: 14px; }
.wb-pp-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: var(--text-sm); margin-bottom: 18px; }
.wb-pp-meta-item { display: inline-flex; align-items: center; gap: 6px; }
.wb-pp-meta-item svg { width: 16px; height: 16px; color: var(--muted-2); }
.wb-pp-headnums { display: flex; gap: 26px; flex-wrap: wrap; padding-top: 16px; border-top: 1px solid var(--line); }
.wb-pp-headnum b { display: block; font-size: var(--text-xl); font-weight: var(--font-extrabold); font-variant-numeric: tabular-nums; line-height: 1.2; }
.wb-pp-headnum span { font-size: var(--text-sm); color: var(--muted); }

/* per-source comparison - the point of the product */
.wb-cmp { width: 100%; border-collapse: collapse; }
.wb-cmp th {
  text-align: left; font-size: var(--text-xs); font-weight: var(--font-bold);
  text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--muted);
  padding: 0 12px 10px 0; border-bottom: 1px solid var(--line);
}
.wb-cmp td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wb-cmp tr:last-child td { border-bottom: 0; }
.wb-cmp-src { display: flex; align-items: center; gap: 10px; font-weight: var(--font-semibold); color: var(--ink); }
.wb-cmp-logo {
  width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0; color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: var(--text-xs); font-weight: var(--font-bold);
}
.wb-src-healthgrades { background: #0B6FA4; }
.wb-src-vitals { background: #00857D; }
.wb-src-ratemds { background: #C2410C; }
.wb-cmp-bar { height: 7px; border-radius: 100px; background: var(--line); overflow: hidden; min-width: 90px; }
.wb-cmp-bar i { display: block; height: 100%; background: var(--accent); border-radius: 100px; }
.wb-cmp-num { font-variant-numeric: tabular-nums; font-weight: var(--font-bold); }
.wb-cmp-foot { margin-top: 16px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); font-size: var(--text-sm); color: var(--ink-2); line-height: var(--leading-relaxed); }
.wb-cmp-foot strong { color: var(--ink); }

/* histogram */
.wb-hist { display: flex; flex-direction: column; gap: 7px; }
.wb-hist-row { display: flex; align-items: center; gap: 10px; font-size: var(--text-sm); }
.wb-hist-row span:first-child {
  width: 34px; color: var(--muted); flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 3px;
}
.wb-hist-row span:first-child svg { width: 13px; height: 13px; flex-shrink: 0; }
.wb-hist-bar { flex: 1; height: 8px; background: var(--line); border-radius: 100px; overflow: hidden; }
.wb-hist-bar i { display: block; height: 100%; background: #F79009; }
.wb-hist-row span:last-child { width: 40px; text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* reviews */
.wb-reviews { display: flex; flex-direction: column; gap: 0; }
.wb-review { padding: 18px 0; border-bottom: 1px solid var(--line); }
.wb-review:last-child { border-bottom: 0; }
.wb-review:first-child { padding-top: 0; }
.wb-review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.wb-review-author { font-weight: var(--font-semibold); font-size: var(--text-sm); color: var(--ink); }
.wb-review-date { font-size: var(--text-sm); color: var(--muted); }
.wb-review-body { color: var(--ink-2); line-height: var(--leading-relaxed); margin: 0; }
.wb-review-src { margin-left: auto; }

.wb-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
@media (max-width: 940px) { .wb-layout { grid-template-columns: 1fr; } }

/* --------------------------------------------------------- filters ---- */
.wb-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.wb-filters select, .wb-filters input[type=search] {
  height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #fff; font-family: inherit; font-size: var(--text-sm); color: var(--ink); outline: none;
}
.wb-filters select:focus, .wb-filters input:focus { border-color: var(--accent); }
.wb-result-count { color: var(--muted); font-size: var(--text-sm); margin-left: auto; }

.wb-pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.wb-pager a, .wb-pager span {
  min-width: 40px; height: 40px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  font-size: var(--text-sm); font-weight: var(--font-semibold); color: var(--ink-2);
}
.wb-pager a:hover { border-color: var(--accent); color: var(--accent); }
.wb-pager .on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* browse tiles */
.wb-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); gap: 10px; }
.wb-tile {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 15px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--ink-2); font-weight: var(--font-semibold); font-size: var(--text-sm);
}
.wb-tile:hover { border-color: var(--accent); color: var(--accent); }
.wb-tile em { font-style: normal; color: var(--muted); font-weight: var(--font-medium); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------- monitor ---- */
.wb-rank { width: 100%; border-collapse: collapse; }
.wb-rank th {
  text-align: left; font-size: var(--text-xs); font-weight: var(--font-bold); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--muted); padding: 0 12px 10px 0; border-bottom: 1px solid var(--line);
}
.wb-rank td { padding: 13px 12px 13px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.wb-rank tr:last-child td { border-bottom: 0; }
.wb-rank tr.me td { background: var(--accent-soft); }
.wb-rank tr.me td:first-child { border-top-left-radius: var(--radius); border-bottom-left-radius: var(--radius); }
.wb-rank tr.me td:last-child { border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.wb-rank-pos { width: 34px; color: var(--muted); font-weight: var(--font-bold); font-variant-numeric: tabular-nums; }
.wb-rank-who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.wb-rank-who .wb-avatar { width: 38px; height: 38px; font-size: var(--text-sm); }
.wb-rank-name { font-weight: var(--font-semibold); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wb-empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.wb-empty h3 { font-size: var(--text-lg); color: var(--ink); margin-bottom: 8px; }

.wb-note {
  background: var(--accent-soft); border: 1px solid #D8DDFF; border-radius: var(--radius);
  padding: 14px 16px; font-size: var(--text-sm); color: var(--ink-2); line-height: var(--leading-relaxed);
}
.wb-note strong { color: var(--ink); }

/* ---------------------------------------------------- whitebridge funnels -- */
.wb-cta {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid #D8DDFF;
  border-radius: var(--radius); padding: 18px 20px;
}
.wb-cta-body { flex: 1; min-width: 220px; }
.wb-cta-title { font-weight: var(--font-bold); color: var(--ink); font-size: var(--text-base); margin: 0 0 4px; }
.wb-cta-text { margin: 0; font-size: var(--text-sm); color: var(--ink-2); line-height: var(--leading-relaxed); max-width: 62ch; }
.wb-cta .btn { flex-shrink: 0; }
.wb-cta-inline { margin-top: 18px; }
/* Sidebar variant: stacked, full-width button. */
.wb-cta-stack { flex-direction: column; align-items: stretch; gap: 12px; padding: 18px; }
.wb-cta-stack .btn { width: 100%; }
@media (max-width: 560px) {
  .wb-cta { flex-direction: column; align-items: stretch; }
  .wb-cta .btn { width: 100%; }
}

/* ---------------------------------------------------------- footer ---- */
.wb-footer { background: #fff; border-top: 1px solid var(--line); padding: 30px 0; margin-top: 20px; }
.wb-footer .wb-container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.wb-footer-brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.wb-footer-brand img { height: 26px; width: auto; display: block; }
.wb-footer p { margin: 0; font-size: var(--text-sm); color: var(--muted); max-width: 52ch; }
.wb-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.wb-footer nav a { font-size: var(--text-sm); color: var(--ink-2); font-weight: var(--font-semibold); }

@media (max-width: 720px) {
  .wb-nav { gap: 16px; }
  .wb-nav .hide-sm { display: none; }
  .wb-searchbar { flex-wrap: wrap; padding: 10px; }
  .wb-searchbar input { flex-basis: 100%; padding-left: 6px; }
  .wb-searchbar select { border-left: 0; padding-left: 6px; flex: 1; }
  .wb-searchbar .btn { flex: 1; }
  .wb-pp-hero { padding: 22px; gap: 18px; }
  .wb-pp-avatar { width: 84px; height: 84px; font-size: 30px; }
  /* Stacked cells lose their column header, so each value carries its own
     label via data-label instead of reading as a bare number. */
  .wb-cmp thead { display: none; }
  .wb-cmp td { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 0; }
  .wb-cmp td[data-label]::before {
    content: attr(data-label); flex: 0 0 74px;
    font-size: var(--text-xs); font-weight: var(--font-bold); text-transform: uppercase;
    letter-spacing: var(--tracking-wide); color: var(--muted);
  }
  .wb-cmp td[data-label] > * { flex: 1; }
  .wb-cmp tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .wb-cmp tr:last-child { border-bottom: 0; }
  .wb-result-count { margin-left: 0; flex-basis: 100%; }
}
