/* ============================================
   SportyCalc - Strava-inspired Design System
   Light mode default, dark mode via data-theme
   ============================================ */

:root {
  /* Primary Accent */
  --primary: #F95700;
  --primary-hover: #E04F00;
  --primary-focus: rgba(249, 87, 0, 0.25);
  --secondary: #2563EB;

  /* Light Mode (default) */
  --bg: #FFFFFF;
  --bg-card: #F7F7F7;
  --bg-elevated: #EEEEEE;
  --border: #E5E5E5;
  --text-primary: #222222;
  --text-secondary: #525252;
  --text-muted: #737373;

  /* Surfaces */
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --nav-bg: rgba(255, 255, 255, 0.95);
  --nav-bg-scroll: rgba(255, 255, 255, 0.98);

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius-card: 12px;
  --radius-btn: 8px;
  --section-gap: 32px;
  --transition: 200ms ease;
}

[data-theme="dark"] {
  --bg: #111111;
  --bg-card: #1F1F1F;
  --bg-elevated: #2A2A2A;
  --border: #2A2A2A;
  --text-primary: #FFFFFF;
  --text-secondary: #A1A1AA;
  --text-muted: #71717A;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(17, 17, 17, 0.95);
  --nav-bg-scroll: rgba(17, 17, 17, 0.98);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  font-weight: 400;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ===================== Layout ===================== */
.wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 480px) {
  .wrapper { padding: 0 1.5rem; }
}

/* ===================== Navigation ===================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  padding-top: env(safe-area-inset-top, 0);
}

.nav.nav-scrolled {
  background: var(--nav-bg-scroll);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
  min-width: 0;
}

@media (min-width: 480px) {
  .nav-inner { padding: 0 1.5rem; }
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text-primary);
  min-width: 0;
}

.nav-logo .nav-logo-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 359px) {
  .nav-logo-text { font-size: 1rem; }
}

.nav-logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--primary);
  letter-spacing: -0.01em;
}

.nav-logo-img {
  height: 32px;
  width: auto;
  display: block;
  object-fit: contain;
  flex-shrink: 0;
}

.nav-links {
  display: none;
}

@media (max-width: 767px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
  .nav-links .nav-link {
    display: none;
  }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Search in nav */
.search-trigger {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.search-trigger:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}
.search-trigger svg {
  width: 20px;
  height: 20px;
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(64px + env(safe-area-inset-top, 0)) 1rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.search-overlay.open {
  opacity: 1;
  visibility: visible;
}
.search-overlay-inner {
  width: 100%;
  max-width: 560px;
  position: relative;
}
.search-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: var(--radius-btn);
  transition: color 0.2s, background 0.2s;
}
.search-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}
.search-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  overflow: hidden;
}
.search-input {
  width: 100%;
  padding: 1rem 1.25rem;
  font-size: 1.125rem;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  border: none;
  outline: none;
}
.search-input::placeholder {
  color: var(--text-muted);
}
.search-results {
  max-height: 320px;
  overflow-y: auto;
  border-top: 1px solid var(--border);
}
.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.875rem 1.25rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: background 0.15s;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  background: transparent;
}
.search-result-item:hover,
.search-result-item:focus {
  background: var(--bg-elevated);
  outline: none;
}
.search-result-title {
  font-weight: 600;
  font-size: 0.9375rem;
}
.search-result-subtitle {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}
.search-result-empty {
  padding: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.theme-toggle:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.9375rem;
  transition: color var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  color: var(--text-primary);
  font-weight: 600;
}

.nav-link-brand {
  color: var(--primary);
  font-weight: 600;
  margin-left: auto;
}

.nav-link-brand:hover {
  color: var(--primary-hover);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

.mobile-nav {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top, 0));
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  padding: 2rem 1.5rem 2rem;
  transform: translateX(100%);
  transition: transform 350ms ease;
  z-index: 99;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  pointer-events: none;
}

.mobile-nav.open {
  transform: translateX(0);
  pointer-events: auto;
}

@media (min-width: 768px) {
  .mobile-nav {
    display: none;
  }
}

.mobile-nav-link {
  display: block;
  padding: 1rem 0;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 400;
  border-bottom: 1px solid var(--border);
  transition: color var(--transition);
}

.mobile-nav-link:hover {
  color: var(--primary);
}

.mobile-nav-link-brand {
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-link-brand:hover {
  color: var(--primary-hover);
}

/* ===================== Hero ===================== */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-desc {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

/* Primary CTA - Orange */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background: var(--primary);
  color: white;
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Secondary Ghost */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn-ghost:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

/* ===================== Featured Calculators (Home) ===================== */
.featured-section {
  padding: var(--section-gap) 0 64px;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.featured-card {
  display: block;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.featured-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(249, 87, 0, 0.2);
}

.featured-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.featured-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ===================== Footer ===================== */
.footer {
  border-top: 1px solid var(--border);
  padding: var(--section-gap) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  text-align: center;
  max-width: 100%;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  justify-content: center;
  width: 100%;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-copy {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  margin: 0;
}

.footer-explore {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  margin: 0;
}

.footer-explore a {
  color: var(--text-muted);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-explore a:hover {
  color: var(--primary);
}

.footer-credit {
  flex-basis: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  width: 100%;
  margin-top: 0.5rem;
}

.footer-credit a {
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color var(--transition);
}

.footer-credit a:hover {
  color: var(--primary);
}

.footer-credit svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.footer-strava-link {
  margin-left: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 24px;
  min-height: 24px;
}
.footer-strava-link img,
.footer-strava-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
}



/* ===================== 404 Page ===================== */
.error-page {
  padding: 120px 0;
  text-align: center;
}

.error-page h1 {
  font-size: 4rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.error-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ===================== Contact Page ===================== */
.contact-section {
  padding-bottom: var(--section-gap);
}

.contact-section.contact-layout {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-site-link {
  text-align: center;
}

.contact-site-link a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color var(--transition);
}

.contact-site-link a:hover {
  color: var(--primary);
}

.contact-form-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2rem;
  width: 100%;
  box-sizing: border-box;
}

/* Tablet: noticeably wider than the default 720px narrow card */
@media (min-width: 768px) {
  .contact-form-card {
    max-width: 960px;
  }
}

/* Laptop / desktop: use nearly the full site content width (wrapper is 1200px) */
@media (min-width: 1024px) {
  .contact-layout .contact-form-card {
    max-width: min(1120px, 100%);
  }
}

.contact-form-card textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font);
  resize: vertical;
  min-height: 120px;
  transition: border-color var(--transition);
}

.contact-form-card textarea:focus {
  outline: none;
  border-color: var(--text-secondary);
}

.contact-form-card textarea::placeholder {
  color: var(--text-muted);
}

/* ===================== Our Tools Page ===================== */
.tools-list {
  margin-top: 1.5rem;
}

.tools-tool-item {
  margin-bottom: 1.5rem;
}

.tools-tool-item:last-child {
  margin-bottom: 0;
}

.tools-tool-item h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tools-tool-item h2 a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--transition);
}

.tools-tool-item h2 a:hover {
  color: var(--primary);
}

/* ===================== Calculator Page ===================== */
.calculator-page .hero {
  padding: 48px 0 32px;
  text-align: left;
}

.calculator-page .hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

/* Full-width background row (breaks out of wrapper) */
.full-width-row {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: var(--section-gap) 0;
  background: var(--bg-card);
}

