/* BMI & Calorie Calculator — rose + teal */
.bm-units { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 18px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.bm-units label, .bm-seg label { position: relative; cursor: pointer; font-size: 14px; font-weight: 650; color: var(--ink-2); padding: 8px 14px; border-radius: 9px; transition: background .15s, color .15s; }
.bm-units input, .bm-seg input { position: absolute; inset: 0; opacity: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.bm-units label:has(input:checked), .bm-seg label:has(input:checked) { background: var(--accent); color: #fff; }
.bm-units label:has(input:focus-visible), .bm-seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.bm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 26px; align-items: start; }
@media (max-width: 820px) { .bm-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; } }
.bm-lbl { font-weight: 650; font-size: 14px; color: var(--ink-2); }
.bm-pair { display: flex; gap: 8px; }
.bm-pair > .unit { flex: 1; }
.unit { position: relative; }
.unit span { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); font-weight: 600; font-size: 14px; pointer-events: none; }
.unit input { padding-right: 56px; font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.bm-sex { border: 0; padding: 0; min-width: 0; }
.bm-sex legend { font-weight: 650; font-size: 14px; color: var(--ink-2); padding: 0; margin-bottom: 6px; }
.bm-seg { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--raised); border: 1px solid var(--line-strong); min-height: 44px; }
.bm-seg label { flex: 1; text-align: center; padding: 7px 8px; }
.bm-asian { border-radius: 12px; align-items: flex-start; line-height: 1.4; font-size: 14px; font-weight: 550; }
.bm-asian input { margin-top: 1px; flex: none; }

.bm-out { display: grid; gap: 12px; }
.bm-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px 20px; background: var(--raised); }
.bm-card.focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.bm-main { --tone: var(--muted); }
.bm-main.c-u { --tone: #2563eb; } .bm-main.c-h { --tone: #059669; } .bm-main.c-o { --tone: #d97706; }
.bm-main.c-b1 { --tone: #ea580c; } .bm-main.c-b2, .bm-main.c-b3 { --tone: #dc2626; }
.bm-k { font-size: 13px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
#bmVal { display: block; font: 800 clamp(48px, 8vw, 64px)/1 var(--display); letter-spacing: -0.03em; color: var(--tone); margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.bm-cat { display: inline-block; font-weight: 700; color: var(--tone); font-size: 17px; }
.bm-gauge { position: relative; margin: 18px 0 4px; }
.bm-bands { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 2px; }
.bm-bands .u { background: #93c5fd; } .bm-bands .h { background: #6ee7b7; } .bm-bands .o { background: #fcd34d; }
.bm-bands .b1 { background: #fdba74; } .bm-bands .b2 { background: #fca5a5; } .bm-bands .b3 { background: #f87171; }
#bmMark { position: absolute; top: -5px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--surface); border: 4px solid var(--tone); box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: left .25s ease; }
.bm-ticks { position: relative; height: 16px; font-size: 11.5px; color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.bm-ticks span { position: absolute; transform: translateX(-50%); }
.bm-note { margin: 10px 0 0; font-size: 15px; color: var(--ink-2); }
.bm-note a { font-weight: 600; }
.bm-ideal { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.bm-ideal summary { cursor: pointer; font-weight: 650; font-size: 14.5px; }
.bm-ideal table, .bm-goals { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.bm-ideal td, .bm-goals td { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.bm-ideal td:last-child, .bm-goals td:last-child { text-align: right; font-weight: 650; color: var(--ink); white-space: nowrap; }
.bm-goals tr.on td { font-weight: 700; color: var(--ink); }
.bm-goals i { font-style: normal; color: var(--warn); }
.bm-cal-top { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; margin-bottom: 4px; }
.bm-cal-top div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; }
.bm-cal-top div:first-child { background: var(--accent); border-color: var(--accent); color: #fff; }
.bm-cal-top b { display: block; font: 800 28px/1.1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bm-cal-top span { font-size: 13px; font-weight: 600; opacity: .85; }
.bm-warn { font-size: 14px; color: var(--warn); font-weight: 600; margin: 10px 0 0; }
.bm-small { font-size: 13px; margin: 10px 0 0; }
.bm-wait { margin: 0; font-size: 15px; }
.bm-disclaimer { font-size: 13.5px; margin: 16px 0 0; }

.bm-whtr { --tone: var(--muted); }
.bm-whtr.c-u { --tone: #2563eb; } .bm-whtr.c-h { --tone: #059669; } .bm-whtr.c-o { --tone: #d97706; } .bm-whtr.c-b2 { --tone: #dc2626; }
.bm-w-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.bm-w-top .bm-k { flex-basis: 100%; }
.bm-w-top b { font: 800 34px/1 var(--display); color: var(--tone); font-variant-numeric: tabular-nums; }
.bm-w-cat { font-weight: 700; color: var(--tone); }
