:root{
  --teal-900:#004c4d;
  --teal-700:#006d6f;
  --teal-600:#009395;
  --bg:#f0f4f5;
  --card:#ffffff;
  --ink-900:#122;
  --ink-700:#344;
  --ink-500:#556;
  --muted:#ddd;
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:#222;
  line-height:1.5;
}
/* --- Syringe visual (shared) --- */
.syringe { display:flex; align-items:flex-end; gap:16px; margin-top:12px; }
.barrel-wrap { position:relative; padding:20px 108px 20px 12px; border:1px solid #ddd; border-radius:10px; background:#fff; }
.barrel { position:relative; width:64px; height:200px; border:2px solid #999; border-radius:10px; background:linear-gradient(#fff,#f6f6f6); overflow:hidden; }
.fill { position:absolute; left:0; bottom:0; width:100%; height:0; background:linear-gradient(180deg, var(--teal-600), var(--teal-700)); transition:height .25s ease; }

.ticks { position:absolute; left:78px; bottom:20px; width:84px; height:200px; }
.tick-row { position:absolute; left:0; width:100%; display:flex; align-items:center; gap:6px; font-size:12px; color:#333; line-height:1; }
.tick-row::before { content:""; display:block; width:10px; height:1px; background:#333; }

.barrel-wrap.inactive{filter:grayscale(.9);opacity:.6}
.barrel-wrap.active{filter:none;opacity:1}

.ml-label { font-weight:600; color:#103132; }
.warn { margin-top:10px; padding:10px; border-radius:8px; background:#fff6f6; border:1px solid #ffd6d6; color:#7a1c1c; }

@media (max-width:560px){
  .syringe { gap:20px; }
  .barrel { height:200px; }
  .barrel-wrap { padding-right:96px; }
  .ticks { width:72px; left:74px; }
  .tick-row { font-size:11px; }
}

/* If you previously added arrow pointers above the syringe, this removes them */
.barrel-wrap::before,
.barrel-wrap::after { content:none !important; display:none !important; }

.site-header{width:100%;display:flex;justify-content:center;background:#fff;position:sticky;top:0;z-index:10;border-bottom:1px solid rgba(0,0,0,.06)}
.nav{width:100%;max-width:980px;display:flex;align-items:center;justify-content:space-between;padding:14px 16px}
.logo-text{font-weight:800;letter-spacing:.2px;display:inline-block}
.logo-hormone{color:var(--teal-900);}
.logo-buddy{color:var(--teal-600);margin-left:4px}
.nav-links a{margin-left:16px;text-decoration:none;color:#222;padding:6px 10px;border-radius:8px}
.nav-links a[aria-current="page"],.nav-links a:hover{background:#ecf9f9;color:#0b3b3b}

.container{max-width:980px;margin:24px auto;padding:0 12px}
h1{color:var(--teal-900);margin:8px 0 16px}
h2{color:var(--teal-700)}
p.lead{font-size:18px;color:#123}

.hero{background:linear-gradient(180deg,#ffffff,#f7fbfb);border:1px solid rgba(0,0,0,0.06);border-radius:16px;padding:24px;margin-top:12px;box-shadow:0 10px 24px rgba(0,0,0,0.06)}
.cta{display:flex;gap:12px;flex-wrap:wrap;margin-top:12px}
.button{background:var(--teal-600);color:#fff;border:none;border-radius:10px;padding:10px 14px;font-weight:700;cursor:pointer;text-decoration:none;display:inline-block}
.button.secondary{background:#0b3b3b1a;color:#0b3b3b}

.calc-wrap{background:var(--card);border:1px solid rgba(0,0,0,0.08);border-radius:12px;padding:20px;max-width:740px;margin:12px auto;box-shadow:0 8px 18px rgba(0,0,0,0.08)}
.calc-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.full{grid-column:1 / -1}
.inline{display:flex;align-items:center;gap:10px}
.muted{color:var(--ink-500);font-size:14px}
.out{background:#f8ffff;border:1px solid #bfe7e8;border-radius:12px;padding:16px;margin-top:16px}
.out h3{margin:0 0 8px;color:var(--teal-700)}

.preset-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:8px}
.preset{border:1px solid rgba(0,0,0,0.1);background:#fff;padding:6px 10px;border-radius:8px;cursor:pointer;font-weight:600}
.preset:hover{background:#f7f7f7}
/* Keep a preset visibly selected */
.preset {
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}

.preset.active,
.preset[aria-pressed="true"] {
  background: var(--teal-600);
  color: #fff;
  border-color: var(--teal-600);
}

.preset.active:hover,
.preset[aria-pressed="true"]:hover {
  background: #007b7d; /* subtle hover when selected */
}

.syringe{display:flex;align-items:flex-end;gap:16px;margin-top:12px}
.barrel-wrap{padding:20px 12px;border:1px solid #ddd;border-radius:10px;background:#fff;position:relative;transition:filter .2s,opacity .2s}
.barrel{position:relative;width:64px;height:200px;border:2px solid #999;border-radius:10px;background:linear-gradient(#fff,#f6f6f6);overflow:hidden}
.fill{position:absolute;left:0;bottom:0;width:100%;height:0;background:linear-gradient(180deg,var(--teal-600),var(--teal-700));transition:height .25s ease}

.ticks{position:absolute;left:78px;bottom:20px;width:72px;height:200px}
.tick-row{position:absolute;left:0;width:100%;display:flex;align-items:center;gap:6px;font-size:12px;color:#333;line-height:1}
.tick-row::before{content:"";display:block;width:10px;height:1px;background:#333}
.ml-label{font-weight:600;color:#103132}
.warn{margin-top:10px;padding:10px;border-radius:8px;background:#fff6f6;border:1px solid #ffd6d6;color:#7a1c1c}

.kpi{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:10px}
.kpi .card{background:#fff;border:1px solid rgba(0,0,0,0.06);border-radius:10px;padding:12px;text-align:center}
.kpi .card b{display:block;font-size:20px;color:#103132}

/* 1) Reserve space for tick labels inside the barrel container */
.barrel-wrap {
  position: relative;
  padding: 20px 108px 20px 12px; /* right = ticks width + margin */
}

/* 2) Define barrel geometry once (no magic numbers) */
:root {
  --barrel-left: 12px;   /* left padding inside .barrel-wrap */
  --barrel-width: 64px;  /* .barrel width */
  --barrel-border: 2px;  /* .barrel border width */
  --ticks-width: 84px;   /* room for tick marks + labels */
}

/* Keep barrel using the variable so everything tracks */
.barrel { width: var(--barrel-width); }

/* 3) Position the tick column relative to the barrel, not a fixed px value */
.ticks {
  position: absolute;
  left: calc(var(--barrel-left) + var(--barrel-width) + var(--barrel-border));
  bottom: 20px;
  width: var(--ticks-width);
  height: 200px;
}


}
.barrel-wrap::after{
  content:"";
  position:absolute;
  left: calc(var(--barrel-left) + (var(--barrel-width) / 2) - 4px);
  bottom: calc(100% + 66px);
  width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:8px solid #999;
}
#syrMeta{margin-top:6px}

footer{max-width:980px;margin:32px auto 40px;padding:0 12px;color:#556;font-size:14px}
footer a{color:var(--teal-700)}
:root { --header-h: 56px; } /* fallback; JS sets the real height */

.result-banner{
  position: sticky;
  top: var(--header-h);
  z-index: 20;
  background: #ecf9f9;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.result-banner .container{
  display:flex; align-items:center; gap:12px; padding:8px 12px;
}
.result-banner b{ color:#103132 }
#rbClose{ background:transparent; border:none; font-size:18px; cursor:pointer; color:#0b3b3b }

@media (max-width:780px){
  .calc-grid{grid-template-columns:1fr}
  .kpi{grid-template-columns:1fr}
  .ticks{left:74px;width:68px}
  .tick-row{font-size:11px}
@media (max-width:560px){
  .barrel-wrap { padding-right:96px; }
}
}
