/* ==========================================================================
   Physician profile page (loaded via PageMeta styles:['profile']).
   All classes are profile-prefixed to avoid collisions with site.css.
   ========================================================================== */

/* ---- hero ---- */
.profile-hero { margin-top: 10px; }
.profile-hero-grid {
  display: grid;
  gap: clamp(20px, 4vw, 44px);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
}
.profile-name { margin-bottom: 0.25em; }
.profile-meta { color: var(--ink-soft); font-size: 1.05rem; margin: 0 0 0.45em; }

/* Receipt-styled headline figure inside the hero. */
.profile-headline {
  position: relative;
  background: linear-gradient(168deg, rgba(255, 255, 255, 0.94), rgba(240, 249, 251, 0.9));
  border: 1px solid var(--glass-border);
  outline: 1px solid var(--glass-edge);
  outline-offset: -1px;
  border-radius: var(--r-lg);
  box-shadow: 0 8px 28px -16px rgba(20, 51, 61, 0.22);
  padding: 24px 26px;
}
.profile-headline::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--r-lg) - 6px);
  border: 1.5px dashed rgba(20, 51, 61, 0.14);
  pointer-events: none;
}
.profile-figure {
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 4px;
}
.profile-figure--zero {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 560;
  line-height: 1.25;
  color: var(--ink);
  margin: 0 0 6px;
}
.profile-figure-caption { color: var(--ink-soft); margin: 0 0 10px; }
.profile-figure-sub { color: var(--muted); font-size: 0.95rem; margin: 0 0 12px; }
.profile-context {
  background: var(--accent-wash);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
}

/* ---- chart cards ---- */
.profile-chart-card h2 { margin-bottom: 4px; }
.profile-chart-card > .small { margin-bottom: 14px; }
#trend-chart { min-height: 300px; }
#nature-chart { min-height: 330px; }
.profile-chart-fallback { padding: 14px 2px; margin: 0; }

/* ---- companies table ---- */
.profile-companies .table-note { margin: 0 0 12px; }
.profile-companies td:first-child { min-width: 200px; }
/* A row with 3 long device names (e.g. "Ilet Bionic Pancreas, Ilet Insulin
   Infusion Kit Contact Detach, ...") would otherwise wrap across 6-7 lines
   and balloon that one row to 5x the height of its neighbors, reading as a
   broken blank gap when the table is horizontally scrolled to a column that
   doesn't show it. One line + ellipsis keeps every row the same height. */
.profile-products-cell { max-width: 340px; }
.profile-products-cell .small { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-companies details { margin-top: 6px; }
.profile-companies summary { color: var(--accent-deep); }
.profile-companies details .table-scroll { margin-top: 4px; }
.profile-companies > .small:last-child { margin-top: 12px; }

/* ---- drug / device chips ---- */
.profile-drugs .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 16px; }
.profile-drug-chip {
  padding: 8px 16px;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: normal;
  gap: 8px;
}
.profile-drug-chip:hover { background: #cfe6e8; color: var(--accent-deep); }
.profile-drug-chip .num { color: var(--ink); font-size: 0.85rem; font-weight: 600; }

/* ---- research & ownership ---- */
.profile-research .num { font-size: 1.12rem; }

/* ---- share receipt ---- */
.profile-share h2 { margin-bottom: 12px; }
.profile-receipt { max-width: 580px; }
.profile-receipt .eyebrow { margin-bottom: 6px; }
.profile-receipt-name { margin-bottom: 4px; padding-right: 64px; }
.profile-receipt .total { margin: 0 0 2px; }
.profile-receipt-line { color: var(--ink-soft); margin: 0 0 16px; }
.profile-receipt-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 4px 16px;
  margin: 0 0 16px;
  font-size: 0.95rem;
}
.profile-receipt-meta dt { color: var(--muted); font-weight: 600; }
.profile-receipt-meta dd { margin: 0; }
.profile-receipt-url { word-break: break-all; margin-bottom: 6px; }
.profile-share-actions { margin-top: 14px; }
[data-copy-link].is-copied {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: rgba(46, 125, 91, 0.3);
}

/* ---- watch CTA ---- */
.profile-watch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.profile-watch h3 { margin-bottom: 4px; }
.profile-watch .btn { flex: none; }

/* ---- section rhythm on this page: cards read as one column ---- */
.profile-hero + .section { margin-top: clamp(24px, 4vw, 40px); }
.profile-chart-card + .section,
.profile-companies + .section,
.profile-drugs + .section,
.profile-research + .section { margin-top: clamp(24px, 4vw, 40px); }

/* ---- mobile ---- */
@media (max-width: 760px) {
  .profile-hero-grid { grid-template-columns: 1fr; }
  .profile-headline { padding: 20px; }
  .profile-receipt { max-width: none; }
  .profile-receipt-meta { grid-template-columns: 1fr; gap: 2px; }
  .profile-receipt-meta dt { margin-top: 8px; }
  .profile-watch { flex-direction: column; align-items: flex-start; }
  #trend-chart { min-height: 250px; }
  #nature-chart { min-height: 300px; }
}
