/* CaloriesAndBMI — light overrides on top of Tailwind CDN */

html { -webkit-text-size-adjust: 100%; }
body { font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }

/* Article prose tuning */
.prose h2 { font-weight: 800; margin-top: 1.5em; }
.prose h3 { font-weight: 700; margin-top: 1.25em; }
.prose a  { color: #0E7C66; text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: #065f46; }
.prose img { border-radius: 12px; }
.prose table { border-collapse: collapse; width: 100%; }
.prose table th, .prose table td { border: 1px solid #e5e7eb; padding: 8px 12px; }
.prose table th { background: #ecfdf5; text-align: left; }

/* Line clamp polyfill helper */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Result card animation */
#result { transition: transform .15s ease, box-shadow .15s ease; }
#result.pulse { animation: pulse .6s ease; }
@keyframes pulse { 0%{transform:scale(1)} 50%{transform:scale(1.02)} 100%{transform:scale(1)} }

/* Sticky CTA mobile */
@media (max-width: 768px) {
  .sticky-cta {
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 30; padding: 10px 16px;
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
    border-top: 1px solid #e5e7eb;
  }
}

/* Unit-system field hiding — driven by form's data-unit attribute (no JS flash) */
form[data-unit="metric"]   [data-unit-group="imperial"] { display: none !important; }
form[data-unit="imperial"] [data-unit-group="metric"]   { display: none !important; }
/* Sex-specific field hiding (e.g., hip on body fat calculator) */
form[data-sex="male"]   [data-sex-group="female"] { display: none !important; }
/* Legacy class fallback */
.hidden-unit { display: none !important; }

/* Print: no nav, no ads */
@media print {
  header, footer, .sticky-cta, #mnav, .ad-slot { display: none !important; }
}
