/* ════════════ The Jevity Body — interactive anatomy explorer ════════════ */
.lib-nav {
  background: rgba(10, 11, 14, 0.85); backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border); padding: 1rem 0; position: sticky; top: 0; z-index: 50;
}
.lib-nav .container { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }

.body-hero { padding: 4rem 0 2rem; text-align: center; }
.body-hero h1 { font: 400 clamp(2.4rem, 4.6vw, 3.6rem) var(--serif); letter-spacing: -0.025em; margin: 0.8rem 0 1rem; }
.body-hero h1 em { font-style: italic; color: var(--accent); }
.body-hero .lead { max-width: 60ch; margin-inline: auto; font-size: 1.12rem; color: var(--text-soft); }

.body-explorer {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 3rem;
}

/* Figure */
.body-figure { position: sticky; top: 90px; display: grid; justify-items: center; gap: 1rem; }
#bodySvg { width: 100%; max-width: 340px; height: auto; overflow: visible; }
.body-figure__hint { font-size: 0.8rem; color: var(--muted); text-align: center; }

.hotspot-hit { fill: transparent; cursor: pointer; }
.hotspot-dot {
  fill: var(--accent);
  cursor: pointer;
  transition: r 0.2s ease, fill 0.2s ease;
  filter: drop-shadow(0 0 5px rgba(45, 212, 167, 0.8));
}
.hotspot-pulse { fill: rgba(45, 212, 167, 0.35); transform-origin: center; animation: hp 2.6s ease-out infinite; pointer-events: none; }
@keyframes hp { 0% { r: 6; opacity: 0.6; } 100% { r: 20; opacity: 0; } }
.hotspot.is-active .hotspot-dot { fill: #fff; r: 8; }
.hotspot.is-active .hotspot-pulse { fill: rgba(255, 255, 255, 0.4); }
.hotspot:hover .hotspot-dot { r: 8; }

/* Region chips */
.body-chips { display: flex; flex-wrap: wrap; gap: 0.45rem; justify-content: center; max-width: 380px; }
.body-chips button {
  font: 400 0.82rem var(--sans); color: var(--text-soft);
  background: transparent; border: 1px solid var(--border); border-radius: 999px;
  padding: 0.45rem 0.85rem; cursor: pointer; min-height: 36px; transition: all 0.15s;
}
.body-chips button:hover { border-color: var(--border-strong); color: var(--text); }
.body-chips button.is-active { color: var(--accent); border-color: var(--accent); background: rgba(45, 212, 167, 0.07); }

/* Panel */
.body-panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.2rem; min-height: 400px;
}
.body-panel__empty .eyebrow { color: var(--accent); }
.body-panel__empty h2 { font: 400 1.8rem var(--serif); margin-bottom: 0.6rem; }
.body-panel__empty p { color: var(--text-soft); }

.bp-system { font: 500 0.72rem var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); }
.bp-name { font: 400 2rem var(--serif); letter-spacing: -0.02em; margin: 0.4rem 0 0.7rem; }
.bp-blurb { font-size: 1.02rem; color: var(--text-soft); line-height: 1.6; margin-bottom: 1.8rem; }

.bp-h { font: 500 0.74rem var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); margin: 1.8rem 0 0.8rem; }
.bp-h--aging { color: #fbbf24; }

.bp-signs { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.bp-signs li { display: flex; gap: 0.7rem; align-items: baseline; font-size: 0.95rem; color: var(--text-soft); }
.bp-signs li::before { content: ""; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: #fbbf24; margin-top: 0.5rem; }

/* Key structures (deep reference points) */
.bp-structs { display: grid; gap: 0.4rem; }
.bp-struct { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.bp-struct summary {
  cursor: pointer; list-style: none; padding: 0.7rem 0.9rem;
  display: flex; align-items: center; justify-content: space-between;
  font: 500 0.92rem var(--sans); color: var(--text);
}
.bp-struct summary::-webkit-details-marker { display: none; }
.bp-struct summary::after { content: "+"; color: var(--accent); font-size: 1.1rem; }
.bp-struct[open] summary::after { content: "−"; }
.bp-struct[open] summary { border-bottom: 1px solid var(--border); }
.bp-struct p { font-size: 0.85rem; color: var(--text-soft); line-height: 1.5; padding: 0.5rem 0.9rem 0; margin: 0; }
.bp-struct p:last-child { padding-bottom: 0.7rem; }
.bp-struct b { color: var(--text); font-weight: 500; }
.bp-struct__frontier { color: #a78bfa !important; }

/* Intervention groups */
.bp-groups { display: grid; gap: 1rem; }
.bp-group { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.bp-group__head {
  display: flex; align-items: center; gap: 0.7rem; width: 100%;
  background: rgba(243, 237, 224, 0.025); border: none; cursor: pointer;
  padding: 0.9rem 1.1rem; font: 500 0.95rem var(--sans); color: var(--text); text-align: left;
}
.bp-group__icon { font-size: 1.05rem; }
.bp-group__count { margin-left: auto; font-size: 0.78rem; color: var(--muted); }
.bp-group__body { padding: 0.2rem 1.1rem 1rem; display: grid; gap: 0.5rem; }
.bp-group__body li, .bp-group__body { list-style: none; }
.bp-item { display: flex; gap: 0.7rem; align-items: baseline; font-size: 0.92rem; color: var(--text-soft); line-height: 1.5; }
.bp-item::before { content: ""; flex-shrink: 0; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-top: 0.5rem; }

/* Frontier cards */
.bp-frontier { display: grid; gap: 0.9rem; }
.frontier-card {
  border: 1px solid rgba(167, 139, 250, 0.3); border-radius: var(--radius);
  background: rgba(167, 139, 250, 0.04); padding: 1.2rem 1.3rem;
}
.frontier-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; }
.frontier-card__name { font: 400 1.15rem var(--serif); color: var(--text); }
.frontier-card__eta { font: 500 0.72rem var(--sans); color: #a78bfa; white-space: nowrap; }
.frontier-card__status {
  display: inline-block; font-size: 0.68rem; letter-spacing: 0.04em;
  color: #a78bfa; border: 1px solid rgba(167,139,250,0.35); border-radius: 999px;
  padding: 0.2rem 0.6rem; margin: 0.5rem 0;
}
.frontier-card__plain { font-size: 0.92rem; color: var(--text-soft); line-height: 1.6; }
.frontier-card__what { font-size: 0.82rem; color: var(--muted); margin-top: 0.4rem; font-style: italic; }

/* Links row */
.bp-links { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.8rem; padding-top: 1.4rem; border-top: 1px solid var(--border); }
.bp-links a {
  font: 500 0.85rem var(--sans); color: var(--accent); text-decoration: none;
  border: 1px solid rgba(45,212,167,0.35); border-radius: 999px; padding: 0.5rem 1rem;
}
.bp-links a:hover { background: rgba(45,212,167,0.07); }

.body-frontier-note { padding-bottom: 3rem; }
.body-frontier-note p {
  max-width: none; font-size: 0.85rem; color: var(--muted-strong); line-height: 1.6;
  background: rgba(167,139,250,0.05); border: 1px solid rgba(167,139,250,0.2);
  border-radius: var(--radius); padding: 1.1rem 1.3rem;
}
.body-frontier-note strong { color: var(--text); }

@media (max-width: 900px) {
  .body-explorer { grid-template-columns: 1fr; gap: 2rem; }
  .body-figure { position: static; }
  .body-panel { min-height: 0; }
}
