/* ══════════════════════════════════════════════════
   YBT · Hoja de Resultados
   Aesthetic: Clinical Luxury — dark, precise, refined
   Fonts: Instrument Serif (headings) · JetBrains Mono (values) · Syne (labels/nav)
══════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────── */
:root {
  --bg:          #080b10;
  --bg-2:        #0b0f16;
  --surface:     #0f1520;
  --surface-2:   #131c2a;
  --surface-3:   #192334;
  --border:      rgba(120, 160, 220, 0.09);
  --border-2:    rgba(120, 160, 220, 0.17);

  --text:        #e4edf8;
  --text-2:      #7fa0c0;
  --text-3:      #435a72;

  --cyan:        #00d4b8;
  --cyan-dim:    rgba(0, 212, 184, 0.10);
  --cyan-glow:   rgba(0, 212, 184, 0.20);
  --jade:        #34d399;
  --jade-dim:    rgba(52, 211, 153, 0.10);
  --amber:       #fbbf24;
  --amber-dim:   rgba(251, 191, 36, 0.10);
  --red:         #f87171;
  --red-dim:     rgba(248, 113, 113, 0.10);
  --blue:        #60a5fa;

  --serif:    'Instrument Serif', Georgia, serif;
  --mono:     'JetBrains Mono', 'Fira Mono', monospace;
  --sans:     'Syne', system-ui, sans-serif;

  --radius:    12px;
  --radius-sm: 8px;
  --sidebar-w: 240px;
  --transition: 200ms cubic-bezier(.4,0,.2,1);
}

/* ── RESET ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ── BASE ────────────────────────────────────────── */
.body-style {
  background:
    radial-gradient(ellipse 800px 600px at 0% 0%, rgba(0,212,184,.04) 0%, transparent 55%),
    radial-gradient(ellipse 600px 500px at 100% 100%, rgba(96,165,250,.03) 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  min-height: 100vh;
  line-height: 1.5;
}

/* ── LOADER ──────────────────────────────────────── */
.res-loader {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 16, .92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  transition: opacity .4s, visibility .4s;
}
.res-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.res-loader__inner { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.res-loader__pulse {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 2px solid rgba(0,212,184,.2);
  border-top-color: var(--cyan);
  animation: spin .75s linear infinite;
}
.res-loader__text {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
  letter-spacing: .06em;
}

/* ── LAYOUT: sidebar + main ──────────────────────── */
.res-wrap {
  display: flex;
  min-height: 100vh;
  opacity: 0;
  transition: opacity .5s ease;
}
.res-wrap.visible { opacity: 1; }

/* ── SIDEBAR ─────────────────────────────────────── */
.res-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  gap: 24px;
}

.res-sidebar__top { display: flex; flex-direction: column; gap: 6px; }

.res-sidebar__eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--cyan);
  opacity: .8;
}
.res-sidebar__consulta {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.1;
  color: var(--text);
}
.res-sidebar__fecha {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  line-height: 1.4;
}

/* Nav */
.res-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.res-nav__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
  transition: all var(--transition);
  position: relative;
}
.res-nav__item:hover { color: var(--text-2); background: var(--surface-2); }
.res-nav__item.active { color: var(--cyan); background: var(--cyan-dim); }
.res-nav__dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  opacity: .5;
  transition: opacity var(--transition);
}
.res-nav__item.active .res-nav__dot { opacity: 1; }
.res-nav__item[hidden] { display: none; }

/* Actions */
.res-sidebar__actions { display: flex; flex-direction: column; gap: 8px; }

