/* ==========================================================================
   HEIGHT PERCENTILE CALCULATOR - CALCULATOR UI STYLES
   ========================================================================== */

/* Calculator Card Container */
.calculator-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
  padding: 2.25rem;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.calculator-header {
  margin-bottom: 1.75rem;
  text-align: left;
}

.calculator-header h2 {
  font-size: 1.65rem;
  margin: 0 0 0.5rem 0;
  color: var(--text-main);
}

.calculator-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* Form Controls */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .sub-label {
  font-weight: 400;
  font-size: 0.825rem;
  color: var(--text-muted);
}

.form-input, .form-select {
  width: 100%;
  height: 48px;
  padding: 0 1rem;
  font-family: var(--font-family);
  font-size: 1rem;
  color: var(--text-main);
  background-color: var(--bg-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  appearance: none;
}

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2064748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--border-focus);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Dual input fields (e.g. Feet & Inches or Years & Months) */
.input-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

/* Radio / Segmented Unit Switcher */
.unit-switcher {
  display: flex;
  background-color: var(--bg-alt);
  border-radius: var(--radius-md);
  padding: 0.25rem;
  border: 1px solid var(--border-color);
}

.unit-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.5rem 1rem;
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.unit-btn.active {
  background-color: #ffffff;
  color: var(--primary-color);
  box-shadow: var(--shadow-sm);
}

/* Inline Errors */
.error-msg {
  color: var(--status-error);
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.35rem;
  display: none;
}

.form-group.has-error .error-msg {
  display: block;
}

.form-group.has-error .form-input {
  border-color: var(--status-error);
  background-color: var(--status-error-bg);
}

/* Calculator Actions */
.calculator-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.calculator-actions .btn-primary {
  flex: 2;
  height: 52px;
  font-size: 1.05rem;
}

.calculator-actions .btn-secondary {
  flex: 1;
  height: 52px;
}

/* Result Card - integrated into calculator layout */
.result-card {
  display: none;
  background: transparent;
  color: var(--text-main);
  border: none;
  border-top: 1px solid var(--border-color);
  padding: 2rem 0 0 0;
  margin-top: 2rem;
  box-shadow: none;
  border-radius: 0;
  animation: fadeIn 0.4s ease-out;
}

.result-card.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  text-align: center;
  margin-bottom: 1.75rem;
}

.result-header .result-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 0.85rem;
}

.result-value-big {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.1;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.result-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 0.45rem 1.25rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.925rem;
}

.result-description {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  margin: 1.75rem 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: #334155;
  text-align: left;
}

.result-grid-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.summary-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.9rem 1rem;
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.summary-box:hover {
  background: #f8fafc;
  border-color: #bfdbfe;
  box-shadow: 0 4px 12px rgba(15, 98, 254, 0.08);
}

.summary-box .label {
  font-size: 0.725rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  margin-bottom: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.summary-box .label svg {
  color: var(--primary-color);
  opacity: 0.9;
  flex-shrink: 0;
}

.summary-box .val {
  font-size: 1.05rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.3;
}

/* Visual Percentile Gauge Scale Bar */
.percentile-scale-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.25rem 1rem;
  margin: 1.75rem 0;
}

.percentile-scale-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 1rem;
}

.scale-bar-track {
  position: relative;
  height: 12px;
  background: linear-gradient(90deg, #38bdf8 0%, #0f62fe 35%, #10b981 65%, #8b5cf6 100%);
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.scale-marker {
  position: absolute;
  top: -6px;
  transform: translateX(-50%);
  width: 24px;
  height: 24px;
  background-color: #ffffff;
  border: 3.5px solid var(--primary-color);
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.4);
  border-radius: 50%;
  transition: left 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  position: relative;
  padding-top: 0.25rem;
}

.scale-ticks span {
  position: relative;
  text-align: center;
}

.scale-ticks span::before {
  content: '';
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  height: 6px;
  background-color: #cbd5e1;
}

/* Height Comparison Graphic Tool */
.user-columns-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .user-columns-grid {
    grid-template-columns: 1fr;
  }
}

.user-column-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: all 0.2s ease;
}

.user-column-card:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.user-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.user-card-header .user-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
}

.user-card-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

