/* Lean body mass — reuse IBW form row chrome; LBM-specific results */

.hero.hero--lbm .hero-copy {
  width: 100%;
  max-width: none;
  margin-inline: auto;
  text-align: center;
}

.hero.hero--lbm .hero-copy .h1-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.06em;
  line-height: 1.08;
  font-size: clamp(1.65rem, 5vw, 2.55rem);
  margin-inline: auto;
  width: 100%;
  color: #fff;
}

.hero.hero--lbm .hero-copy .h1-line {
  display: block;
  text-align: center;
  width: 100%;
}

.hero.hero--lbm h1 {
  color: #fff !important;
}

.hero.hero--lbm .hero-lead {
  text-align: center;
  margin-inline: auto;
  max-width: 62ch;
}

.prose--lbm .quick-answer {
  text-align: left;
}

.prose--lbm .quick-answer h2 {
  text-align: left;
  margin-top: 0;
}

.results--lbm .ibw-big,
.results--lbm .ibw-sub,
.results--lbm .ibw-formula-chip,
.results--lbm .fwd-metric span,
.results--lbm .fwd-metric b,
.results--lbm .ibw-compare li span,
.results--lbm .ibw-compare li b,
.results--lbm .ibw-adj-metrics span,
.results--lbm .ibw-adj-metrics b,
.results--lbm .ibw-tip,
.results--lbm .ibw-note-soft,
.results--lbm .field-note,
.results--lbm h3 {
  color: #eaf2f8;
}

.results--lbm .ibw-big {
  font-size: clamp(1.85rem, 4vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.results--lbm .ibw-formula-chip {
  display: block;
  margin: 0.85rem 0 1rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: rgba(53, 224, 196, 0.1);
  border: 1px solid rgba(53, 224, 196, 0.28);
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.82rem;
  line-height: 1.45;
  color: #dffef6 !important;
}

.results--lbm .ibw-compare {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.results--lbm .ibw-compare li {
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.results--lbm .ibw-compare li.is-primary {
  border-color: rgba(53, 224, 196, 0.35);
  background: rgba(53, 224, 196, 0.08);
}

.results--lbm .ibw-compare li span {
  font-size: 0.75rem;
  color: #9fb4c6 !important;
}

.results--lbm .ibw-compare li b {
  font-size: 0.95rem;
  color: #fff !important;
}

.lbm-composition {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}

.lbm-composition > div {
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.lbm-composition span {
  display: block;
  font-size: 0.72rem;
  color: #9fb4c6;
  margin-bottom: 0.2rem;
}

.lbm-composition b {
  font-size: 0.95rem;
  color: #fff;
}

.prose--lbm .formula-viz {
  margin: 1.1rem 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #0a121d;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.prose--lbm .formula-viz .fv-title {
  margin: 0 0 0.55rem;
  color: #9fb4c6;
  font-size: 0.82rem;
  font-weight: 650;
}

.prose--lbm .fv-equation {
  font-family: var(--font-mono, "IBM Plex Mono", monospace);
  font-size: 0.92rem;
  color: #eaf2f8;
  line-height: 1.55;
}

.prose--lbm .fv-equation b {
  color: #35e0c4;
}

.prose--lbm .lbm-viz-grid {
  display: grid;
  gap: 0.85rem;
  margin: 1.1rem 0;
}

@media (min-width: 720px) {
  .prose--lbm .lbm-viz-grid {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: stretch;
  }
}

.prose--lbm .lbm-viz-card {
  margin: 0;
  padding: 1rem 1.05rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.prose--lbm .lbm-viz-card h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.prose--lbm .lbm-stack-bars {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.75rem;
}

.prose--lbm .lbm-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 52px;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.82rem;
}

.prose--lbm .lbm-bar-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}

html[data-theme="dark"] .prose--lbm .lbm-bar-track {
  background: rgba(255, 255, 255, 0.08);
}

.prose--lbm .lbm-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #3c93ff, #35e0c4);
}

.prose--lbm .lbm-bar-fill--fat {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
}

.prose--lbm h2 {
  font-size: clamp(1.2rem, 2.6vw, 1.45rem);
  margin-top: 2.2rem;
  line-height: 1.3;
}

.prose--lbm .quick-answer h2 {
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
}

html:not([data-theme="dark"]) .prose--lbm .fv-equation,
html:not([data-theme="dark"]) .prose--lbm .fv-equation span,
html:not([data-theme="dark"]) .prose--lbm .fv-equation b {
  color: #0b1220;
}

html:not([data-theme="dark"]) .prose--lbm .formula-viz {
  background: #f4f8fc;
  border-color: rgba(15, 23, 42, 0.1);
}

html:not([data-theme="dark"]) .prose--lbm .formula-viz .fv-title {
  color: #5b6b7c;
}

@media (max-width: 640px) {
  .hero.hero--lbm .hero-copy .h1-stack {
    font-size: clamp(1.35rem, 6.2vw, 1.75rem);
  }

  .hero.hero--lbm .hero-lead {
    font-size: 0.92rem;
    line-height: 1.48;
    max-width: 36ch;
  }

  .results--lbm .ibw-compare,
  .lbm-composition {
    grid-template-columns: 1fr;
  }

  .prose--lbm .lbm-bar-row {
    grid-template-columns: 64px 1fr 48px;
    font-size: 0.78rem;
  }
}

/* Optional body-fat section was visually breaking on mobile.
   User requested to remove/hide it. */
#lbmBodyFatRow,
#lbmBfBlock,
#lbmNoBfNote {
  display: none !important;
}

/* LBM unit selectors + ft/in dual inputs */
.lbm-ftin {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
  padding: 0.1rem 0;
}

.lbm-ftin:not([hidden]) {
  display: grid;
}

/* Keep the unit dropdown visible (native select options can be clipped) */
.hero--lbm .ibw-unit-shell {
  overflow: visible;
}

.hero--lbm .ibw-unit-meta {
  z-index: 5;
}

.hero--lbm .ibw-unit-meta .unit-select {
  flex: 1 1 auto;
  min-width: 9.4rem;
  width: auto;
  padding: 0 2.05rem 0 0.65rem;
  height: 2.35rem;
  line-height: 2.35rem;
  font-size: 0.86rem;
  font-weight: 650;
  color: #eaf2f8 !important;
  -webkit-text-fill-color: #eaf2f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: rgba(255, 255, 255, 0.06) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23eaf2f8' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.45rem center;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 10px;
  box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}

.hero--lbm .ibw-unit-meta .unit-select:focus {
  outline: none;
  border-color: rgba(53, 224, 196, 0.6);
  box-shadow: 0 0 0 4px rgba(53, 224, 196, 0.12);
}

/* Light theme: dark text + arrow on white input shell */
html:not([data-theme="dark"]) .hero--lbm .ibw-unit-meta .unit-select {
  color: #0f172a !important;
  -webkit-text-fill-color: #0f172a;
  background-color: rgba(15, 23, 42, 0.04) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230f172a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  border: 1px solid rgba(15, 23, 42, 0.12) !important;
}

html:not([data-theme="dark"]) .hero--lbm .ibw-unit-meta .unit-select:focus {
  border-color: rgba(23, 195, 170, 0.55);
  box-shadow: 0 0 0 4px rgba(23, 195, 170, 0.14);
}
