/* BMI Calculator for Men — teal & navy theme, fully scoped under .protcalc */
.protcalc{
  --prt-navy-900:#081826;
  --prt-navy-800:#0C2438;
  --prt-navy-700:#12324C;
  --prt-teal-400:#2DD4BF;
  --prt-teal-500:#14B8A6;
  --prt-ink:#E8F1F5;
  --prt-ink-dim:#8FB0C0;
  --prt-line:rgba(45,212,191,0.18);
  --prt-danger:#F87171;
  --prt-mono:"SF Mono","Cascadia Mono","JetBrains Mono",Consolas,monospace;
  font-family:"Segoe UI",system-ui,-apple-system,Roboto,sans-serif;
  color:var(--prt-ink);
  max-width:1060px;
  margin:0 auto;
}
.protcalc *,.protcalc *::before,.protcalc *::after{box-sizing:border-box}

.protcalc-grid{display:grid;grid-template-columns:minmax(300px,1fr) minmax(280px,0.95fr);gap:20px}
@media(max-width:820px){.protcalc-grid{grid-template-columns:1fr}}

.protcalc-card{background:var(--prt-navy-800);border:1px solid var(--prt-line);border-radius:12px;padding:22px;margin:0}
.protcalc-h{font-size:12px !important;text-transform:uppercase;letter-spacing:0.14em;color:var(--prt-teal-400);margin:0 0 16px !important;font-weight:600;line-height:1.3}

.protcalc-tabs{display:flex;gap:6px;margin-bottom:18px;background:var(--prt-navy-900);padding:4px;border-radius:10px;border:1px solid var(--prt-line)}
.protcalc-tab{flex:1;padding:9px 6px;border:none;background:transparent;color:var(--prt-ink-dim);border-radius:8px;cursor:pointer;font-size:13px;font-weight:600;font-family:inherit;transition:all .15s;line-height:1.2}
.protcalc-tab.is-active{background:var(--prt-teal-500);color:var(--prt-navy-900)}
.protcalc-tab:not(.is-active):hover{color:var(--prt-ink);background:transparent}

.protcalc label{display:block;font-size:12px;color:var(--prt-ink-dim);margin:0 0 6px;font-weight:600;line-height:1.4}
.protcalc-hint{font-size:11.5px;color:var(--prt-ink-dim);margin:2px 0 14px;line-height:1.5}
.protcalc-row{display:flex;gap:10px;margin-bottom:14px}
.protcalc-row>div{flex:1}
.protcalc .protcalc-in{
  width:100%;padding:10px 12px;background:var(--prt-navy-900);border:1px solid var(--prt-line);
  border-radius:8px;color:var(--prt-ink);font-size:15px;font-family:var(--prt-mono);
  line-height:1.4;min-height:0;height:auto;box-shadow:none;
}
.protcalc .protcalc-in:focus{outline:2px solid var(--prt-teal-500);outline-offset:1px;border-color:transparent}
.protcalc select.protcalc-in{font-family:inherit;font-size:14px}

.protcalc .protcalc-btn{
  width:100%;padding:12px;border:none;border-radius:8px;cursor:pointer;
  background:var(--prt-teal-500);color:var(--prt-navy-900);font-size:15px;font-weight:700;
  font-family:inherit;transition:background .15s;margin-top:4px;line-height:1.3;
  text-transform:none;box-shadow:none;
}
.protcalc .protcalc-btn:hover{background:var(--prt-teal-400);color:var(--prt-navy-900)}
.protcalc .protcalc-btn.ghost{background:transparent;color:var(--prt-teal-400);border:1px solid var(--prt-line);font-weight:600;font-size:13px;padding:8px 12px;width:auto}
.protcalc .protcalc-btn.ghost:hover{border-color:var(--prt-teal-500);background:rgba(20,184,166,0.08);color:var(--prt-teal-400)}
.protcalc .protcalc-btn.danger{color:var(--prt-danger);border-color:rgba(248,113,113,0.3)}
.protcalc .protcalc-btn.danger:hover{border-color:var(--prt-danger);background:rgba(248,113,113,0.08);color:var(--prt-danger)}