.full-width-row .wrapper {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.calculator-layout {
  display: grid;
  gap: var(--section-gap);
  padding-bottom: var(--section-gap);
}

/* Mobile: show results right after form, before SEO content */
@media (max-width: 991px) {
  .calculator-layout .calc-main {
    display: contents;
  }
  .calculator-layout .calc-form-card {
    order: 1;
  }
  .calculator-layout .results-card {
    order: 2;
    position: static; /* no sticky when in flow between form and content */
  }
  .calculator-layout .seo-content {
    order: 3;
  }
}

@media (min-width: 992px) {
  .calculator-layout {
    grid-template-columns: 1fr 360px;
    align-items: start;
  }
}

.calc-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  margin-bottom: var(--section-gap);
}

.form-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.calc-form-card h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.unit-toggle-top-right {
  margin-bottom: 0;
  flex-shrink: 0;
}

.unit-toggle-top-right .unit-toggle-label {
  margin-bottom: 0.35rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group:last-of-type {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.input-group input,
.input-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color var(--transition);
}

.input-group input:focus,
.input-group select:focus {
  outline: none;
  border-color: var(--text-secondary);
}

.input-group input::placeholder {
  color: var(--text-muted);
}

.input-group small {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.unit-toggle {
  margin-bottom: 1.25rem;
}

.unit-toggle-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.unit-toggle-btns {
  display: flex;
  gap: 0.5rem;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.activity-radios {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.activity-radio {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all var(--transition);
}

.activity-radio:hover {
  border-color: var(--text-secondary);
}

.activity-radio:has(input:checked) {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.08);
}

.activity-radio input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}

.activity-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.activity-content {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.activity-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.activity-desc {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.height-weight-row {
  grid-template-columns: 1fr 1fr 1fr;
}

.input-row .input-group:last-child {
  margin-bottom: 0;
}

.unit-btn {
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  cursor: pointer;
  transition: all var(--transition);
}

.unit-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.unit-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.formula-toggle {
  display: flex;
  gap: 0.5rem;
}

.formula-btn {
  flex: 1;
  padding: 0.5rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 400;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.formula-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.formula-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.calc-btn {
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-btn);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  margin-top: 1.25rem;
  box-shadow: 0 2px 8px rgba(249, 87, 0, 0.25);
}

.calc-btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(249, 87, 0, 0.35);
}

.calc-btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 2px 8px rgba(249, 87, 0, 0.25);
}

.calc-btn-animated {
  position: relative;
  overflow: hidden;
}

.calc-btn-animated::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.calc-btn-animated:hover::after {
  left: 100%;
}

/* Results panel */
.results-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  position: sticky;
  top: 88px;
}

.results-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.results-card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.result-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.result-value.highlight {
  color: var(--primary);
}

.result-item-highlight {
  background: var(--primary-focus);
  padding: 0.75rem 1rem;
  margin: 0.5rem 0 0;
  border-radius: var(--radius-btn);
  border-bottom: none;
  border-left: 3px solid var(--primary);
}

.pregnancy-status-note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  line-height: 1.5;
}

/* Pregnancy weight gain scale */
.pregnancy-scale-wrap {
  margin: 1.25rem 0;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  animation: pregnancy-scale-fade 0.4s ease;
}

@keyframes pregnancy-scale-fade {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.pregnancy-scale-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.pregnancy-scale {
  width: 100%;
}

.pregnancy-scale-track {
  position: relative;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: visible;
}

.pregnancy-scale-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 0;
  background: rgba(34, 197, 94, 0.35);
  border-radius: 10px;
  transition: left 0.4s ease, width 0.4s ease;
}

.pregnancy-scale-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 6px;
  height: 28px;
  background: var(--primary);
  border-radius: 3px;
  box-shadow: 0 2px 6px rgba(249, 87, 0, 0.4);
  transition: left 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2;
}

.pregnancy-scale-marker.below {
  background: #0ea5e9;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.4);
}

.pregnancy-scale-marker.within {
  background: #22c55e;
  box-shadow: 0 2px 6px rgba(34, 197, 94, 0.4);
}

.pregnancy-scale-marker.above {
  background: #f59e0b;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.pregnancy-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  padding: 0 2px;
}

.pregnancy-scale-ticks span:nth-child(2),
.pregnancy-scale-ticks span:nth-child(3) {
  color: var(--text-secondary);
  font-weight: 600;
}

/* Calorie deficit calculator */
.cd-input-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.cd-input-wrap input {
  flex: 1;
}
.cd-input-wrap span {
  font-size: 0.875rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.cd-mode-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.cd-mode-btn {
  padding: 0.5rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}
.cd-mode-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}
.cd-mode-btn.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.08);
  color: var(--primary);
}
.cd-mode-panel {
  margin-top: 0.5rem;
}
.cd-result-main {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.cd-value { font-size: 2rem; font-weight: 600; color: var(--primary); }
.cd-unit { font-size: 1rem; color: var(--text-muted); }
.cd-label { display: block; width: 100%; font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.15rem; }
.cd-chart-section {
  margin-top: 1.5rem;
}
.cd-chart-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}
.cd-chart-section .chart-container {
  height: 240px;
  position: relative;
}

/* Heart rate zones – bodycalc-style max HR display */
.hr-result-max {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.hr-max-value {
  display: block;
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}
.hr-max-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}
.hr-toggle-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
}