.res-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  border: none;
  transition: all var(--transition);
  letter-spacing: .02em;
}
.res-btn--primary {
  background: var(--cyan);
  color: #050a0e;
  font-weight: 600;
}
.res-btn--primary:hover { background: #1de8cc; box-shadow: 0 4px 20px var(--cyan-glow); transform: translateY(-1px); }
.res-btn--ghost {
  background: var(--surface-3);
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.res-btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.res-btn:disabled { opacity: .5; pointer-events: none; }

.res-sidebar__id {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.res-sidebar__id-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.res-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-2);
}

/* ── MAIN ────────────────────────────────────────── */
.res-main {
  flex: 1;
  padding: 36px 40px 80px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

/* Hero: KPIs + tendencias arriba */
.res-hero {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* Grid principal de dos columnas (clínico / composición) */
.res-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 36px;
  align-items: start;
}
.res-col {
  display: flex;
  flex-direction: column;
  gap: 36px;
  min-width: 0;
}
@media (max-width: 1180px) {
  .res-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ── SECTION HEADER ──────────────────────────────── */
.res-section__header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.res-section__title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  font-style: italic;
  color: var(--text);
  white-space: nowrap;
  letter-spacing: -.01em;
}
.res-section__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border-2), transparent);
}

/* ── KPI CARDS ───────────────────────────────────── */
.res-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.res-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  animation: fadeUp .4s ease both;
}
.res-kpi:hover { border-color: var(--border-2); transform: translateY(-2px); }
.res-kpi::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0,212,184,.15), transparent);
}
.res-kpi__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.res-kpi__value {
  font-family: var(--mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.02em;
}
.res-kpi__sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-3);
}
.res-kpi__delta {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  padding: 2px 0;
}
.res-kpi__delta--up   { color: var(--red); }
.res-kpi__delta--down { color: var(--jade); }
.res-kpi__delta--flat { color: var(--text-3); }
.res-kpi__bar {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  background: var(--bar-color, var(--cyan));
  opacity: .4;
}

/* ── SPARKLINES ──────────────────────────────────── */
.res-sparks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
.res-spark {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeUp .4s ease both;
}
.res-spark:hover { border-color: var(--border-2); }
.res-spark__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.res-spark__row { display: flex; align-items: baseline; gap: 8px; }
.res-spark__value {
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}
.res-spark__delta {
  font-family: var(--mono);
  font-size: 11px;
}
.res-spark__delta--up   { color: var(--red); }
.res-spark__delta--down { color: var(--jade); }
.res-spark__delta--flat { color: var(--text-3); }
.res-spark__svg {
  display: block;
  width: 100%;
  height: 38px;
  overflow: visible;
  margin-top: 2px;
}

/* ── BLOCKS GRID (vitales/bioq/comp) ─────────────── */
.res-blocks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.res-blocks--compact {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (max-width: 520px) {
  .res-blocks--compact { grid-template-columns: repeat(2, 1fr); }
}
.res-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--transition);
  animation: fadeUp .35s ease both;
}
.res-block:hover { border-color: var(--border-2); }
.res-block--wide { grid-column: span 2; }
.res-block--accent { border-color: rgba(0,212,184,.18); }

.res-block__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.res-block__value {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1;
}
.res-block__value-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.res-block__value-row .res-block__value { font-size: 20px; }
.res-block__delta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}

/* ── BADGE ───────────────────────────────────────── */
.res-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 100px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .04em;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.badge-ok   { background: var(--jade-dim);  color: var(--jade);  border-color: rgba(52,211,153,.2); }
.badge-warn { background: var(--amber-dim); color: var(--amber); border-color: rgba(251,191,36,.2); }
.badge-bad  { background: var(--red-dim);   color: var(--red);   border-color: rgba(248,113,113,.2); }
.badge-muted{ background: var(--surface-3); color: var(--text-3);border-color: var(--border); }

/* ── PROGRESS BAR ────────────────────────────────── */
.res-progressbar { display: flex; flex-direction: column; gap: 6px; }
.res-progressbar__track {
  position: relative;
  height: 6px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}
.res-progressbar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--jade), var(--amber) 65%, var(--red));
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.res-progressbar__markers {
  position: absolute;
  inset: 0;
  font-family: var(--mono);
  font-size: 8px;
  color: var(--text-3);
  pointer-events: none;
}
.res-progressbar__markers span {
  position: absolute;
  top: -14px;
  transform: translateX(-50%);
}
.res-progressbar__meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}