/* ---- animated figure + gauge ---- */
.protcalc-figurewrap{
  display:flex;align-items:center;justify-content:center;gap:24px;
  background:var(--prt-navy-900);border:1px dashed var(--prt-line);border-radius:8px;
  margin-top:18px;padding:16px 12px;flex-wrap:wrap;
}
.protcalc-figure .protcalc-body{fill:rgba(45,212,191,0.18);stroke:var(--prt-teal-400);stroke-width:2;stroke-linejoin:round}
.protcalc-figure .protcalc-torso,
.protcalc-figure .protcalc-armL,
.protcalc-figure .protcalc-armR{
  transition:transform 0.9s cubic-bezier(.34,1.3,.4,1);
}
.protcalc-figure .protcalc-torso{transform-origin:60px 75px}
.protcalc-figure .protcalc-armL{transform-origin:44px 70px}
.protcalc-figure .protcalc-armR{transform-origin:76px 70px}

.protcalc-gauge{flex:1;min-width:180px;max-width:240px}
.protcalc-needle{
  transform-origin:100px 105px;
  transform:rotate(-90deg);
  transition:transform 1s cubic-bezier(.34,1.3,.4,1);
}
.protcalc-gaugelabels{display:flex;justify-content:space-between;font-family:var(--prt-mono);font-size:11px;color:var(--prt-ink-dim);padding:2px 6px 0}
.protcalc-gaugelabels .mid{color:var(--prt-teal-400);letter-spacing:0.14em}