/* 1RM calculator – result and table */
.orm-result-main {
  text-align: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.orm-value {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--primary);
}
.orm-unit { font-size: 1.25rem; color: var(--text-muted); margin-left: 0.15rem; }
.orm-label { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }
.orm-weight-wrap { display: flex; align-items: center; gap: 0.35rem; }
.orm-weight-wrap input { flex: 1; }
.orm-weight-unit { font-size: 0.875rem; color: var(--text-muted); }
.orm-table-heading { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.75rem; color: var(--text-primary); }
.orm-table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.orm-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.orm-table th, .orm-table td { padding: 0.5rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.orm-table th { font-weight: 600; color: var(--text-secondary); background: var(--bg-elevated); }
.orm-table .text-muted { color: var(--text-muted); font-style: italic; }
/* Training zone row colors */
.orm-zone-row { transition: background var(--transition); }
.orm-zone-warmup { background: rgba(148, 163, 184, 0.1); }
.orm-zone-warmup td:first-child { border-left: 4px solid #94A3B8; }
.orm-zone-endurance { background: rgba(34, 197, 94, 0.1); }
.orm-zone-endurance td:first-child { border-left: 4px solid #22C55E; }
.orm-zone-hypertrophy { background: rgba(234, 179, 8, 0.12); }
.orm-zone-hypertrophy td:first-child { border-left: 4px solid #EAB308; }
.orm-zone-strength { background: rgba(249, 115, 22, 0.12); }
.orm-zone-strength td:first-child { border-left: 4px solid #F97316; }
.orm-zone-power { background: rgba(239, 68, 68, 0.1); }
.orm-zone-power td:first-child { border-left: 4px solid #EF4444; }
.orm-zone-max { background: rgba(239, 68, 68, 0.18); }
.orm-zone-max td:first-child { border-left: 4px solid #DC2626; }
.orm-zone-1rm { background: rgba(249, 87, 0, 0.15); font-weight: 600; }
.orm-zone-1rm td:first-child { border-left: 4px solid var(--primary); }

/* Power-to-weight calculator */
.pwr-result-main {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.pwr-value {
  font-size: 2.25rem;
  font-weight: 600;
  color: var(--primary);
}
.pwr-result-unit { font-size: 1.25rem; color: var(--text-muted); margin-left: 0.15rem; }
.pwr-result-label { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }
.pwr-alt-values {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}
.pwr-alt-row { margin-bottom: 0.25rem; }
.pwr-alt-row:last-child { margin-bottom: 0; }
.pwr-chart-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.pwr-chart-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}
.pwr-input-wrap { display: flex; align-items: center; gap: 0.35rem; }
.pwr-input-wrap input { flex: 1; }
.pwr-unit { font-size: 0.875rem; color: var(--text-muted); }

[data-theme="dark"] .orm-zone-warmup { background: rgba(148, 163, 184, 0.12); }
[data-theme="dark"] .orm-zone-endurance { background: rgba(34, 197, 94, 0.12); }
[data-theme="dark"] .orm-zone-hypertrophy { background: rgba(234, 179, 8, 0.1); }
[data-theme="dark"] .orm-zone-strength { background: rgba(249, 115, 22, 0.1); }
[data-theme="dark"] .orm-zone-power { background: rgba(239, 68, 68, 0.12); }
[data-theme="dark"] .orm-zone-max { background: rgba(239, 68, 68, 0.2); }
[data-theme="dark"] .orm-zone-1rm { background: rgba(249, 87, 0, 0.18); }

/* Protein intake calculator */
.protein-weight-wrap { display: flex; align-items: center; gap: 0.35rem; }
.protein-weight-wrap input { flex: 1; }
.protein-weight-unit { font-size: 0.875rem; color: var(--text-muted); }
.protein-goal-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}
.protein-goal-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.25s ease;
}

.protein-goal-btn:hover {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.06);
  transform: translateY(-2px);
}

.protein-goal-btn input { display: none; }
.protein-goal-btn input:checked + .protein-goal-emoji { transform: scale(1.15); }
.protein-goal-btn:has(input:checked) {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
  box-shadow: 0 0 0 1px var(--primary);
}

.protein-goal-emoji { font-size: 1.5rem; transition: transform 0.2s ease; }
.protein-goal-label { font-size: 0.8rem; font-weight: 500; color: var(--text-primary); text-align: center; }
.protein-result-main {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.protein-result-value { display: block; font-size: 2.25rem; font-weight: 600; color: var(--primary); }
.protein-result-label { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }
.protein-per-meal {
  text-align: center;
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background: rgba(249, 87, 0, 0.08);
  border-radius: var(--radius-btn);
}
.protein-per-meal-value { font-size: 1.25rem; font-weight: 600; color: var(--primary); }
.protein-per-meal-label { font-size: 0.8rem; color: var(--text-muted); margin-left: 0.25rem; }
.protein-food-heading { font-size: 0.9rem; font-weight: 600; margin-bottom: 0.75rem; color: var(--text-primary); }
.protein-food-list { display: flex; flex-direction: column; gap: 0.5rem; }
.protein-food-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  transition: transform 0.2s ease, background 0.2s ease;
}
.protein-food-item:hover { transform: translateX(4px); background: rgba(249, 87, 0, 0.06); }
.protein-food-emoji { font-size: 1.1rem; }
.protein-food-item strong { margin-left: auto; color: var(--primary); }

/* Water intake calculator */
.water-weight-wrap { display: flex; align-items: center; gap: 0.35rem; }
.water-weight-wrap input { flex: 1; }
.water-weight-unit { font-size: 0.875rem; color: var(--text-muted); }
.water-activity-btns, .water-climate-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.water-option-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.6rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.25s ease;
  font-size: 0.8rem;
}
.water-option-btn:hover {
  border-color: #0EA5E9;
  background: rgba(14, 165, 233, 0.06);
  transform: translateY(-2px);
}
.water-option-btn input { display: none; }
.water-option-btn:has(input:checked) {
  border-color: #0EA5E9;
  background: rgba(14, 165, 233, 0.12);
  box-shadow: 0 0 0 1px #0EA5E9;
}
.water-option-btn span { font-weight: 500; }
.water-option-btn small { font-size: 0.7rem; color: var(--text-muted); }
.water-checkbox-group { margin-top: 0.5rem; }
.water-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}
.water-result-main {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  transition: transform 0.4s ease;
}
.water-result-reveal .water-result-main { animation: waterReveal 0.5s ease; }
.water-main-value { font-size: 2.5rem; font-weight: 700; color: #0EA5E9; }
.water-main-unit { font-size: 1.25rem; color: var(--text-muted); margin-left: 0.2rem; }
.water-main-label { display: block; font-size: 0.875rem; color: var(--text-secondary); margin-top: 0.25rem; }
.water-result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.water-result-badge {
  text-align: center;
  padding: 0.6rem;
  background: rgba(14, 165, 233, 0.08);
  border-radius: var(--radius-btn);
  transition: transform 0.25s ease;
}
.water-result-badge:hover { transform: scale(1.05); }
.water-badge-value { display: block; font-weight: 600; color: #0EA5E9; font-size: 1.1rem; }
.water-badge-label { font-size: 0.7rem; color: var(--text-muted); }
.water-tips {
  margin: 1rem 0;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
}
.water-tips h3 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.water-tips ul { margin: 0; padding-left: 1.2rem; font-size: 0.85rem; color: var(--text-secondary); }
.water-tips li { margin-bottom: 0.25rem; }
.water-progress-tracker {
  margin-top: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(14, 165, 233, 0.04));
  border-radius: var(--radius-btn);
  border: 1px solid rgba(14, 165, 233, 0.2);
}
.water-progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}
.water-cups-visual {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}
.water-cup-icon {
  display: inline-flex;
  width: 28px;
  height: 28px;
  color: #0EA5E9;
}
.water-cup-icon svg { width: 100%; height: 100%; }
.water-cup-extra {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0EA5E9;
  padding: 0.2rem 0.4rem;
  background: rgba(14, 165, 233, 0.15);
  border-radius: 4px;
}
.water-progress-label span:last-child { font-weight: 600; color: #0EA5E9; }
.water-progress-bar {
  height: 12px;
  background: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.water-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0EA5E9, #06B6D4);
  border-radius: 6px;
  width: 0%;
  transition: width 0.4s ease;
}
.water-log-btn {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #0EA5E9;
  color: white;
  border: none;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-bottom: 0.5rem;
}
.water-log-btn:hover {
  background: #0284C7;
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.4);
}
.water-log-btn:active { transform: scale(0.98); }
.water-progress-hint { font-size: 0.75rem; color: var(--text-muted); margin: 0; }
.water-celebration {
  animation: waterCelebrate 0.8s ease;
}
@keyframes waterReveal {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes waterCelebrate {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.02); }
  50% { transform: scale(0.98); }
  75% { transform: scale(1.01); }
}

/* Calories Burned – result reveal, icon & transitions */
.calories-result-main {
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.calories-result-reveal .calories-result-main {
  animation: caloriesReveal 0.5s ease forwards;
}
.calories-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  font-size: 2rem;
  line-height: 1;
  background: linear-gradient(135deg, rgba(249, 87, 0, 0.12), rgba(249, 87, 0, 0.05));
  border-radius: 16px;
  margin-bottom: 1rem;
  border: 1px solid rgba(249, 87, 0, 0.2);
  transition: transform 0.3s ease;
}
.calories-icon-badge.calories-icon-pop {
  animation: caloriesIconPop 0.5s ease;
}
@keyframes caloriesIconPop {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
.calories-result-row {
  transition: transform 0.25s ease;
}
.calories-result-row .result-value {
  transition: color 0.25s ease;
}
.calories-value-wrap { display: inline-flex; align-items: baseline; gap: 0.25rem; }
.calories-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  transition: transform 0.2s ease;
}
.calories-result-reveal .calories-value {
  animation: caloriesValuePulse 0.6s ease 0.15s both;
}
@keyframes caloriesValuePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}
.calories-unit {
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: 400;
}
.calories-activity-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}
.calories-result-reveal .calories-activity-hint {
  animation: caloriesHintFade 0.4s ease 0.25s both;
}
@keyframes caloriesHintFade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes caloriesReveal {
  from { opacity: 0; transform: translateY(-12px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* BAC (Blood Alcohol Concentration) Calculator – animated result */
.bac-result-main {
  text-align: center;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.bac-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.bac-value-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
}

.bac-value {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--primary);
}

.bac-unit {
  font-size: 1rem;
  color: var(--text-muted);
}

.bac-status-badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-btn);
  font-size: 0.8125rem;
  font-weight: 600;
  background: rgba(249, 87, 0, 0.08);
  color: var(--primary);
}