/* ── BIOQ GROUPS (Glucemia, Lípidos, etc.) ──────── */
.res-bioq-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: .03em;
  margin-bottom: 14px;
  font-style: italic;
}
.res-bioq-group { display: flex; flex-direction: column; gap: 8px; }
.res-bioq-group + .res-bioq-group { margin-top: 16px; }
.res-bioq-group__title {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-2);
  padding-left: 2px;
  position: relative;
}
.res-bioq-group__title::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--cyan);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  opacity: .7;
}

/* ── COMP HERO (card grande de % grasa con ring) ── */
.res-comp-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(0,212,184,.05), rgba(96,165,250,.03));
  border: 1px solid rgba(0,212,184,.18);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 12px;
  animation: fadeUp .4s ease both;
}
.res-comp-hero__main {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.res-comp-hero__label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.res-comp-hero__row {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.res-comp-hero__value {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -.02em;
  line-height: 1;
}
.res-comp-hero__delta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-3);
}
.res-comp-hero__meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  letter-spacing: .04em;
}
.res-comp-hero__ring {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.res-comp-hero__ring svg { display: block; }
.res-comp-hero__ring::after {
  content: attr(data-pct);
  position: absolute;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cyan);
}

/* ── PLIEGUES: resumen + lista con barras ─────────── */
.res-pl-summary {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
}
.res-pl-summary__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: fadeUp .35s ease both;
}
.res-pl-summary__label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.res-pl-summary__value {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  line-height: 1;
}
.res-pl-summary__unit {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
}
.res-pl-summary__item:first-child .res-pl-summary__value { color: var(--cyan); }

.res-pl-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  animation: fadeUp .4s ease both;
}
.res-pl-row {
  display: grid;
  grid-template-columns: 110px 1fr 70px;
  align-items: center;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
}
.res-pl-row:last-child { border-bottom: none; }
.res-pl-row__name {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-2);
  letter-spacing: .03em;
}
.res-pl-row__bar {
  position: relative;
  height: 4px;
  background: var(--surface-3);
  border-radius: 99px;
  overflow: hidden;
}
.res-pl-row__bar span {
  position: absolute;
  inset: 0;
  width: 0%;
  background: linear-gradient(90deg, var(--cyan), var(--blue));
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}
.res-pl-row__val {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.res-pl-row.is-empty .res-pl-row__val { color: var(--text-3); }
.res-pl-row.is-empty .res-pl-row__name { color: var(--text-3); opacity: .6; }

@media (max-width: 600px) {
  .res-pl-summary { grid-template-columns: 1fr; }
  .res-pl-row { grid-template-columns: 90px 1fr 56px; gap: 8px; }
}

/* ── INSIGHTS ────────────────────────────────────── */
.res-insights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.res-insights li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  animation: fadeUp .4s ease both;
  transition: border-color var(--transition);
}
.res-insights li:hover { border-color: var(--border-2); }
.res-insights li::before {
  content: '→';
  color: var(--cyan);
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: .7;
}
.res-insights li.insight--ok::before    { color: var(--jade); }
.res-insights li.insight--warn::before  { color: var(--amber); }
.res-insights li.insight--bad::before   { color: var(--red); }

/* ── FOOTER ──────────────────────────────────────── */
.res-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.res-footer__disclaimer {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-3);
  max-width: 520px;
  line-height: 1.5;
}
.res-footer__ver {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-3);
  flex-shrink: 0;
}

