.wb-child-growth {
  --wb-green: #167a58;
  --wb-green-dark: #0d5e43;
  --wb-mint: #eef9f4;
  --wb-border: #cfe5db;
  --wb-ink: #18322a;
  --wb-muted: #5c716a;
  box-sizing: border-box;
  max-width: 100%;
  margin: 28px 0;
  overflow: hidden;
  border: 1px solid var(--wb-border);
  border-radius: 22px;
  background: #fff;
  color: var(--wb-ink);
  box-shadow: 0 16px 38px rgba(17, 83, 61, .08);
}

.wb-child-growth *, .wb-child-growth *::before, .wb-child-growth *::after { box-sizing: border-box; }
.wb-child-growth .wb-tool__header { padding: 26px 28px 22px; background: linear-gradient(135deg, #f2fbf7, #fff); border-bottom: 1px solid var(--wb-border); }
.wb-child-growth .wb-tool__eyebrow { display: inline-block; margin-bottom: 7px; color: var(--wb-green); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.wb-child-growth .wb-tool__title { margin: 0 0 8px; color: var(--wb-ink); font-size: clamp(24px, 4vw, 34px); line-height: 1.15; }
.wb-child-growth .wb-tool__intro { max-width: 760px; margin: 0; color: var(--wb-muted); line-height: 1.65; }
.wb-child-growth .wb-tool__form, .wb-child-growth__visual, .wb-child-growth__table-section { padding: 24px 28px; }
.wb-child-growth .wb-tool__form { border-bottom: 1px solid var(--wb-border); }
.wb-child-growth fieldset { min-width: 0; margin: 0 0 20px; padding: 0; border: 0; }
.wb-child-growth legend, .wb-child-growth .wb-tool__field > label { display: block; margin: 0 0 8px; color: var(--wb-ink); font-size: 14px; font-weight: 750; }
.wb-child-growth__choices { display: flex; flex-wrap: wrap; gap: 10px; }
.wb-child-growth__choices label { cursor: pointer; }
.wb-child-growth__choices input { position: absolute; opacity: 0; pointer-events: none; }
.wb-child-growth__choices span, .wb-child-growth__metrics button { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; margin: 0; padding: 9px 16px; border: 1px solid var(--wb-border); border-radius: 999px; background: #fff; color: var(--wb-ink); font: inherit; font-weight: 700; cursor: pointer; }
.wb-child-growth__choices input:checked + span, .wb-child-growth__metrics button[aria-pressed="true"] { border-color: var(--wb-green); background: var(--wb-green); color: #fff; }
.wb-child-growth__choices input:focus-visible + span, .wb-child-growth__metrics button:focus-visible, .wb-child-growth input:focus-visible, .wb-child-growth select:focus-visible, .wb-child-growth button:focus-visible { outline: 3px solid rgba(22, 122, 88, .22); outline-offset: 2px; }
.wb-child-growth .wb-tool__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.wb-child-growth__age-fields { max-width: 560px; }
.wb-child-growth .wb-tool__field { min-width: 0; }
.wb-child-growth .wb-tool__field input, .wb-child-growth .wb-tool__field select { width: 100%; height: 52px; margin: 0; padding: 0 14px; appearance: none; border: 1px solid #b8d3c7; border-radius: 12px; background: #fff; color: var(--wb-ink); font: inherit; line-height: 1; box-shadow: none; }
.wb-child-growth .wb-tool__input-wrap { position: relative; }
.wb-child-growth .wb-tool__input-wrap input { padding-right: 54px; }
.wb-child-growth .wb-tool__unit { position: absolute; top: 50%; right: 14px; transform: translateY(-50%); color: var(--wb-muted); font-size: 13px; font-weight: 700; }
.wb-child-growth .wb-tool__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.wb-child-growth .wb-tool__button { min-height: 48px; margin: 0; padding: 11px 20px; border: 1px solid var(--wb-green); border-radius: 12px; font: inherit; font-weight: 800; cursor: pointer; }
.wb-child-growth .wb-tool__button--primary { background: var(--wb-green); color: #fff; }
.wb-child-growth .wb-tool__button--primary:hover { background: var(--wb-green-dark); }
.wb-child-growth .wb-tool__button--secondary { background: #fff; color: var(--wb-green-dark); }
.wb-child-growth .wb-tool__error { margin: 0 0 16px; padding: 11px 14px; border-radius: 10px; background: #fff1ef; color: #9c2f24; font-weight: 700; }
.wb-child-growth .wb-tool__result { padding: 24px 28px; border-bottom: 1px solid var(--wb-border); background: #fbfefd; }
.wb-child-growth .wb-tool__result h4, .wb-child-growth__visual h4, .wb-child-growth__table-section h4 { margin: 0 0 14px; color: var(--wb-ink); font-size: 20px; }
.wb-child-growth__result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wb-child-growth__result-card { min-width: 0; padding: 16px; border: 1px solid var(--wb-border); border-radius: 15px; background: #fff; }
.wb-child-growth__result-card > span { display: block; margin-bottom: 7px; color: var(--wb-muted); font-size: 13px; font-weight: 750; }
.wb-child-growth__result-card strong { display: block; margin-bottom: 7px; color: var(--wb-green-dark); font-size: 25px; }
.wb-child-growth__result-card p { margin: 0 0 7px; line-height: 1.45; }
.wb-child-growth__result-card small { color: var(--wb-muted); }
.wb-child-growth__result-card--note { background: var(--wb-mint); }
.wb-child-growth__chart-controls { display: grid; grid-template-columns: auto minmax(180px, 1fr); gap: 16px 24px; align-items: end; margin-bottom: 18px; }
.wb-child-growth__sex--compact { grid-column: 1 / -1; margin-bottom: 0 !important; }
.wb-child-growth__metrics { display: flex; flex-wrap: wrap; gap: 8px; }
.wb-child-growth__metrics button { min-height: 40px; padding: 7px 14px; }
.wb-child-growth__age-slider label { display: block; margin-bottom: 8px; font-size: 14px; }
.wb-child-growth__age-slider input { width: 100%; margin: 0; accent-color: var(--wb-green); }
.wb-child-growth__figure { margin: 0; }
.wb-child-growth__chart { position: relative; width: 100%; min-height: 270px; border: 1px solid var(--wb-border); border-radius: 16px; background: #fff; }
.wb-child-growth__chart svg { display: block; width: 100%; height: auto; min-height: 270px; }
.wb-growth-grid { stroke: #e5efea; stroke-width: 1; }
.wb-growth-axis { fill: #667a73; font-size: 11px; }
.wb-growth-axis-title { fill: #435e55; font-size: 12px; font-weight: 700; }
.wb-growth-curve { fill: none; stroke-width: 2; }
.wb-growth-curve--p3, .wb-growth-curve--p97 { stroke: #c9695b; }
.wb-growth-curve--p15, .wb-growth-curve--p85 { stroke: #e0a23f; }
.wb-growth-curve--p50 { stroke: var(--wb-green); stroke-width: 3; }
.wb-growth-selected { stroke: #8ca79d; stroke-dasharray: 4 5; }
.wb-growth-marker { fill: #2d68c4; stroke: #fff; stroke-width: 3; }
.wb-growth-marker--median { fill: var(--wb-green); }
.wb-child-growth__legend { position: absolute; top: 12px; right: 12px; display: flex; gap: 5px; padding: 6px 8px; border: 1px solid var(--wb-border); border-radius: 9px; background: rgba(255,255,255,.92); color: var(--wb-muted); font-size: 11px; font-weight: 800; }
.wb-child-growth__legend span::before { content: ''; display: inline-block; width: 11px; height: 3px; margin-right: 3px; vertical-align: middle; background: currentColor; }
.wb-child-growth__legend .p3, .wb-child-growth__legend .p97 { color: #c9695b; }
.wb-child-growth__legend .p15, .wb-child-growth__legend .p85 { color: #c98720; }
.wb-child-growth__legend .p50 { color: var(--wb-green); }
.wb-child-growth__figure figcaption { margin-top: 10px; color: var(--wb-muted); font-size: 13px; line-height: 1.55; }
.wb-child-growth__table-section { border-top: 1px solid var(--wb-border); }
.wb-child-growth__table-section > p { margin: -4px 0 16px; color: var(--wb-muted); line-height: 1.6; }
.wb-child-growth__table-wrap { max-height: 610px; overflow: auto; border: 1px solid var(--wb-border); border-radius: 14px; }
.wb-child-growth table { width: 100%; min-width: 720px; margin: 0; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.wb-child-growth th, .wb-child-growth td { padding: 11px 13px; border: 0; border-bottom: 1px solid #e5efea; text-align: left; vertical-align: top; }
.wb-child-growth thead th { position: sticky; top: 0; z-index: 1; background: var(--wb-mint); color: var(--wb-ink); font-size: 12px; }
.wb-child-growth tbody th { white-space: nowrap; color: var(--wb-green-dark); }
.wb-child-growth tbody tr:last-child th, .wb-child-growth tbody tr:last-child td { border-bottom: 0; }
.wb-child-growth__muted { color: var(--wb-muted); font-style: italic; }
.wb-child-growth .wb-tool__note { margin: 0; padding: 20px 28px; border-top: 1px solid var(--wb-border); background: var(--wb-mint); color: var(--wb-ink); line-height: 1.6; }
.wb-child-growth__source { margin: 0; padding: 12px 28px 20px; background: var(--wb-mint); color: var(--wb-muted); font-size: 12px; }

@media (max-width: 680px) {
  .wb-child-growth .wb-tool__header, .wb-child-growth .wb-tool__form, .wb-child-growth .wb-tool__result, .wb-child-growth__visual, .wb-child-growth__table-section { padding-left: 18px; padding-right: 18px; }
  .wb-child-growth .wb-tool__fields, .wb-child-growth__result-grid, .wb-child-growth__chart-controls { grid-template-columns: 1fr; }
  .wb-child-growth .wb-tool__button { width: 100%; }
  .wb-child-growth__metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
  .wb-child-growth__metrics button { padding-left: 8px; padding-right: 8px; }
  .wb-child-growth .wb-tool__note, .wb-child-growth__source { padding-left: 18px; padding-right: 18px; }
}