/* ---- results ---- */
.protcalc-hero{
  background:linear-gradient(135deg,var(--prt-navy-700),var(--prt-navy-800));
  border:1px solid rgba(45,212,191,0.35);border-radius:12px;
  padding:22px;text-align:center;margin-bottom:16px;
}
.protcalc-big{font-size:44px;font-weight:700;font-family:var(--prt-mono);color:var(--prt-teal-400);letter-spacing:-0.02em;line-height:1.1}
.protcalc-unit{font-size:13px;color:var(--prt-ink-dim);text-transform:uppercase;letter-spacing:0.14em;margin-top:6px}
.protcalc-unit.cat-under{color:#38BDF8}
.protcalc-unit.cat-healthy{color:var(--prt-teal-400)}
.protcalc-unit.cat-over{color:#FBBF24}
.protcalc-unit.cat-obese{color:var(--prt-danger)}

.protcalc-convs{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:16px}
.protcalc-conv{background:var(--prt-navy-900);border:1px solid var(--prt-line);border-radius:8px;padding:12px;min-width:0}
.protcalc-conv .v{font-family:var(--prt-mono);font-size:15px;color:var(--prt-ink);word-break:break-word;line-height:1.35}
.protcalc-conv .k{font-size:11px;color:var(--prt-ink-dim);text-transform:uppercase;letter-spacing:0.1em;margin-top:3px}

.protcalc-actions{display:flex;gap:8px;margin-top:4px;flex-wrap:wrap}
.protcalc-note{font-size:11.5px;color:var(--prt-ink-dim);line-height:1.6;margin:14px 0 0;border-top:1px solid var(--prt-line);padding-top:12px}

/* ---- history ---- */
/* energy split stacked bar */
.protcalc-energywrap{background:var(--prt-navy-900);border:1px dashed var(--prt-line);border-radius:8px;margin-top:18px;padding:16px 14px}
.protcalc-energytitle{font-size:11px;text-transform:uppercase;letter-spacing:0.12em;color:var(--prt-ink-dim);margin-bottom:10px;font-weight:600}
.protcalc-energybar{display:flex;height:26px;border-radius:8px;overflow:hidden;background:var(--prt-navy-700)}
.protcalc-energybar span{display:block;height:100%;width:0;transition:width 1s cubic-bezier(.34,1.1,.4,1)}
.protcalc-seg-bmr{background:var(--prt-teal-500)}
.protcalc-seg-tef{background:#38BDF8}
.protcalc-seg-act{background:#FBBF24}
.protcalc-energylegend{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px;font-size:11.5px;color:var(--prt-ink-dim)}
.protcalc-energylegend b{color:var(--prt-ink);font-family:var(--prt-mono);font-weight:600}
.protcalc-energylegend .dot{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:5px;vertical-align:middle}
@media (prefers-reduced-motion: reduce){.protcalc-energybar span{transition:none}}
/* suggestions list */
.protcalc-sugg{list-style:none;margin:0;padding:0}
.protcalc-sugg li{padding:8px 0 8px 24px;position:relative;font-size:13px;line-height:1.6;color:var(--prt-ink);border-bottom:1px solid rgba(45,212,191,0.08)}
.protcalc-sugg li:last-child{border-bottom:none}
.protcalc-sugg li::before{content:"\2192";position:absolute;left:2px;color:var(--prt-teal-400);font-weight:700}
.protcalc-sugg li.warn::before{content:"\26A0";color:#FBBF24}
/* meal plan */
.protcalc-mealhead{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}
.protcalc-mealhead .protcalc-h{margin:0 !important}
.protcalc-mealtier{font-family:var(--prt-mono);color:var(--prt-teal-400);font-size:13px}
/* burn comparison bars */
.protcalc-bars{display:flex;flex-direction:column;gap:9px}
.protcalc-barrow{display:grid;grid-template-columns:130px 1fr 64px;align-items:center;gap:10px}
.protcalc-barrow .lbl{font-size:12px;color:var(--prt-ink-dim);text-align:right;line-height:1.3}
.protcalc-barrow .val{font-family:var(--prt-mono);font-size:12px;color:var(--prt-ink)}
.protcalc-track{background:var(--prt-navy-700);border-radius:6px;height:16px;overflow:hidden}
.protcalc-fill{display:block;height:100%;width:0;background:linear-gradient(90deg,var(--prt-teal-500),var(--prt-teal-400));border-radius:6px;transition:width 1s cubic-bezier(.34,1.1,.4,1)}
.protcalc-barrow.is-you .lbl{color:var(--prt-teal-400);font-weight:600}
.protcalc-barrow.is-you .protcalc-fill{background:linear-gradient(90deg,#FBBF24,var(--prt-teal-400))}
@media (prefers-reduced-motion: reduce){.protcalc-fill{transition:none}}
@media (max-width:520px){.protcalc-barrow{grid-template-columns:96px 1fr 56px}.protcalc-barrow .lbl{font-size:11px}}
/* equivalents strip */
.protcalc-equiv{display:flex;gap:10px;flex-wrap:wrap;margin-top:6px}
.protcalc-equiv span{background:var(--prt-navy-900);border:1px solid var(--prt-line);border-radius:20px;padding:6px 12px;font-size:12px;color:var(--prt-ink)}
.protcalc-equiv b{color:var(--prt-teal-400);font-family:var(--prt-mono)}
/* pictorial food grid */
.protcalc-foods{display:grid;grid-template-columns:repeat(auto-fill,minmax(118px,1fr));gap:10px;margin-top:14px}
.protcalc-food{background:var(--prt-navy-900);border:1px solid var(--prt-line);border-radius:10px;padding:12px 8px;text-align:center;
  opacity:0;transform:translateY(8px);animation:protcalc-pop .5s ease forwards}
.protcalc-food .emo{font-size:30px;line-height:1;filter:drop-shadow(0 2px 5px rgba(45,212,191,0.25))}
.protcalc-food .nm{font-size:11.5px;color:var(--prt-ink);margin-top:6px;line-height:1.3;min-height:28px}
.protcalc-food .pg{font-family:var(--prt-mono);font-size:12px;color:var(--prt-teal-400);margin-top:2px}
.protcalc-food .ct{font-size:10.5px;color:var(--prt-ink-dim);margin-top:3px}
@keyframes protcalc-pop{to{opacity:1;transform:translateY(0)}}
@media (prefers-reduced-motion: reduce){.protcalc-food{animation:none;opacity:1;transform:none}}
/* benefits timeline */
.protcalc-tl{list-style:none;margin:0;padding:0;position:relative}
.protcalc-tl::before{content:"";position:absolute;left:9px;top:6px;bottom:6px;width:2px;background:rgba(45,212,191,0.25)}
.protcalc-tl li{position:relative;padding:0 0 16px 32px}
.protcalc-tl li:last-child{padding-bottom:0}
.protcalc-tl li::before{content:"";position:absolute;left:3px;top:4px;width:14px;height:14px;border-radius:50%;
  background:var(--prt-navy-800);border:3px solid var(--prt-teal-500)}
.protcalc-tl .when{font-family:var(--prt-mono);font-size:11px;color:var(--prt-teal-400);text-transform:uppercase;letter-spacing:0.1em}
.protcalc-tl .what{font-size:13px;color:var(--prt-ink);line-height:1.55;margin-top:2px}
.protcalc-chartcard{margin-top:20px}
.protcalc-chart tr.is-you td{background:rgba(20,184,166,0.14);color:var(--prt-teal-400)}
.protcalc-chart tr.is-you td.desc{color:var(--prt-teal-400);font-weight:600}
.protcalc-chart tr td{transition:background .4s}
.protcalc-histcard{margin-top:20px}
.protcalc-histhead{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;flex-wrap:wrap;gap:8px}
.protcalc-histhead .protcalc-h{margin:0 !important}
.protcalc-histactions{display:flex;gap:8px;flex-wrap:wrap}
.protcalc-scroll{overflow-x:auto}
.protcalc-table{width:100%;border-collapse:collapse;font-size:13px;margin:0;border:none}
.protcalc-table th{color:var(--prt-ink-dim);text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:0.1em;padding:8px 10px;border:none;border-bottom:1px solid var(--prt-line);background:transparent;font-weight:600}
.protcalc-table td{padding:9px 10px;border:none;border-bottom:1px solid rgba(45,212,191,0.08);font-family:var(--prt-mono);font-size:12.5px;background:transparent;color:var(--prt-ink)}
.protcalc-table td.desc{font-family:inherit;color:var(--prt-ink-dim)}
.protcalc-table td.bmi{color:var(--prt-teal-400);font-weight:600}
.protcalc-table tr:hover td{background:rgba(20,184,166,0.04)}
.protcalc-empty{color:var(--prt-ink-dim);text-align:center;padding:26px;font-size:13px}
.protcalc-del{background:none;border:none;color:var(--prt-ink-dim);cursor:pointer;font-size:15px;padding:2px 6px;border-radius:4px;line-height:1;box-shadow:none}
.protcalc-del:hover{color:var(--prt-danger);background:none}

.protcalc-toast{
  position:fixed;bottom:24px;left:50%;transform:translateX(-50%) translateY(80px);
  background:var(--prt-teal-500);color:var(--prt-navy-900);padding:10px 20px;border-radius:8px;
  font-weight:700;font-size:14px;transition:transform .25s;z-index:99999;
}
.protcalc-toast.show{transform:translateX(-50%) translateY(0)}
.protcalc-hidden{display:none}

@media (prefers-reduced-motion: reduce){
  .protcalc-toast,.protcalc-tab,.protcalc .protcalc-btn,
  .protcalc-needle,
  .protcalc-figure .protcalc-torso,.protcalc-figure .protcalc-armL,.protcalc-figure .protcalc-armR{transition:none}
}
