/* FitCalcTools — Shared Styles */


:root {
  --white: #ffffff;
  --bg: #fafafa;
  --bg-card: #ffffff;
  --border: #e5e7eb;
  --border-light: #f0f0f0;
  --text: #1a1a1a;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --accent-dark: #1e40af;
  --green: #059669;
  --green-light: #ecfdf5;
  --amber: #d97706;
  --amber-light: #fffbeb;
  --red: #dc2626;
  --red-light: #fef2f2;
  --purple: #7c3aed;
  --purple-light: #f5f3ff;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --max-width: 800px;
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
.site-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 52px;
  gap: 24px;
}
.nav-logo {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.3px;
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 3px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex: 1;
  min-width: 0;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-cat {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 0 6px;
  flex-shrink: 0;
  user-select: none;
}
.nav-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
  margin: 0 4px;
  flex-shrink: 0;
}
.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 12.5px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.nav-links a:hover { background: var(--bg); color: var(--text); }
.nav-links a.active { background: var(--accent-light); color: var(--accent); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
  flex-shrink: 0;
}
.nav-hamburger svg { display: block; }

/* ---- HERO ---- */
.hero {
  text-align: center;
  padding: 48px 20px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-light);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 12px;
  font-weight: 400;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ---- CARD ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ---- CALC WRAPPER ---- */
.calc-wrapper {
  max-width: 640px;
  margin: 0 auto 32px;
  padding: 0 16px;
}

/* ---- TABS ---- */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.tab {
  flex: 1;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border: none;
  background: none;
  font-family: var(--font);
  transition: all 0.15s;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.tab:hover:not(.active) { color: var(--text-secondary); background: var(--bg); }

/* ---- FORM ELEMENTS ---- */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.time-input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: var(--font);
  font-size: 32px;
  font-weight: 600;
  padding: 14px 16px;
  text-align: center;
  outline: none;
  transition: border-color 0.15s;
  -webkit-appearance: none;
}
.time-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.time-input::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.5; }

.pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font);
}
.pill:hover { border-color: var(--accent); color: var(--accent); }
.pill.active {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: scale(0.99); }

.btn-secondary {
  background: var(--bg);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  transition: all 0.15s;
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

/* ---- RESULTS ---- */
.results-area { display: none; padding: 24px; border-top: 1px solid var(--border); }
.results-area.visible { display: block; }
.results-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.result-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px;
  text-align: center;
  transition: all 0.15s;
}
.result-card.best {
  border-color: var(--accent);
  background: var(--accent-light);
}
.result-time {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 2px;
}
.result-card.best .result-time { color: var(--accent); }
.result-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
}
.result-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: var(--accent);
  color: var(--white);
  border-radius: 4px;
  padding: 2px 7px;
  margin-top: 4px;
}
.result-note {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
}

/* ---- AD SLOT ---- */
.ad-slot {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  max-width: 640px;
  margin: 0 auto 32px;
  padding: 0 16px;
}

/* ---- CONTENT SECTIONS ---- */
.content-area {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}
.section { margin-bottom: 48px; }
.section-title {
  font-family: var(--font-serif);
  font-size: 26px;
  color: var(--text);
  margin-bottom: 16px;
  font-weight: 400;
}
.section p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.75;
}

/* Stage cards */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.stage-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.stage-icon { font-size: 22px; margin-bottom: 6px; }
.stage-name { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.stage-dur { font-size: 12px; color: var(--accent); font-weight: 500; margin-bottom: 6px; }
.stage-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* Tips */
.tips-list { list-style: none; margin-top: 16px; }
.tips-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  line-height: 1.6;
}
.tips-list li:last-child { border-bottom: none; }
.tip-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

/* Age table */
.age-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}
.age-table th {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  padding: 10px 12px;
  border-bottom: 2px solid var(--border);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.age-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.age-table tr:last-child td { border-bottom: none; }
.age-table .highlight td { background: var(--accent-light); color: var(--accent); font-weight: 500; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}
.faq-a {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ---- RELATED CALCULATORS ---- */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.related-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-decoration: none;
  transition: all 0.15s;
}
.related-card:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.related-card .rc-name { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.related-card .rc-desc { font-size: 12px; color: var(--text-muted); line-height: 1.4; }

/* ---- FOOTER ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 20px;
  text-align: center;
  margin-top: 48px;
}
.footer-links { margin-bottom: 8px; }
.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  margin: 0 10px;
}
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: 12px; color: var(--text-muted); }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-hamburger { display: block; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 52px; left: 0; right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 16px;
    gap: 2px;
    box-shadow: var(--shadow-md);
    overflow-y: auto;
    max-height: 80vh;
  }
  .nav-links.open a { padding: 10px 12px; white-space: normal; }
  .nav-links.open .nav-cat { padding: 12px 6px 4px; font-size: 11px; color: var(--accent); }
  .nav-links.open .nav-sep { display: none; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { padding: 32px 16px 24px; }
  .stages-grid { grid-template-columns: 1fr 1fr; }
}

/* ---- UTILITY ---- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