.bac-legal-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.bac-result-reveal .bac-result-main {
  animation: bacReveal 0.5s ease;
}

.bac-result-reveal .bac-value {
  animation: bacValuePulse 0.6s ease 0.1s both;
}

@keyframes bacReveal {
  from { opacity: 0; transform: translateY(-10px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bacValuePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* FAQ list (calories & other calculators) */
.seo-content .faq-list {
  margin: 1rem 0;
  padding: 0;
}
.seo-content .faq-list dt {
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
}
.seo-content .faq-list dt:first-child { margin-top: 0; }
.seo-content .faq-list dd {
  margin: 0 0 0 1rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Health advisory */
.health-advisory {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  background: rgba(249, 87, 0, 0.08);
  border: 1px solid rgba(249, 87, 0, 0.25);
  border-radius: var(--radius-btn);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.health-advisory strong { color: var(--primary); }

/* Heart rate zone colors – full row background */
.hr-zone {
  border-left: 4px solid transparent;
  margin-left: -1.5rem;
  margin-right: -1.5rem;
  padding: 0.5rem 1.5rem 0.5rem calc(1.5rem - 4px);
  border-radius: 0;
}
.hr-zone-1 {
  border-left-color: #94A3B8;
  background: rgba(148, 163, 184, 0.12);
}
.hr-zone-1 .result-label { color: #64748B; }
.hr-zone-2 {
  border-left-color: #22C55E;
  background: rgba(34, 197, 94, 0.12);
}
.hr-zone-2 .result-label { color: #16A34A; }
.hr-zone-3 {
  border-left-color: #EAB308;
  background: rgba(234, 179, 8, 0.12);
}
.hr-zone-3 .result-label { color: #CA8A04; }
.hr-zone-4 {
  border-left-color: #F97316;
  background: rgba(249, 115, 22, 0.12);
}
.hr-zone-4 .result-label { color: #EA580C; }
.hr-zone-5 {
  border-left-color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
}
.hr-zone-5 .result-label { color: #DC2626; }
[data-theme="dark"] .hr-zone-1 { background: rgba(148, 163, 184, 0.15); }
[data-theme="dark"] .hr-zone-1 .result-label { color: #94A3B8; }
[data-theme="dark"] .hr-zone-2 { background: rgba(34, 197, 94, 0.15); }
[data-theme="dark"] .hr-zone-2 .result-label { color: #4ADE80; }
[data-theme="dark"] .hr-zone-3 { background: rgba(234, 179, 8, 0.15); }
[data-theme="dark"] .hr-zone-3 .result-label { color: #FACC15; }
[data-theme="dark"] .hr-zone-4 { background: rgba(249, 115, 22, 0.15); }
[data-theme="dark"] .hr-zone-4 .result-label { color: #FB923C; }
[data-theme="dark"] .hr-zone-5 { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .hr-zone-5 .result-label { color: #F87171; }

/* BMI calculator – bodycalc-style results */
.bmi-result-main {
  text-align: center;
  margin-bottom: 1.5rem;
}

.bmi-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
}

.bmi-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.bmi-category {
  display: block;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.5rem;
}

.bmi-scale {
  margin: 1.5rem 0;
}

.bmi-scale-bar {
  position: relative;
  height: 12px;
  background: linear-gradient(to right,
    rgba(99, 102, 241, 0.4) 0%,
    rgba(34, 197, 94, 0.4) 25%,
    rgba(234, 179, 8, 0.4) 50%,
    rgba(239, 68, 68, 0.4) 75%
  );
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.bmi-scale-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  transition: left 0.2s ease;
}

.bmi-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.bmi-category-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.bmi-category-card {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  text-align: center;
  transition: all var(--transition);
}

.bmi-category-card .bmi-card-range {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.bmi-category-card .bmi-card-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bmi-category-card.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
}

.bmi-category-card.active .bmi-card-range,
.bmi-category-card.active .bmi-card-label {
  color: var(--primary);
}

.bmi-disclaimer {
  padding: 1rem;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-btn);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-primary);
  margin-top: 1rem;
}

.bmi-disclaimer strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

/* Waist to Hip Ratio (WHR) Calculator */
.whr-result-main {
  text-align: center;
  margin-bottom: 1.5rem;
}

.whr-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 600;
  color: var(--primary);
  line-height: 1.2;
  transition: color var(--transition);
}

.whr-label {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.whr-category {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-btn);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--transition);
}

.whr-category-low {
  background: rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

.whr-category-moderate {
  background: rgba(234, 179, 8, 0.2);
  color: #ca8a04;
}

.whr-category-high {
  background: rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.whr-scale {
  margin: 1.5rem 0;
}

.whr-scale-bar {
  position: relative;
  height: 12px;
  background: linear-gradient(to right,
    rgba(34, 197, 94, 0.4) 0%,
    rgba(234, 179, 8, 0.4) 50%,
    rgba(239, 68, 68, 0.4) 100%
  );
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.whr-scale-marker {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
  height: 20px;
  background: var(--primary);
  border-radius: 2px;
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.whr-scale-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.whr-category-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.whr-category-card {
  padding: 0.75rem 0.5rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  text-align: center;
  transition: all var(--transition);
}

.whr-category-card .whr-card-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.whr-category-card .whr-card-range {
  display: block;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.whr-category-card.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
}

.whr-category-card.active .whr-card-label,
.whr-category-card.active .whr-card-range {
  color: var(--primary);
}

.whr-chart-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.whr-chart-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.whr-chart-section .chart-container {
  min-height: 200px;
  margin-top: 0;
}

@media (max-width: 479px) {
  .whr-category-cards {
    grid-template-columns: 1fr;
  }
}

.bmr-calorie-table-wrap {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.bmr-calorie-table-wrap h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.table-responsive {
  overflow-x: auto;
}

.bmr-calorie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.bmr-calorie-table th,
.bmr-calorie-table td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.bmr-calorie-table th {
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.bmr-calorie-table td:last-child {
  font-weight: 600;
  color: var(--primary);
  text-align: right;
  white-space: nowrap;
}

.bmr-calorie-table tbody tr:hover {
  background: rgba(249, 87, 0, 0.04);
}

.bmr-table-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 0.75rem;
}

.bmr-table-note strong {
  color: var(--text-secondary);
}

/* TDEE calculator – goals section */
.tdee-bmi-wrap {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.tdee-bmi-wrap p {
  margin: 0;
  line-height: 1.5;
}

.tdee-goals-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.tdee-goals-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.tdee-goal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.375rem 0;
  font-size: 0.875rem;
}

.tdee-goal-label {
  flex: 1;
  color: var(--text-secondary);
}

.tdee-goal-val {
  font-weight: 600;
  color: var(--primary);
  min-width: 3.5rem;
  text-align: right;
}

.tdee-goal-pct {
  font-size: 0.75rem;
  color: var(--text-muted);
  min-width: 2.5rem;
  text-align: right;
}

.tdee-doctor-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: rgba(234, 179, 8, 0.08);
  border-radius: 4px;
  border-left: 3px solid rgba(234, 179, 8, 0.5);
}

.tdee-exercise-note {
  margin-top: 1rem;
  margin-bottom: 0;
}

/* Calorie calculator – goal selector & results */
.calorie-bmr-line {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 1rem 0;
}

.calorie-goal-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.calorie-goal-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.calorie-goal-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.calorie-goal-btn {
  flex: 1;
  min-width: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.75rem 0.5rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.calorie-goal-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.calorie-goal-btn.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
  color: var(--primary);
}

.calorie-goal-emoji {
  font-size: 1.25rem;
}

.calorie-goal-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  margin-bottom: 0;
}

.calorie-goal-detail {
  margin-top: 0.75rem;
}

.calorie-goal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-btn);
}

.calorie-goal-row span:first-child {
  font-weight: 600;
  color: var(--primary);
  margin-right: 0.5rem;
}

.calorie-goal-row.highlight {
  background: rgba(249, 87, 0, 0.08);
  color: var(--text-primary);
}

/* Macro calculator */
.input-hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.input-hint a {
  color: var(--primary);
  text-decoration: none;
}

.input-hint a:hover {
  text-decoration: underline;
}

.macro-preset-btns {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .macro-preset-btns {
    grid-template-columns: repeat(4, 1fr);
  }
}

.macro-preset-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  padding: 0.6rem 0.5rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.macro-preset-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.macro-preset-btn.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
  color: var(--primary);
}

.macro-preset-emoji {
  font-size: 1.25rem;
}

.macro-preset-ratios {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.macro-preset-btn.active .macro-preset-ratios {
  color: var(--primary);
  opacity: 0.9;
}

.macro-custom-ratios {
  margin-top: 1rem;
}

.macro-ratio-inputs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.macro-ratio-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.875rem;
}

.macro-ratio-label {
  flex: 1;
  color: var(--text-secondary);
}

.macro-ratio-value {
  min-width: 2.5rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.macro-ratio-row input[type="range"] {
  flex: 1 1 100%;
  width: 100%;
  height: 6px;
  margin: 0;
  accent-color: var(--primary);
  cursor: pointer;
}

.macro-ratio-row input[type="number"] {
  width: 4rem;
  padding: 0.4rem 0.5rem;
  text-align: right;
}

.macro-ratio-total {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.macro-result-calories {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.macro-result-heading {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.macro-chart-wrap {
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  min-height: 200px;
  position: relative;
}

.macro-chart-wrap canvas {
  max-height: 220px;
}

.macro-result-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  border-bottom: 1px solid var(--border);
}

.macro-result-item:last-of-type {
  border-bottom: none;
}

.macro-result-grams {
  font-weight: 600;
  font-size: 1.25rem;
  min-width: 3.5rem;
}

.macro-result-protein .macro-result-grams,
.macro-result-protein .macro-result-label,
.macro-result-protein .macro-result-cal {
  color: #E04F00;
}

.macro-result-carbs .macro-result-grams,
.macro-result-carbs .macro-result-label,
.macro-result-carbs .macro-result-cal {
  color: #2563EB;
}

.macro-result-fat .macro-result-grams,
.macro-result-fat .macro-result-label,
.macro-result-fat .macro-result-cal {
  color: #16A34A;
}

.macro-result-label {
  flex: 1;
}

.macro-result-cal {
  font-size: 0.75rem;
}

/* Body Surface Area calculator */
.bsa-result-main .bsa-value-animated {
  transition: transform 0.2s ease;
}
.bsa-chart-wrap {
  min-height: 240px;
}
.bsa-chart-wrap canvas {
  max-height: 260px;
}

.macro-quick-ref {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.macro-quick-ref h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.macro-ref-table {
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-collapse: collapse;
}

.macro-ref-table td {
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--border);
}

.macro-ref-table tr:last-child td {
  border-bottom: none;
}

.macro-ref-table td:last-child {
  text-align: right;
}

/* Body fat calculator */
.bf-gender-btns,
.afpt-gender-btns {
  display: flex;
  gap: 0.5rem;
}

.bf-gender-btn,
.lbm-gender-btn,
.bsa-gender-btn,
.army-bf-gender-btn,
.fitness-age-gender-btn,
.afpt-gender-btn {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  transition: all var(--transition);
}

.bf-gender-btn:hover,
.lbm-gender-btn:hover,
.bsa-gender-btn:hover,
.army-bf-gender-btn:hover,
.fitness-age-gender-btn:hover,
.afpt-gender-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.bf-gender-btn.active,
.lbm-gender-btn.active,
.bsa-gender-btn.active,
.army-bf-gender-btn.active,
.fitness-age-gender-btn.active,
.afpt-gender-btn.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
  color: var(--primary);
}

.bf-gender-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.bf-category-scale {
  margin: 1rem 0;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.bf-category-bar {
  display: flex;
  justify-content: space-between;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.bf-cat {
  flex: 1;
  text-align: center;
  padding: 0.25rem 0;
  border-radius: 4px;
  transition: background var(--transition), color var(--transition);
}

.bf-cat.active {
  background: rgba(249, 87, 0, 0.2);
  color: var(--primary);
  font-weight: 600;
}

.bf-category-name {
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
  margin: 0;
  transition: color var(--transition);
}
.bf-category-name[data-category="essential"] { color: #0EA5E9; }
.bf-category-name[data-category="athletic"] { color: #22C55E; }
.bf-category-name[data-category="fitness"] { color: var(--primary); }
.bf-category-name[data-category="average"] { color: #CA8A04; }
.bf-category-name[data-category="obese"] { color: #EF4444; }

.bf-mass-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.bf-mass-item {
  text-align: center;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
}

.bf-mass-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
}

.bf-mass-unit {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.bf-mass-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Body fat – category colors for BF % */
.bf-result-header.bf-cat-essential .bmi-value { color: #0EA5E9; }
.bf-result-header.bf-cat-athletic .bmi-value { color: #22C55E; }
.bf-result-header.bf-cat-fitness .bmi-value { color: var(--primary); }
.bf-result-header.bf-cat-average .bmi-value { color: #EAB308; }
.bf-result-header.bf-cat-obese .bmi-value { color: #EF4444; }

/* Fat mass / lean mass cards */
.bf-mass-fat .bf-mass-value { color: #F97316; }
.bf-mass-fat { border: 1px solid #F97316; }
.bf-mass-lean .bf-mass-value { color: #2563EB; }
.bf-mass-lean { border: 1px solid #2563EB; }

/* Category bar – colored segments */
.bf-cat[data-cat="essential"] { background: rgba(14, 165, 233, 0.15); }
.bf-cat[data-cat="essential"].active { background: rgba(14, 165, 233, 0.35); color: #0EA5E9; }
.bf-cat[data-cat="athletic"] { background: rgba(34, 197, 94, 0.15); }
.bf-cat[data-cat="athletic"].active { background: rgba(34, 197, 94, 0.35); color: #22C55E; }
.bf-cat[data-cat="fitness"] { background: rgba(249, 87, 0, 0.15); }
.bf-cat[data-cat="fitness"].active { background: rgba(249, 87, 0, 0.35); color: var(--primary); }
.bf-cat[data-cat="average"] { background: rgba(234, 179, 8, 0.15); }
.bf-cat[data-cat="average"].active { background: rgba(234, 179, 8, 0.35); color: #CA8A04; }
.bf-cat[data-cat="obese"] { background: rgba(239, 68, 68, 0.15); }
.bf-cat[data-cat="obese"].active { background: rgba(239, 68, 68, 0.35); color: #EF4444; }

/* Body composition chart */
.bf-chart-wrap {
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  min-height: 180px;
}

.bf-chart-wrap h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.bf-chart-wrap canvas {
  max-height: 200px;
}

/* Army Body Fat Calculator */
.army-bf-result-header {
  text-align: center;
  padding: 1rem 0;
}
.army-bf-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
}
.army-bf-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.army-bf-result-header.army-bf-pass .army-bf-value { color: #22C55E; }
.army-bf-result-header.army-bf-fail .army-bf-value { color: #EF4444; }
.army-bf-status {
  text-align: center;
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
}
.army-bf-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
}
.army-bf-badge-pass { background: rgba(34, 197, 94, 0.2); color: #16A34A; }
.army-bf-badge-fail { background: rgba(239, 68, 68, 0.2); color: #DC2626; }
.army-bf-status-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  margin-bottom: 0;
}
.army-bf-chart-wrap {
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  min-height: 180px;
}

/* Fitness Age Calculator */
.fitness-age-result {
  text-align: center;
  padding: 1rem 0;
}
.fitness-age-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
}
.fitness-age-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.fitness-age-compare {
  text-align: center;
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.fitness-age-compare p {
  margin: 0;
}
.army-bf-chart-wrap canvas {
  max-height: 200px;
}
.army-sens-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}

.input-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.8em;
}

.calorie-target-wrap {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
}

.calorie-target-wrap h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.calorie-target-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin: 0;
}

.calorie-target-value small {
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.calorie-what-means {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.calorie-what-means h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.calorie-what-means ul {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.bmi-chart-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.bmi-chart-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.bmi-chart-section .chart-container {
  min-height: 200px;
  margin-top: 0;
}

/* Chart */
.chart-container {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  min-height: 220px;
}

.chart-container canvas {
  max-height: 200px;
}

/* SEO Content */
.seo-content {
  margin-top: var(--section-gap);
  padding-top: var(--section-gap);
  border-top: 1px solid var(--border);
}

.seo-content h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text-primary);
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.5rem 0 0.5rem;
}

.seo-content p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.7;
}

.seo-content ul {
  margin-bottom: 1rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
}

.seo-content li {
  margin-bottom: 0.375rem;
}

.seo-content a {
  color: var(--primary);
  text-decoration: none;
}

.seo-content a:hover {
  text-decoration: underline;
}

/* FAQ */
.faq-item {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.faq-item p {
  margin: 0;
  font-size: 0.9375rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Related links */
.related-section {
  margin-top: var(--section-gap);
  margin-bottom: var(--section-gap);
  padding-top: var(--section-gap);
  border-top: 1px solid var(--border);
}

.related-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.related-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  transition: all var(--transition);
}

.related-links a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Calculators listing page */
.calculators-section {
  padding: var(--section-gap) 0;
}

.home-disclaimer {
  margin-top: 2rem;
  padding: 1rem 1.25rem;
  background: rgba(234, 179, 8, 0.12);
  border: 1px solid rgba(234, 179, 8, 0.4);
  border-radius: var(--radius-card);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.home-disclaimer strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
}

.home-advantages {
  padding: var(--section-gap) 0 64px;
  border-top: 1px solid var(--border);
}

.home-advantages .section-title {
  text-align: center;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.advantage-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.advantage-card:hover {
  border-color: rgba(249, 87, 0, 0.3);
  box-shadow: var(--shadow-hover);
}

.advantage-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.advantage-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.advantage-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.calculators-section .section-title {
  margin-bottom: 1.25rem;
}

.what-sportycalc-section {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}

.what-sportycalc-desc {
  max-width: 56ch;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-mission-section {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}

.home-mission-section .section-title {
  margin-bottom: 1.25rem;
  text-align: center;
}

.home-mission-prose {
  max-width: 65ch;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.home-mission-prose p {
  margin: 0;
}

.home-mission-prose p + p {
  margin-top: 1rem;
}

.home-mission-prose a {
  color: var(--primary);
  text-decoration: none;
}

.home-mission-prose a:hover {
  text-decoration: underline;
}

.guides-preview-section {
  padding: var(--section-gap) 0;
  border-top: 1px solid var(--border);
}
.guides-preview-section .section-desc {
  margin: -0.5rem 0 1.25rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}
.guides-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.guides-preview-grid .calc-card-more {
  border-style: dashed;
}

/* All calculators grid (non-featured) */
.calculators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.calc-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.calc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(249, 87, 0, 0.15);
}

.calc-card-icon {
  width: 40px;
  height: 40px;
  background: var(--bg);
  border-radius: var(--radius-btn);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.calc-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.calc-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.calc-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-top: 0.875rem;
}

.calc-card-tags span {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
  border-radius: 4px;
  transition: background 0.3s ease, color 0.3s ease;
}

.calc-card:hover .calc-card-tags span {
  background: rgba(249, 87, 0, 0.2);
}

.calc-card-coming-soon {
  cursor: default;
  pointer-events: none;
  opacity: 0.7;
}

.calc-card-coming-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--border);
}

/* Content page (guides, blog, about) */
.content-page {
  padding: var(--section-gap) 0;
}

.content-page .lead {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.content-body {
  max-width: 720px;
}

.content-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.content-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.25rem 0 0.5rem;
}

.content-body p, .content-body li {
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.content-body ul,
.content-body ol {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.content-body ul { list-style-type: disc; }
.content-body ol { list-style-type: decimal; }

.content-body a {
  color: var(--primary);
  text-decoration: none;
}

.content-body a:hover {
  text-decoration: underline;
}

.content-meta {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Guide table (TDEE guide etc.) */
.table-wrap {
  overflow-x: auto;
  margin: 1rem 0;
}
.guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.guide-table th,
.guide-table td {
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  text-align: left;
}
.guide-table th {
  background: var(--bg-elevated);
  font-weight: 600;
  color: var(--text-primary);
}
.guide-table td { color: var(--text-secondary); }

.guide-table td a {
  color: var(--primary);
  text-decoration: none;
}

.guide-table td a:hover {
  text-decoration: underline;
}

/* TDEE guide goal cards */
.tdee-goals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}
.tdee-goal {
  padding: 1rem;
  border-radius: var(--radius-card);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.tdee-goal-emoji {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.5rem;
}
.tdee-goal h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}
.tdee-goal p {
  margin: 0;
  font-size: 0.875rem;
}
.tdee-goal-loss { border-left: 4px solid #22C55E; }
.tdee-goal-gain { border-left: 4px solid #F97316; }
.tdee-goal-maintain { border-left: 4px solid #0EA5E9; }

/* ===================== Fitness Quiz ===================== */
/* Page share block (BMI calculator and reusable pattern) */
.page-share-section {
  margin-bottom: var(--section-gap);
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.page-share-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.35rem;
  color: var(--text-primary);
}

.page-share-desc {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.page-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.page-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  line-height: 1.2;
  color: var(--text-primary);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

button.page-share-btn {
  cursor: pointer;
}

.page-share-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card);
  color: var(--primary);
}

.page-share-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.page-share-btn-icon {
  display: flex;
  flex-shrink: 0;
  opacity: 0.9;
}

.page-share-status {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
  color: var(--primary);
}

.page-share-section--after-calculator {
  margin-top: var(--section-gap);
}

.quiz-cta-section {
  margin-bottom: var(--section-gap);
}

.quiz-cta-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(249, 87, 0, 0.08) 0%, rgba(37, 99, 235, 0.06) 100%);
  border: 1px solid rgba(249, 87, 0, 0.2);
  border-radius: var(--radius-card);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition);
}

.quiz-cta-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.quiz-cta-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.quiz-cta-content {
  flex: 1;
  min-width: 0;
}

.quiz-cta-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.quiz-cta-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

.quiz-cta-arrow {
  font-size: 1.5rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--transition);
}

.quiz-cta-card:hover .quiz-cta-arrow {
  transform: translateX(4px);
}

/* Quiz page */
.quiz-section {
  padding: 1.5rem 0 var(--section-gap);
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  --quiz-progress: 20%;
}

.quiz-progress-bar::before {
  content: '';
  display: block;
  height: 100%;
  width: var(--quiz-progress);
  background: var(--primary);
  border-radius: 3px;
  transition: width 0.35s ease;
}

.quiz-progress-text {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.quiz-question {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quiz-answer-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.25rem;
  text-align: left;
  font-family: var(--font);
  font-size: 1rem;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
}

.quiz-answer-btn:hover:not(:disabled) {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.06);
}

.quiz-answer-btn:disabled {
  cursor: default;
}

.quiz-answer-correct {
  border-color: #22C55E !important;
  background: rgba(34, 197, 94, 0.12) !important;
  color: var(--text-primary);
}

.quiz-answer-wrong {
  border-color: #EF4444 !important;
  background: rgba(239, 68, 68, 0.08) !important;
  color: var(--text-primary);
}

.quiz-feedback {
  margin-top: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-btn);
  font-weight: 500;
}

.quiz-feedback-correct {
  background: rgba(34, 197, 94, 0.15);
  color: #15803D;
}

[data-theme="dark"] .quiz-feedback-correct {
  background: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
}

.quiz-feedback-wrong {
  background: rgba(239, 68, 68, 0.12);
  color: #B91C1C;
}

[data-theme="dark"] .quiz-feedback-wrong {
  background: rgba(239, 68, 68, 0.2);
  color: #F87171;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.quiz-result {
  padding: 2rem 0 var(--section-gap);
  text-align: center;
}

.quiz-result h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.quiz-score {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.quiz-score-desc {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.quiz-hero-intro p {
  margin-bottom: 0.75rem;
}

.quiz-tool-line {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.quiz-score-pct {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.quiz-tier-badge {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  background: rgba(249, 87, 0, 0.15);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0.75rem 0 1rem;
}

.quiz-result-body {
  text-align: left;
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.quiz-result-body a {
  color: var(--primary);
}

.quiz-tools-cta {
  text-align: left;
  max-width: 36rem;
  margin: 2rem auto 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.quiz-tools-cta h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.quiz-result-links {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.quiz-share-hint {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-top: 1rem;
  font-style: italic;
}

.quiz-retake {
  margin-right: 0.75rem;
}

.quiz-retake-btn {
  margin-top: 0.5rem;
}

.quiz-cta-inline {
  margin: 1rem 0;
}

.quiz-cta-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

.quiz-cta-text a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.quiz-cta-text a:hover {
  text-decoration: underline;
}

/* Running Pace Calculator */
.pace-input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.pace-unit-hint {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.pace-results-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pace-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-btn);
  border-left: 4px solid transparent;
  transition: background 0.2s ease;
}

.pace-tier-short {
  background: rgba(34, 197, 94, 0.12);
  border-left-color: #22C55E;
}

.pace-tier-short .pace-result-label {
  color: #16A34A;
}

.pace-tier-short .pace-result-value {
  font-weight: 600;
  color: #15803D;
}

.pace-tier-mid {
  background: rgba(59, 130, 246, 0.12);
  border-left-color: #3B82F6;
}

.pace-tier-mid .pace-result-label {
  color: #2563EB;
}

.pace-tier-mid .pace-result-value {
  font-weight: 600;
  color: #1D4ED8;
}

.pace-tier-half {
  background: rgba(249, 115, 22, 0.12);
  border-left-color: #F97316;
}

.pace-tier-half .pace-result-label {
  color: #EA580C;
}

.pace-tier-half .pace-result-value {
  font-weight: 600;
  color: #C2410C;
}

.pace-tier-long {
  background: rgba(168, 85, 247, 0.12);
  border-left-color: #A855F7;
}

.pace-tier-long .pace-result-label {
  color: #9333EA;
}

.pace-tier-long .pace-result-value {
  font-weight: 600;
  color: #7E22CE;
}

[data-theme="dark"] .pace-tier-short {
  background: rgba(34, 197, 94, 0.15);
}

[data-theme="dark"] .pace-tier-short .pace-result-label { color: #4ADE80; }
[data-theme="dark"] .pace-tier-short .pace-result-value { color: #22C55E; }

[data-theme="dark"] .pace-tier-mid {
  background: rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .pace-tier-mid .pace-result-label { color: #60A5FA; }
[data-theme="dark"] .pace-tier-mid .pace-result-value { color: #3B82F6; }

[data-theme="dark"] .pace-tier-half {
  background: rgba(249, 115, 22, 0.15);
}

[data-theme="dark"] .pace-tier-half .pace-result-label { color: #FB923C; }
[data-theme="dark"] .pace-tier-half .pace-result-value { color: #F97316; }

[data-theme="dark"] .pace-tier-long {
  background: rgba(168, 85, 247, 0.15);
}

[data-theme="dark"] .pace-tier-long .pace-result-label { color: #C084FC; }
[data-theme="dark"] .pace-tier-long .pace-result-value { color: #A855F7; }

/* VO2 Max Calculator */
.method-inputs {
  margin-top: 1rem;
}

.time-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.time-input-row input {
  width: 4rem;
}

.time-sep {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.vo2-result-main {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.vo2-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
}

.vo2-unit {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.vo2-category {
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-btn);
  display: inline-block;
  margin-bottom: 1rem;
}

.vo2-cat-poor { background: rgba(239, 68, 68, 0.2); color: #DC2626; }
.vo2-cat-fair { background: rgba(249, 115, 22, 0.2); color: #EA580C; }
.vo2-cat-average { background: rgba(234, 179, 8, 0.2); color: #CA8A04; }
.vo2-cat-good { background: rgba(34, 197, 94, 0.2); color: #16A34A; }
.vo2-cat-excellent { background: rgba(59, 130, 246, 0.2); color: #2563EB; }
.vo2-cat-superior { background: rgba(168, 85, 247, 0.2); color: #7C3AED; }

.vo2-chart-section {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.vo2-chart-section h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.vo2-chart-section .chart-container {
  min-height: 200px;
  margin-top: 0;
}

/* Protein in Food Calculator */
.protein-food-result {
  text-align: center;
}

.protein-food-value-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.25rem;
}

.protein-food-value {
  font-size: 2rem;
  font-weight: 600;
  color: var(--primary);
}

.protein-food-unit {
  font-size: 1rem;
  color: var(--text-muted);
}

.protein-food-name {
  display: block;
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

/* Sleep Cycle Calculator */
.sleep-mode-toggle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.sleep-mode-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, color 0.2s;
}

.sleep-mode-btn:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
}

.sleep-mode-btn.active {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.12);
  color: var(--primary);
}

.sleep-mode-icon {
  font-size: 1.25rem;
}

.sleep-panel-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sleep-result-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

.sleep-placeholder-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.sleep-result-placeholder p {
  font-size: 0.9375rem;
  max-width: 240px;
  line-height: 1.5;
}

.sleep-results-card .sleep-result-heading {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  line-height: 1.4;
}

.sleep-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.sleep-option {
  padding: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  animation: sleepOptionFadeIn 0.4s ease-out both;
}

.sleep-option-recommended {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.08);
  box-shadow: 0 0 0 1px rgba(249, 87, 0, 0.2);
}

.sleep-option-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.sleep-option-time {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
}

.sleep-option-recommended .sleep-option-time {
  color: var(--primary);
}

.sleep-option-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.5rem;
  background: var(--primary);
  color: #fff;
  border-radius: 4px;
}

.sleep-option-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

@keyframes sleepOptionFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sleep-chart-wrap {
  height: 180px;
  margin: 1rem 0;
  padding: 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius);
}

.sleep-cycle-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.sleep-cycle-badge {
  font-weight: 600;
  color: var(--text-secondary);
  padding: 0.2rem 0.5rem;
  background: var(--bg-elevated);
  border-radius: 4px;
}

.sleep-reset-btn {
  width: 100%;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

.sleep-reset-btn:hover {
  color: var(--text-secondary);
  border-color: var(--text-secondary);
}

/* ===================== Email Popup (calculator pages) ===================== */
.email-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.email-popup-overlay.email-popup-visible {
  opacity: 1;
  visibility: visible;
}

.email-popup-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  background: var(--bg);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  animation: email-popup-fade 0.3s ease;
}

@keyframes email-popup-fade {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.email-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.email-popup-close:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.email-popup-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text-primary);
}

.email-popup-text {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.email-popup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.email-popup-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.email-popup-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-focus);
}

.email-popup-input::placeholder {
  color: var(--text-muted);
}

.email-popup-error {
  font-size: 0.8125rem;
  color: #DC2626;
  min-height: 1.25rem;
}

.email-popup-btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font);
  color: #fff;
  background: var(--primary);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.email-popup-btn:hover:not(:disabled) {
  background: var(--primary-hover);
}

.email-popup-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.email-popup-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.email-popup-disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 1rem 0 0;
  text-align: center;
}

.email-popup-success {
  font-size: 1rem;
  font-weight: 600;
  color: #16A34A;
  margin: 0;
  padding: 1rem 0;
  text-align: center;
}

/* ===================== McDonald's Nutrition Calculator (meal builder) ===================== */
.mcd-hero-desc p {
  margin: 0 auto 0.85rem;
  max-width: 42rem;
}

.mcd-hero-desc p:last-child {
  margin-bottom: 0;
}

.mcd-form-card .mcd-hint {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: -0.5rem 0 1.25rem;
  line-height: 1.5;
}

.mcd-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mcd-tab {
  padding: 0.45rem 0.85rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.mcd-tab:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.mcd-tab-active {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.mcd-tab-active:hover {
  color: #fff;
  border-color: var(--primary);
}

.mcd-item-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mcd-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}

.mcd-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.mcd-item-name {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9375rem;
}

.mcd-item-kcal {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.mcd-add-btn {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font);
  color: var(--primary);
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.mcd-add-btn:hover {
  color: #fff;
  background: var(--primary);
}

.mcd-results-card .results-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text-primary);
}

.mcd-cart-empty {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}

.mcd-cart-lines {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mcd-cart-line {
  padding: 0.65rem 0.75rem;
  background: var(--bg-elevated);
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
}

.mcd-cart-line-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.mcd-cart-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.35;
}

.mcd-remove {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  padding: 0;
  line-height: 1;
  font-size: 1.25rem;
  color: var(--text-muted);
  background: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.mcd-remove:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.mcd-cart-line-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  gap: 0.75rem;
}

.mcd-qty-label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.mcd-qty-input {
  width: 3.25rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.mcd-line-kcal {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.mcd-clear {
  width: 100%;
  margin-bottom: 1.25rem;
}

.mcd-totals-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.65rem;
  color: var(--text-primary);
}

.mcd-total-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.mcd-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.mcd-total-row strong {
  color: var(--text-primary);
  font-weight: 600;
}

.mcd-total-highlight {
  padding: 0.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0.25rem 0;
  font-size: 1rem;
}

.mcd-total-highlight strong {
  font-size: 1.35rem;
  color: var(--primary);
}

.mcd-dv-note {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.45;
}

/* ===================== Chipotle Nutrition Calculator ===================== */
.chip-form-card fieldset {
  border: none;
  margin: 0 0 1.35rem;
  padding: 0;
}

.chip-form-card fieldset:last-of-type {
  margin-bottom: 0;
}

.chip-legend {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.65rem;
  padding: 0;
}

.chip-legend-hint {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.chip-base-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 0.6rem;
}

.chip-base-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: center;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 2px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
  outline: none;
  box-shadow: none;
}

.chip-base-card:has(:checked) {
  border-color: var(--primary);
  background: rgba(249, 87, 0, 0.08);
  color: var(--text-primary);
}

.chip-base-card input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  clip: rect(0, 0, 0, 0);
}

/* Single ring for keyboard focus — avoid a second ring on top of the selected border */
.chip-base-card:has(input:focus-visible) {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.chip-base-card:has(:checked):has(input:focus-visible) {
  box-shadow: none;
}

.chip-radio-list,
.chip-check-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.chip-check-wrap {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.chip-inline {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  cursor: pointer;
}

.chip-inline input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--primary);
}

.chip-qty-block {
  margin-top: 0.5rem;
}

.chip-qty-main {
  font-weight: 500;
}

.chip-qty-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.35rem 0 0 1.55rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.chip-qty-row select {
  padding: 0.35rem 0.5rem;
  font-size: 0.875rem;
  font-family: var(--font);
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.chip-official-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 1.25rem 0 0;
}

.chip-page-disclaimer {
  margin-top: 1.25rem;
}

.chip-seo {
  margin-top: var(--section-gap);
}

.chip-hero-desc p {
  margin: 0 auto 0.85rem;
  max-width: 42rem;
}

.chip-hero-desc p:last-child {
  margin-bottom: 0;
}

.chip-results-card {
  position: sticky;
  top: 5.5rem;
}

.chip-total-hero {
  text-align: center;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.chip-total-cal-wrap {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.chip-kcal {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.chip-dv-wrap {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.chip-dv-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.chip-total-grid {
  margin-bottom: 1rem;
}

.chip-clear-btn {
  width: 100%;
}