/* ── EMPTY STATE ─────────────────────────────────── */
.res-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 50vh;
  color: var(--text-3);
}
.res-empty__icon { opacity: .3; }
.res-empty__text {
  font-family: var(--mono);
  font-size: 13px;
  text-align: center;
}

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger delays for children */
.res-kpis .res-kpi:nth-child(1) { animation-delay: .04s; }
.res-kpis .res-kpi:nth-child(2) { animation-delay: .08s; }
.res-kpis .res-kpi:nth-child(3) { animation-delay: .12s; }
.res-kpis .res-kpi:nth-child(4) { animation-delay: .16s; }
.res-sparks .res-spark:nth-child(1) { animation-delay: .06s; }
.res-sparks .res-spark:nth-child(2) { animation-delay: .10s; }
.res-sparks .res-spark:nth-child(3) { animation-delay: .14s; }
.res-sparks .res-spark:nth-child(4) { animation-delay: .18s; }
.res-sparks .res-spark:nth-child(5) { animation-delay: .22s; }
.res-sparks .res-spark:nth-child(6) { animation-delay: .26s; }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 900px) {
  .res-wrap { flex-direction: column; }
  .res-sidebar {
    width: 100%;
    height: auto;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    padding: 16px 20px;
    gap: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .res-sidebar__top { flex: 1; }
  .res-sidebar__actions { flex-direction: row; }
  .res-nav { display: none; }
  .res-sidebar__id { display: none; }
  .res-main { padding: 24px 20px 60px; gap: 36px; }
}
@media (max-width: 600px) {
  .res-main { padding: 20px 16px 60px; }
  .res-kpis { grid-template-columns: repeat(2, 1fr); }
  .res-sparks { grid-template-columns: repeat(2, 1fr); }
  .res-blocks { grid-template-columns: repeat(2, 1fr); }
  .res-block--wide { grid-column: span 2; }
  .res-section__title { font-size: 20px; }
}

/* ── LIGHT THEME ─────────────────────────────────── */
.light-theme {
  --bg:          #f2f5f9;
  --bg-2:        #eaeff6;
  --surface:     #ffffff;
  --surface-2:   #f7f9fd;
  --surface-3:   #ecf0f8;
  --border:      rgba(79,120,200,.10);
  --border-2:    rgba(79,120,200,.20);
  --text:        #0d1929;
  --text-2:      #3a5278;
  --text-3:      #8097b4;
  --cyan-dim:    rgba(0,150,130,.07);
  --cyan-glow:   rgba(0,180,160,.18);
  --jade-dim:    rgba(34,197,120,.08);
  --amber-dim:   rgba(217,148,0,.08);
  --red-dim:     rgba(220,70,70,.08);
}
.light-theme .body-style {
  background:
    radial-gradient(ellipse 800px 600px at 0% 0%, rgba(0,180,160,.03) 0%, transparent 55%),
    var(--bg);
}
.light-theme .res-sidebar { background: var(--surface); }
.light-theme .res-loader { background: rgba(242,245,249,.92); }

/* ── Somatotipo (Heath-Carter) ──────────────────── */
.res-somato {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: 20px;
  align-items: center;
}
.res-somato__chart { width: 100%; }
.res-somato__chart svg { width: 100%; height: auto; display: block; }
.res-somato__chart .rs-outline { fill: rgba(0,212,184,.05); stroke: var(--border-2); stroke-width: 1.2; }
.res-somato__chart .rs-axis    { stroke: var(--border-2); stroke-width: 1; }
.res-somato__chart .rs-guide   { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 4; }
.res-somato__chart .rs-center  { fill: var(--text-3); }
.res-somato__chart .rs-label   { font: 700 9.5px 'Syne', system-ui, sans-serif; letter-spacing: .3px; }

.res-somato__panel { display: flex; flex-direction: column; gap: 14px; }
.res-somato__kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.res-somato__kpi {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
  background: var(--surface-3);
}
.res-somato__kpi-label {
  display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 5px;
}
.res-somato__kpi-val { font-size: 24px; font-weight: 700; color: var(--text); font-family: 'JetBrains Mono', monospace; }
.res-somato__kpi--endo .res-somato__kpi-val { color: var(--amber); }
.res-somato__kpi--meso .res-somato__kpi-val { color: var(--jade); }
.res-somato__kpi--ecto .res-somato__kpi-val { color: var(--cyan); }

.res-somato__tipo-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--cyan-dim);
}
.res-somato__tipo-label { font-size: 10px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-3); }
.res-somato__tipo { font-size: 15px; font-weight: 700; color: var(--cyan); text-align: right; }
.res-somato__coords { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }

@media (max-width: 720px) {
  .res-somato { grid-template-columns: 1fr; }
}