/* ==========================================================================
   VitalMetrics — Design tokens
   Palette: deep forest teal + warm gold accent + warm off-white
   Type: Fraunces (display, characterful serif) / Inter (body, humanist sans)
   Signature: the "vitals strip" — a live ticker of readouts in the hero,
   echoed as small numbered readouts on every calculator card.
   ========================================================================== */

:root {
  --ink: #16231F;
  --ink-soft: #3B4B45;
  --paper: #F6F5F0;
  --paper-raised: #FFFFFF;
  --teal-900: #0E332F;
  --teal-700: #16473F;
  --teal-500: #1F6355;
  --gold-500: #D6A24A;
  --gold-300: #EAC784;
  --coral-500: #C15B4A;
  --line: rgba(22, 35, 31, 0.12);
  --line-strong: rgba(22, 35, 31, 0.22);
  --shadow: 0 10px 30px rgba(14, 51, 47, 0.08);
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 8px;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--teal-900);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper-raised);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 1.35rem;
  color: var(--teal-900);
}
.brand .dot { color: var(--gold-500); }
.main-nav { display: flex; gap: 28px; align-items: center; }
.main-nav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 500;
}
.main-nav a:hover { color: var(--teal-700); text-decoration: none; }
.nav-toggle { display: none; }

/* ---------- Hero / vitals strip (signature element) ---------- */
.hero {
  background: linear-gradient(180deg, var(--teal-900) 0%, var(--teal-700) 100%);
  color: #F1EFE6;
  padding: 64px 0 0;
  position: relative;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-300);
  font-weight: 600;
  margin-bottom: 18px;
}
.hero h1 {
  color: #FBFAF5;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  max-width: 16ch;
}
.hero p.lede {
  margin-top: 20px;
  max-width: 52ch;
  font-size: 1.1rem;
  color: rgba(241, 239, 230, 0.82);
}

.vitals-strip {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(241, 239, 230, 0.18);
}
.vital {
  padding: 22px 20px 26px;
  border-right: 1px solid rgba(241, 239, 230, 0.18);
}
.vital:last-child { border-right: none; }
.vital .num {
  font-family: 'Fraunces', serif;
  font-size: 2.1rem;
  color: var(--gold-300);
  font-variant-numeric: tabular-nums;
}
.vital .label {
  font-size: 0.8rem;
  color: rgba(241, 239, 230, 0.68);
  margin-top: 4px;
}

/* ---------- Section scaffolding ---------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 36px; max-width: 60ch; }
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.section-head p { color: var(--ink-soft); margin-top: 10px; }
.section-alt { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- Tool grid & cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.tool-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px 26px 24px;
  box-shadow: var(--shadow);
}
.tool-card .kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--teal-900);
  color: var(--gold-300);
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.tool-card h3 { font-size: 1.2rem; margin-bottom: 6px; }
.tool-card .desc { color: var(--ink-soft); font-size: 0.94rem; margin-bottom: 18px; }

/* form fields */
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); }
.field input, .field select {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 0.98rem;
  font-family: inherit;
  background: var(--paper);
  color: var(--ink);
}
.field input:focus, .field select:focus { border-color: var(--teal-500); }

.unit-toggle {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 14px;
  gap: 2px;
}
.unit-toggle button {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.unit-toggle button.active { background: var(--teal-900); color: #F1EFE6; }

.btn {
  display: inline-block;
  background: var(--teal-900);
  color: #FBFAF5;
  border: none;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  width: 100%;
  margin-top: 4px;
}
.btn:hover { background: var(--teal-700); text-decoration: none; }
.btn.secondary { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.btn.secondary:hover { background: var(--paper); }

.result-box {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: #F0EDE2;
  border: 1px solid var(--line);
  display: none;
}
.result-box.show { display: block; }
.result-box .headline {
  font-family: 'Fraunces', serif;
  font-size: 1.7rem;
  color: var(--teal-900);
}
.result-box .sub { font-size: 0.86rem; color: var(--ink-soft); margin-top: 4px; }
.result-box .scale {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}
.result-box .scale span { flex: 1; }

.note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-top: 12px;
  border-top: 1px dashed var(--line);
  padding-top: 10px;
}

/* ---------- Articles ---------- */
.article-list { display: grid; gap: 18px; }
.article-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 18px;
  align-items: start;
}
.article-card .tag {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-500);
  font-weight: 700;
  background: var(--teal-900);
  padding: 6px 8px;
  border-radius: 6px;
  text-align: center;
}
.article-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.article-card p { color: var(--ink-soft); font-size: 0.92rem; margin: 0; }

.prose { max-width: 68ch; }
.prose h2 { margin-top: 34px; font-size: 1.4rem; }
.prose p { color: var(--ink-soft); }
.prose ul { color: var(--ink-soft); }

/* ---------- Ad slots ---------- */
.ad-slot {
  background: var(--paper-raised);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 36px 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-900);
  color: rgba(241, 239, 230, 0.78);
  padding: 48px 0 28px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(241, 239, 230, 0.14);
}
.footer-grid h4 {
  color: var(--gold-300);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}
.footer-grid a { color: rgba(241, 239, 230, 0.78); display: block; margin-bottom: 8px; font-size: 0.9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom {
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: rgba(241, 239, 230, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .main-nav { display: none; }
  .vitals-strip { grid-template-columns: repeat(2, 1fr); }
  .vital:nth-child(2) { border-right: none; }
  .field-row { grid-template-columns: 1fr; }
  .article-card { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
