.rb-fields label {
  position: relative;
  display: grid;
  gap: 0.38rem;
  padding-right: 0;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
}

.rb-fields label:has(> .field-help) { padding-right: 2.75rem; }
.rb-age-control { flex-wrap: wrap; padding-block: .5rem; }
.rb-age-control input { flex: 1 0 100%; }
.rb-age-output { width: 100%; text-align: center; }
.rb-metric { overflow-wrap: anywhere; }

.rb-fields label > .field-help {
  position: absolute;
  top: 0.05rem;
  right: 0;
  margin: 0;
}

.rb-fields label > span,
.rb-helper {
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.45;
}

.rb-fields input,
.rb-fields select {
  width: 100%;
  min-height: 2.8rem;
  padding: 0.65rem 0.75rem;
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
}

.rb-money,
.rb-age-control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.8rem;
  padding: 0 0.75rem;
  border: 2px solid var(--border-main);
  border-radius: 0.8rem;
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
}

.rb-money input,
.rb-age-control input {
  min-width: 0;
  padding-inline: 0;
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.rb-age-output {
  min-width: 5rem;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
}

.rb-scenario {
  border: 2px solid var(--border-main);
  border-radius: 1.25rem;
  background: var(--bg-secondary);
  padding: 1rem;
}

.rb-scenario--a { border-top: 5px solid var(--accent-emerald); }
.rb-scenario--b { border-top: 5px solid var(--accent-coral); }

.rb-kicker {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.rb-metric {
  display: block;
  margin-top: 0.3rem;
  color: var(--text-primary);
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.05em;
}

.rb-hero {
  background: #176d68;
  color: #fff;
  border: 4px solid var(--on-accent);
  box-shadow: 7px 7px 0 var(--accent-gold);
}

.rb-hero .rb-kicker,
.rb-hero p { color: rgba(255, 255, 255, 0.86); }
.rb-hero .rb-metric { color: #fff; }

.rb-note {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-left: 4px solid var(--accent-gold);
  border-radius: 0 1rem 1rem 0;
  background: color-mix(in srgb, var(--accent-gold) 12%, transparent);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.rb-note svg { flex: 0 0 auto; color: var(--accent-gold-ink); }

.rb-chart-wrap {
  position: relative;
  min-height: 310px;
}

.rb-formula {
  border: 2px dashed color-mix(in srgb, var(--accent-emerald) 55%, transparent);
  border-radius: 1rem;
  padding: 1rem;
  background: color-mix(in srgb, var(--accent-emerald) 7%, transparent);
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.6;
}

.rb-formula code {
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
}

.rb-table { width: 100%; min-width: 610px; border-collapse: collapse; }
.rb-table th,
.rb-table td { padding: 0.7rem 0.6rem; border-bottom: 1px solid var(--border-main); text-align: right; font-size: 0.8125rem; }
.rb-table th:first-child,
.rb-table td:first-child { text-align: left; }
.rb-table th { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; }
.rb-table td { color: var(--text-secondary); }
.rb-table td strong { color: var(--text-primary); }

@media (max-width: 639px) {
  .rb-chart-wrap { min-height: 260px; }
  .rb-hero { box-shadow: 4px 4px 0 var(--accent-gold); }
}
@media (max-width: 479px) {
  article .grid:has(> .rb-scenario) { grid-template-columns: minmax(0, 1fr); }
}