/* Height Comparison Graphic Tool - Enhanced Result UI */
.height-compare-wrapper {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 2rem;
  height: 480px;
  background: linear-gradient(180deg, #f0f9ff 0%, #edf2f7 100%);
  border-radius: var(--radius-lg);
  padding: 3.25rem 2rem 1.25rem;
  margin: 1.5rem 0 2rem;
  position: relative;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.03);
}

@media (max-width: 600px) {
  .height-compare-wrapper {
    height: 390px;
    gap: 0.75rem;
    padding: 2.5rem 0.75rem 1rem;
  }
}

.ruler-bg-grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(to bottom, rgba(148, 163, 184, 0.15) 1px, transparent 1px);
  background-size: 100% 28px;
  pointer-events: none;
}

.stage-baseline-platform {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 10px;
  background: linear-gradient(90deg, #3b82f6 0%, #0284c7 50%, #0d9488 100%);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.figure-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  z-index: 2;
  position: relative;
  padding-top: 1rem;
}

.taller-badge {
  background: #2563eb;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 12px;
  margin-bottom: 0.5rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  z-index: 4;
}

.figure-img-container {
  width: 175px;
  max-height: 85%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  vertical-align: bottom;
}

@media (max-width: 600px) {
  .figure-img-container {
    width: 125px;
  }
}

.character-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  background: transparent !important;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.18));
}

/* Person B fine-tune alignment - raised slightly up relative to Person A */
#figBox2 .figure-img-container {
  transform: translateY(-4px);
}

.gap-dimension-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  z-index: 3;
  margin-bottom: 3.5rem;
}

.gap-badge {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid #cbd5e1;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  white-space: nowrap;
}

.figure-label {
  margin-top: 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
  color: var(--text-main);
}

.figure-height-val {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-color);
}

/* Enhanced Result Details */
.comp-result-details {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.result-summary-banner {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.summary-stat-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
}

.summary-main-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: #ffffff;
}

.summary-main-val .sub-val {
  font-size: 1.1rem;
  font-weight: 500;
  color: #cbd5e1;
}

.summary-pill-insight {
  background: rgba(59, 130, 246, 0.2);
  border: 1px solid rgba(147, 197, 253, 0.3);
  color: #93c5fd;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
}

.perspective-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

@media (max-width: 768px) {
  .perspective-cards-grid {
    grid-template-columns: 1fr;
  }
  .result-summary-banner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.perspective-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.perspective-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.perspective-header .badge-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.perspective-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-main);
}

.perspective-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   HEIGHT CONVERSION CALCULATOR SPECIFIC STYLES
   ========================================================================== */

/* Quick Mode Switcher Pills */
.quick-modes-wrapper {
  margin-bottom: 1.5rem;
}

.quick-modes-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.quick-modes-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-mode-pill {
  background: var(--bg-main);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quick-mode-pill:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  background: var(--primary-light);
}

.quick-mode-pill.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.3);
}

/* Input group styling enhancements */
.input-with-badge {
  position: relative;
  display: flex;
  align-items: center;
}

.input-unit-badge {
  position: absolute;
  right: 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  pointer-events: none;
  border: 1px solid var(--border-color);
}

.form-group .form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Action buttons elevation */
.btn-primary svg, .btn-secondary svg {
  flex-shrink: 0;
}

/* Extended Multi-Unit Summary Grid */
.summary-grid-6 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.5rem;
}

@media (max-width: 768px) {
  .summary-grid-6 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .summary-grid-6 {
    grid-template-columns: 1fr;
  }
}

.conv-hero-result {
  background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.25rem;
  text-align: center;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.08);
}

.conv-hero-val {
  font-family: var(--font-heading);
  font-size: clamp(2.1rem, 7.5vw, 3.25rem);
  font-weight: 800;
  color: #0c4a6e;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0.5rem 0;
  word-break: break-word;
}

.conv-sub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: #0369a1;
  border: 1px solid #7dd3fc;
  padding: 0.4rem 1.15rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Step-by-Step Math & Formula Box */
.formula-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.formula-card-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.formula-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9rem;
  color: #0f172a;
  background: #ffffff;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  display: block;
  word-break: break-all;
}

.formula-card .step-list {
  margin-top: 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: #334155;
}

.formula-card .step-list li {
  margin-bottom: 0.35rem;
}

/* ==========================================================================
   HEIGHT PREDICTION CALCULATOR ENHANCED RESULT UI
   ========================================================================== */
.pred-result-card {
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px dashed var(--border-color);
}

.pred-result-header {
  text-align: center;
  margin-bottom: 2rem;
}

.pred-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0284c7;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
}

.pred-main-stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.pred-num {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-weight: 800;
  color: #0f172a;
  line-height: 1;
  letter-spacing: -0.03em;
  word-break: break-word;
}

.pred-subnum {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 4vw, 1.75rem);
  font-weight: 600;
  color: #0284c7;
}

.pred-badge-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.pred-category-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
}

.pred-sex-badge {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 0.4rem 0.85rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: capitalize;
}

/* Prediction Scale Gauge */
.pred-scale-container {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.5rem 1.25rem;
  margin-bottom: 1.75rem;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.8);
}

.pred-scale-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.pred-scale-title {
  font-size: 0.775rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.pred-scale-range-val {
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f62fe;
  background: #ffffff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  border: 1px solid #bfdbfe;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.pred-scale-track-wrapper {
  position: relative;
  padding: 0.5rem 0 0;
}

.pred-scale-track {
  position: relative;
  height: 14px;
  background: #e2e8f0;
  border-radius: 9999px;
  margin-bottom: 2.25rem;
  overflow: visible;
}

.pred-scale-range-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 15%;
  right: 15%;
  background: linear-gradient(90deg, #38bdf8 0%, #0f62fe 50%, #10b981 100%);
  border-radius: 9999px;
  box-shadow: 0 2px 8px rgba(15, 98, 254, 0.3);
}

.pred-scale-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  background: #ffffff;
  border: 4px solid #0f62fe;
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(15, 98, 254, 0.4);
  z-index: 5;
  transition: left 0.5s ease-out;
}

.pred-scale-marker .marker-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(15, 98, 254, 0.25);
  animation: pulseMarker 2s infinite;
}

.pred-scale-marker .marker-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.pred-scale-marker .marker-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.pred-scale-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  text-align: center;
}

.scale-point {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.scale-point.min-point { align-items: flex-start; text-align: left; }
.scale-point.mid-point { align-items: center; text-align: center; }
.scale-point.max-point { align-items: flex-end; text-align: right; }

.point-tag {
  font-size: 0.725rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
}

.point-val {
  font-size: 0.925rem;
  font-weight: 700;
  color: #0f172a;
}

/* 4-Metric Grid */
.pred-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
  .pred-metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .pred-metrics-grid {
    grid-template-columns: 1fr;
  }
}

.pred-metric-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.pred-metric-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.metric-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.metric-icon.blue { background: #eff6ff; color: #2563eb; }
.metric-icon.green { background: #ecfdf5; color: #059669; }
.metric-icon.orange { background: #fff7ed; color: #ea580c; }
.metric-icon.purple { background: #f5f3ff; color: #7c3aed; }

.metric-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.metric-label {
  font-size: 0.725rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.metric-value {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

/* Parent vs Child Bar Chart Comparison */
.pred-comparison-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.75rem;
}

.comparison-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 1.15rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.parent-compare-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.parent-bar-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.parent-bar-item.highlight .bar-label {
  color: #0f62fe;
  font-weight: 800;
}

.parent-bar-item.highlight .bar-val {
  color: #0f62fe;
  font-weight: 800;
}

.bar-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.bar-label {
  font-weight: 600;
  color: #475569;
}

.bar-val {
  font-weight: 700;
  color: #0f172a;
}

.bar-track {
  height: 10px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.bar-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.bar-fill.mother-fill { background: linear-gradient(90deg, #ec4899 0%, #f43f5e 100%); }
.bar-fill.child-fill { background: linear-gradient(90deg, #3b82f6 0%, #0f62fe 100%); }
.bar-fill.father-fill { background: linear-gradient(90deg, #0ea5e9 0%, #0284c7 100%); }

/* Clinical Insight Note */
.pred-insight-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.875rem;
  color: #0369a1;
  line-height: 1.55;
}

.pred-insight-box .insight-icon {
  color: #0284c7;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.pred-insight-box strong {
  color: #0c4a6e;
}

