/* ============================================================
   BioSync Lab — Vanilla Static Build
   Cyber-Medical Dark Theme · Brand palette ported from app
   ============================================================ */

/* NOTE: @import removed. Load fonts via <link> in <head> instead:
   <link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=JetBrains+Mono:wght@400;600&display=swap">
*/

:root {
  --background: 216 14% 8%;
  --foreground: 210 20% 90%;
  --card: 216 12% 10%;
  --card-foreground: 210 20% 90%;
  --card-border: 216 10% 19%;
  --primary: 84 100% 72%;
  --primary-foreground: 216 14% 8%;
  --secondary: 216 10% 15%;
  --muted: 216 10% 15%;
  --muted-foreground: 216 10% 50%;
  --accent: 216 100% 62%;
  --destructive: 0 84% 60%;
  --border: 216 10% 19%;
  --ring: 84 100% 72%;
  --glow-primary: 0 0 20px hsl(84 100% 72% / 0.3);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

body {
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.font-mono { font-family: var(--font-mono); }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 1.5rem; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: hsl(var(--background) / 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid hsl(var(--border));
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; padding: 0.75rem 1.5rem;
}
.brand {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 1.125rem; letter-spacing: 0.15em;
}
.brand .light { font-weight: 300; letter-spacing: 0.2em; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a, .nav button {
  background: transparent; border: 0;
  padding: 0.5rem 0.75rem; font-family: var(--font-mono);
  font-size: 0.75rem; letter-spacing: 0.15em;
  text-transform: uppercase; color: hsl(var(--muted-foreground));
  border-radius: 0.375rem; transition: color .2s;
}
.nav a:hover, .nav a.active { color: hsl(var(--primary)); }
.nav .cta {
  border: 1px solid hsl(var(--primary) / 0.4);
  color: hsl(var(--primary)); margin-left: 0.5rem;
}
.nav .cta:hover { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }

.combobox { position: relative; }
.combobox-menu {
  display: none; position: absolute; right: 0; top: 100%;
  min-width: 240px; background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem; padding: 0.5rem; z-index: 60;
}
.combobox.open .combobox-menu { display: block; }
.combobox-menu a {
  display: block; padding: 0.5rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: hsl(var(--foreground)); border-radius: 0.25rem;
  text-transform: none; letter-spacing: normal;
}
.combobox-menu a:hover { background: hsl(var(--secondary)); color: hsl(var(--primary)); }

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

.mobile-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: transparent; border: 0;
  color: hsl(var(--foreground));
}
.mobile-drawer {
  display: none; position: fixed; inset: 0; z-index: 100;
  background: hsl(var(--background));
}
.mobile-drawer.open { display: block; }
.mobile-drawer .drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.5rem; border-bottom: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.mobile-drawer nav { display: flex; flex-direction: column; padding: 1rem; gap: 0.25rem; background: hsl(var(--card));border-bottom: 1px solid hsl(var(--border));}
.mobile-drawer nav a {
  padding: 0.625rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: hsl(var(--muted-foreground)); border-radius: 0.375rem;
}
.mobile-drawer nav a:hover { background: hsl(var(--secondary)); color: hsl(var(--foreground)); }
.mobile-drawer .group-label {
  padding: 1rem 0.75rem 0.25rem;
  font-family: var(--font-mono); font-size: 0.625rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: hsl(var(--muted-foreground) / 0.6);
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3, h4 { margin: 0; line-height: 1.2; font-weight: 700; }
h1 { font-size: 2rem; letter-spacing: -0.02em; }
@media (min-width: 768px) { h1 { font-size: 2.5rem; } }
h2 { font-size: 1.25rem; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: hsl(var(--primary));
}
.muted { color: hsl(var(--muted-foreground)); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.leading-relaxed { line-height: 1.625; }

/* ============================================================
   Hero
   ============================================================ */
.hero { text-align: center; padding: 5rem 0; }
@media (min-width: 768px) { .hero { padding: 6rem 0; } }
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.05; }
@media (min-width: 768px) { .hero h1 { font-size: 4rem; } }
@media (min-width: 1024px) { .hero h1 { font-size: 4.5rem; } }
.hero .accent { color: hsl(var(--primary)); }
.hero p {
  margin: 2rem auto 0; max-width: 640px;
  color: hsl(var(--muted-foreground));
  font-size: 1rem; line-height: 1.7;
}
@media (min-width: 768px) { .hero p { font-size: 1.125rem; } }
.hero-actions { margin-top: 3rem; display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; }
.trust-bar {
  margin-top: 4rem; display: flex; justify-content: center;
  gap: 1.8rem; flex-wrap: wrap; opacity: 0.4;
}
.trust-bar span {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: hsl(var(--muted-foreground));
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.625rem 1.25rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 0.375rem; border: 1px solid transparent;
  transition: all .2s; font-weight: 600;
}
.btn-hero {
  background: hsl(var(--primary)); color: hsl(var(--primary-foreground));
  padding: 0.875rem 1.5rem;
}
.btn-hero:hover { box-shadow: var(--glow-primary); }
.btn-hero:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-ghost {
  background: transparent; color: hsl(var(--foreground));
  border-color: hsl(var(--border));
}
.btn-ghost:hover { border-color: hsl(var(--primary) / 0.5); color: hsl(var(--primary)); }
.btn-calc {
  background: transparent; color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.4);
  width: 100%;
}
.btn-calc:hover { background: hsl(var(--primary) / 0.1); }
.btn-w { width: 100%; }

/* ============================================================
   Cards / Glass
   ============================================================ */
.glass {
  background: hsl(var(--card) / 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid hsl(var(--card-border));
  padding: 1.5rem;
}
@media (min-width: 768px) { .glass { padding: 2rem; } }

/* ============================================================
   Suite grid
   ============================================================ */
.suite { padding: 3rem 1.5rem; }
.suite-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 2.5rem; }
.suite-head p.title { font-size: 1.875rem; font-weight: 700; margin: 0.5rem 0 0; }
@media (min-width: 768px) { .suite-head p.title { font-size: 2.25rem; } }
.suite-head > span { letter-spacing: 0.1em; }
.suite-grid {
  display: grid; grid-template-columns: 1fr;
  border: 1px solid hsl(var(--card-border));
}
@media (min-width: 640px) { .suite-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .suite-grid { grid-template-columns: repeat(4, 1fr); } }
.calc-card {
  border: 1px solid hsl(var(--card-border));
  background: hsl(var(--card));
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: all .3s;
}
.calc-card:hover {
  border-color: hsl(var(--primary) / 0.6);
  box-shadow: var(--glow-primary);
}
.calc-card .icon-row { display: flex; justify-content: space-between; align-items: flex-start; }
.calc-card .icon-row .num { font-family: var(--font-mono); font-size: 0.75rem; color: hsl(var(--muted-foreground) / 0.4); }
.calc-card h3 { font-size: 0.875rem; font-weight: 600; letter-spacing: 0.02em; }
.calc-card p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin: 0.5rem 0 0; line-height: 1.625; flex: 1; }
.calc-card .icon { color: hsl(var(--primary)); width: 24px; height: 24px; }

/* ============================================================
   Pillars (Why Longevity)
   ============================================================ */
.pillars { padding: 3.5rem 1.5rem; }
.pillars-grid {
  display: grid; grid-template-columns: 1fr;
  border: 1px solid hsl(var(--card-border));
}
@media (min-width: 768px) { .pillars-grid { grid-template-columns: repeat(3, 1fr); } }
.pillar {
  border: 1px solid hsl(var(--card-border)); background: hsl(var(--card));
  padding: 1.5rem; transition: all .3s;
}
.pillar:hover { border-color: hsl(var(--primary) / 0.6); box-shadow: var(--glow-primary); }
.pillar .icon { color: hsl(var(--primary)); }
.pillar-title { margin-top: 0.5rem; font-size: 0.875rem; }
.pillars-intro { max-width: 48rem; margin-bottom: 2rem; }

/* ============================================================
   Manifesto
   ============================================================ */
.manifesto {
  border-top: 1px solid hsl(var(--card-border));
  background: hsl(var(--secondary) / 0.2);
}
.manifesto .row {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 1rem; padding: 1.5rem;
}
.accent-bold { color: hsl(var(--primary)); font-weight: 600; }
.system-status { color: hsl(var(--primary) / 0.6); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid hsl(var(--border));
  background: hsl(var(--background));
}
.site-footer .inner { text-align: center; padding: 3rem 1.5rem; }
.site-footer h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.site-footer h3 .accent { color: hsl(var(--primary)); }
.site-footer .links {
  display: flex; justify-content: center; gap: 1.5rem;
  margin-top: 1rem; flex-wrap: wrap;
}
.site-footer .links a {
  font-family: var(--font-mono); font-size: 0.625rem;
  color: hsl(var(--muted-foreground) / 0.6);
}
.site-footer .links a:hover { color: hsl(var(--primary)); }
.footer-status    { color: hsl(var(--primary)); }
.footer-disclaimer { max-width: 640px; margin: 1rem auto 0; }
.footer-disclaimer p + p { margin-top: 0.5rem; }
.footer-credit    { line-height: 1.625; }
.footer-link      { color: hsl(var(--primary)); }
.footer-copy      { margin-top: 1rem; }

/* ============================================================
   Calculator pages — layout
   ============================================================ */
.calc-page { padding: 2.5rem 1.5rem; max-width: 800px; margin: 0 auto; }
.calc-page > * + * { margin-top: 2rem; }
.back-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.875rem; color: hsl(var(--muted-foreground));
}
.back-link:hover { color: hsl(var(--primary)); }
.calc-subtitle    { margin-top: 0.5rem; }
.calc-submit      { margin-top: 1.5rem; }
.calc-hint-link   { font-size: 0.75rem; color: hsl(var(--accent)); margin-top: 0.25rem; display: inline-block; }
.calc-hint-link:hover { color: hsl(var(--primary)); }
.calc-field-hint  { margin-top: 0.25rem; }

/* ============================================================
   Form
   ============================================================ */
.field { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 1.25rem; }
.label { font-size: 0.875rem; font-weight: 500; }
.label .hint { color: hsl(var(--muted-foreground)); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 400; }
.label-between { display: flex; justify-content: space-between; align-items: center; }
.input {
  width: 100%; padding: 0.625rem 0.875rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  color: hsl(var(--foreground));
  font-family: var(--font-mono);
  font-size: 0.875rem;
  border-radius: 0.375rem;
}
.input:focus { outline: 2px solid hsl(var(--primary) / 0.5); outline-offset: 1px; }
.input.invalid { border-color: hsl(var(--destructive)); }
.input:disabled { opacity: 0.4; }
.error {
  color: hsl(var(--destructive));
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-top: 2px;
  line-height: 1.2;
  margin-bottom: 0;
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs { display: inline-flex; padding: 0.25rem; background: hsl(var(--secondary)); border-radius: 0.375rem; }
.tabs.full { display: flex; width: 100%; }
.tabs button {
  flex: 1; padding: 0.5rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  background: transparent; border: 0; border-radius: 0.25rem;
  color: hsl(var(--muted-foreground));
}
.tabs button.active { background: hsl(var(--background)); color: hsl(var(--foreground)); }

/* ============================================================
   Loading bar
   ============================================================ */
.loader {
  background: hsl(var(--card) / 0.6);
  border: 1px solid hsl(var(--card-border));
  padding: 1.5rem; text-align: center;
}
.loader .label-text {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: hsl(var(--primary));
  animation: pulse-glow 2s ease-in-out infinite;
}
.loader .bar {
  margin-top: 1rem; height: 4px;
  background: hsl(var(--secondary)); border-radius: 9999px; overflow: hidden;
}
.loader .bar > div {
  height: 100%; background: hsl(var(--primary));
  animation: analyzing 2s ease-in-out forwards;
}
.loader, .result { scroll-margin-top: 100px; transition: opacity 0.3s ease-in-out; }

/* ============================================================
   Result
   ============================================================ */
.result { margin-top: 1.5rem; animation: result-appear 0.5s ease-out forwards; }
.result > * + * { margin-top: 1.5rem; }
.result-main {
  text-align: center; padding: 2rem;
  background: hsl(var(--card) / 0.6);
  border: 1px solid hsl(var(--card-border));
}
.result-main .score {
  font-family: var(--font-mono); font-size: 4rem;
  font-weight: 700; color: hsl(var(--primary));
  margin: 1rem 0 0.5rem; line-height: 1;
}
@media (min-width: 768px) { .result-main .score { font-size: 5rem; } }
.badge {
  display: inline-block; padding: 0.25rem 0.75rem;
  font-family: var(--font-mono); font-size: 0.75rem;
  border: 1px solid hsl(var(--accent));
  color: hsl(var(--accent)); border-radius: 9999px;
}
.result-badge  { margin-top: 0.5rem; }
.result-label  { letter-spacing: 0.2em; text-transform: uppercase; }
.result-value  { font-size: 1.5rem; font-weight: 700; margin-top: 0.5rem; }
.result-accent { color: hsl(var(--accent)); font-weight: 700; }

.gauge { margin: 1rem auto 0; max-width: 28rem; }
.gauge .track { height: 12px; background: hsl(var(--secondary)); border-radius: 9999px; overflow: hidden; }
.gauge .fill {
  height: 100%;
  background: linear-gradient(to right, hsl(var(--accent)), hsl(var(--primary)));
  border-radius: 9999px; transition: width 1s ease-out;
}
.gauge .legend { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 0.625rem; color: hsl(var(--muted-foreground)); margin-top: 0.5rem; }

.result-grid { display: grid; grid-template-columns: 1fr; border: 1px solid hsl(var(--card-border)); }
@media (min-width: 768px) {
  .result-grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .result-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
}
.result-grid > div { padding: 1.5rem; border-bottom: 1px solid hsl(var(--card-border)); }
.result-grid > div:last-child { border-bottom: 0; }
@media (min-width: 768px) {
  .result-grid > div { border-bottom: 0; border-right: 1px solid hsl(var(--card-border)); }
  .result-grid > div:last-child { border-right: 0; }
}

/* ============================================================
   Methodology / Article
   ============================================================ */
.methodology { padding: 2rem; border: 1px solid hsl(var(--card-border)); background: hsl(var(--card) / 0.6); }
.methodology h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--primary)); }
.methodology .formula {
  background: hsl(var(--secondary) / 0.5);
  border: 1px solid hsl(var(--border));
  padding: 1rem; overflow-wrap: break-word;
  margin-top: 1rem;
}
.methodology .formula code {
  font-family: var(--font-mono); font-size: 0.8125rem;
  white-space: pre-wrap; word-break: break-all;
  color: hsl(var(--foreground));
}
.methodology ul { padding-left: 0; list-style: none; font-family: var(--font-mono); font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.75rem; }
.methodology ul li { margin-top: 0.25rem; }
.methodology .var-symbol { color: hsl(var(--primary)); }
.methodology .refs { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid hsl(var(--border)); }
.methodology .refs ol { padding-left: 0; list-style: none; counter-reset: ref; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.methodology .refs li { counter-increment: ref; margin-top: 0.5rem; line-height: 1.625; }
.methodology .refs li::before { content: "[" counter(ref) "]"; color: hsl(var(--primary)); font-family: var(--font-mono); margin-right: 0.375rem; }
.ref-source { color: hsl(var(--muted-foreground) / 0.7); }

article.seo { padding: 2rem; border: 1px solid hsl(var(--card-border)); background: hsl(var(--card) / 0.6); }
article.seo h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--primary)); margin-bottom: 1rem; }
article.seo p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); line-height: 1.625; margin: 0 0 1rem; }
article.seo strong { color: hsl(var(--foreground)); }

/* ============================================================
   FAQ
   ============================================================ */
.faq { padding: 2rem; background: hsl(var(--card) / 0.6); border: 1px solid hsl(var(--card-border)); }
.faq h2 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--primary)); margin-bottom: 1rem; }
.faq-item { border-bottom: 1px solid hsl(var(--card-border)); }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: 1rem 0; font-size: 0.875rem; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: hsl(var(--primary)); }
.faq-item summary::after {
  content: "+"; color: hsl(var(--primary));
  font-family: var(--font-mono); font-size: 1.25rem;
  transition: transform .2s;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .answer { padding: 0 0 1rem; font-size: 0.875rem; color: hsl(var(--muted-foreground)); line-height: 1.625; }
.faq-wrapper { padding: 4rem 0; }

/* ============================================================
   Animations
   ============================================================ */
@keyframes pulse-glow { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes analyzing { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes result-appear {
  0% { opacity: 0; transform: scale(0.96) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Remove number input spinners */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; }

/* ============================================================
   Utilities
   ============================================================ */
.hidden { display: none !important; }
.flex { display: flex; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 0.75rem; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.text-foreground { color: hsl(var(--foreground)); }

/* ============================================================
   Choice cards
   ============================================================ */
.choice {
  text-align: left; padding: 1rem;
  border: 1px solid hsl(var(--card-border));
  background: hsl(var(--background));
  color: hsl(var(--muted-foreground));
  border-radius: 0.5rem; transition: all .2s;
  font-family: inherit;
}
.choice:hover { border-color: hsl(var(--muted-foreground) / 0.4); }
.choice.active {
  border-color: hsl(var(--primary));
  background: hsl(var(--primary) / 0.1);
  color: hsl(var(--foreground));
}
.choice .name { font-weight: 600; font-size: 0.875rem; }
.choice .sub { font-size: 0.75rem; opacity: 0.7; margin-top: 0.125rem; }
.choice .meta { font-family: var(--font-mono); font-size: 0.75rem; color: hsl(var(--primary)); margin-top: 0.25rem; }
.choice-grid { margin-top: 0.5rem; }

/* ============================================================
   Affiliate
   ============================================================ */
.affiliate { padding: 1.5rem; border: 1px solid hsl(var(--primary) / 0.3); background: hsl(var(--card) / 0.6); }
.affiliate h3 { font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: hsl(var(--primary)); margin-bottom: 0.75rem; }
.affiliate p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); line-height: 1.625; margin: 0 0 0.75rem; }
.affiliate .placeholder {
  border: 1px dashed hsl(var(--muted-foreground) / 0.2);
  padding: 1rem; text-align: center; margin-top: 0.75rem;
  font-family: var(--font-mono); font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
}

/* ============================================================
   Sleep Log Grid
   ============================================================ */
.day-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 0.5rem; width: 100%;
}
.day-cell {
  background: hsl(var(--card) / 0.6);
  border: 1px solid hsl(var(--card-border));
  padding: 0.75rem 0.5rem;
  display: flex; flex-direction: column;
  align-items: center; gap: 0.5rem; min-width: 0;
}
.day-cell label { font-family: var(--font-mono); font-size: 0.65rem; color: hsl(var(--muted-foreground)); text-transform: uppercase; }
.day-cell input.input { width: 100%; padding: 0.25rem; text-align: center; font-size: 0.875rem; height: 32px; }

/* ============================================================
   Sliders
   ============================================================ */
.slider-row { display: flex; align-items: center; gap: 1rem; }
.slider-row input[type="range"] { flex: 1; accent-color: hsl(var(--primary)); }

input[type="range"]#sleep-quality {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px; outline: none; margin: 1rem 0;
  background-image: linear-gradient(hsl(var(--primary)), hsl(var(--primary)));
  background-size: 60% 100%; background-repeat: no-repeat;
}
input[type="range"]#sleep-quality::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px;
  background: hsl(var(--primary)); border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 10px hsl(var(--primary) / 0.4); transition: transform 0.1s ease;
}
input[type="range"]#sleep-quality::-moz-range-thumb {
  width: 20px; height: 20px;
  background: hsl(var(--primary)); border: none;
  border-radius: 50%; cursor: pointer;
  box-shadow: 0 0 10px hsl(var(--primary) / 0.4);
}
input[type="range"]#sleep-quality::-webkit-slider-thumb:hover { transform: scale(1.15); }

/* ============================================================
   Bio-Age — stepper and navigation
   ============================================================ */
.bio-stepper { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.bio-stepper .btn-ghost.active {
  background: hsl(var(--primary) / 0.15);
  color: hsl(var(--primary));
  border-color: hsl(var(--primary) / 0.5);
}
.bio-nav { display: flex; gap: 0.75rem; margin-top: 1.5rem; }
.bio-nav-primary { flex: 1; }
.bio-delta { margin-top: 0.5rem; font-weight: 700; }

/* ============================================================
   Policy pages
   ============================================================ */
.policy-section-heading { color: hsl(var(--primary)); font-size: 1.125rem; }
.policy-highlight { border-color: hsl(var(--primary) / 0.3); background: hsl(var(--primary) / 0.05); }
.policy-footer { border-top: 1px solid hsl(var(--border)); padding-top: 1.5rem; margin-top: 1.5rem; }

/* ============================================================
   About page
   ============================================================ */
.about-intro { margin-top: 1.5rem; }
.about-heading { font-size: 2.5rem; }
.about-lead { font-size: 1.0625rem; margin-top: 0.75rem; }
.about-section-body { margin-top: 0.75rem; }
.about-pillars { margin-top: 1.5rem; }
.about-refs { list-style: none; padding: 0; margin-top: 0.75rem; line-height: 1.7; }
.about-refs li { margin-top: 0.25rem; }
.ref-label { color: hsl(var(--primary)); }
.about-audience { margin-top: 0.5rem; padding-left: 1.5rem; }
.about-editorial { border-color: hsl(var(--primary) / 0.3); }
.about-author { display: flex; gap: 1.25rem; align-items: flex-start; margin-top: 1rem; flex-wrap: wrap; }
.about-avatar {
  flex-shrink: 0; width: 80px; height: 80px;
  border: 1px solid hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.05);
  display: flex; align-items: center; justify-content: center;
}
.about-avatar-initials { font-size: 1.5rem; color: hsl(var(--primary)); }
.about-author-body { flex: 1; min-width: 200px; }
.about-author-name { font-size: 1.125rem; }
.about-author-role { color: hsl(var(--accent)); letter-spacing: 0.15em; text-transform: uppercase; margin-top: 0.25rem; }
.about-contact { margin-top: 0.25rem; }
.about-contact:first-of-type { margin-top: 0.75rem; }
.about-standards { border-color: hsl(var(--accent) / 0.3); }
.about-standards-heading { color: hsl(var(--accent)); }
.about-cta-link { text-align: center; margin-top: 1rem; }
.about-cta-text { letter-spacing: 0.15em; }

/* ============================================================
   Calculator result shared
   ============================================================ */
.tdee-list { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.tdee-row { display: flex; justify-content: space-between; }

/* ============================================================
   HR Zones — result panels
   ============================================================ */
.hrz-z2-panel { border: 2px solid hsl(var(--primary) / 0.4); background: hsl(var(--primary) / 0.05); }
.hrz-z2-eyebrow { color: hsl(var(--primary)); }
.hrz-z2-value { margin-top: 0.5rem; }
.hrz-z2-bpm { font-size: 3rem; font-weight: 700; color: hsl(var(--primary)); }
.hrz-z2-desc { margin-top: 0.75rem; }
.hrz-zones-panel { padding: 0; }
.hrz-zones-header { padding: 1rem; border-bottom: 1px solid hsl(var(--card-border)); }
.hrz-zones-title { color: hsl(var(--primary)); }
.hrz-estimate-label {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.75rem; color: hsl(var(--muted-foreground));
  margin-top: 0.5rem; cursor: pointer;
}
.hrz-row { display: flex; align-items: center; gap: 1rem; padding: 1rem; border-bottom: 1px solid hsl(var(--card-border)); }
.hrz-row--highlight { background: hsl(var(--primary) / 0.05); }
.hrz-bar { width: 6px; height: 40px; border-radius: 4px; flex-shrink: 0; }
.hrz-info { flex: 1; }
.hrz-label { font-family: var(--font-mono); font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.hrz-desc { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; }
.hrz-value { text-align: right; }
.hrz-bpm { display: block; font-family: var(--font-mono); font-size: 1.125rem; font-weight: 700; }
.hrz-unit { display: block; font-family: var(--font-mono); font-size: 0.625rem; color: hsl(var(--muted-foreground)); }

/* ============================================================
   Electrolytes — mineral stack table
   ============================================================ */
.elec-stack-heading {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: hsl(var(--primary)); letter-spacing: 0.2em;
  text-transform: uppercase; margin-bottom: 1rem;
}
.elec-table { width: 100%; border-collapse: collapse; }
.elec-thead-row { text-align: left; }
.elec-th { font-family: var(--font-mono); font-size: 0.75rem; color: hsl(var(--muted-foreground)); padding: 0.5rem 0; font-weight: 400; }
.elec-th--right { text-align: right; }
.elec-tr { border-top: 1px solid hsl(var(--border)); }
.elec-td { padding: 0.5rem 0; font-family: var(--font-mono); font-size: 0.875rem; }
.elec-td--value { text-align: right; color: hsl(var(--primary)); font-weight: 700; }
.elec-td--fn { text-align: right; font-size: 0.75rem; color: hsl(var(--muted-foreground)); }
.elec-cramp-alert { padding: 1.25rem; border: 1px solid rgba(251, 146, 60, 0.3); background: rgba(251, 146, 60, 0.05); }
.elec-cramp-heading { font-family: var(--font-mono); font-size: 0.875rem; font-weight: 700; color: #fb923c; }
.elec-cramp-body { margin-top: 0.25rem; }

/* ============================================================
   Protein — meal distribution grid
   ============================================================ */
.protein-meal-cell { text-align: center; padding: 1rem; border: 1px solid hsl(var(--card-border)); }
.protein-meal-value { font-size: 1.5rem; font-weight: 700; color: hsl(var(--accent)); }
.protein-meal-freq { color: hsl(var(--primary)); }
.protein-leucine-note { margin-top: 1rem; }

/* ============================================================
   Sleep Debt — result panel
   ============================================================ */
.sleep-input-narrow { max-width: 200px; }
.sleep-flags { margin-top: 0.75rem; }
.sleep-recovery-value { font-size: 1.5rem; font-weight: 700; color: hsl(var(--primary)); text-align: center; margin-top: 0.5rem; }
.sleep-stat-row { display: flex; justify-content: space-between; font-size: 0.875rem; margin-top: 0.5rem; }
.sleep-stat-accent { color: hsl(var(--primary)); }
.sleep-flag { margin-right: 0.5rem; }
.sleep-flag--warning { border-color: #f59e0b; color: #fbbf24; background: rgba(245, 158, 11, 0.1); }
.sleep-flag--danger  { border-color: #fb923c; color: #fb923c; background: rgba(251, 146, 60, 0.1); }
/* ============================================================
   Blog — home preview grid
   ============================================================ */
.blog-section { padding: 3.5rem 1.5rem; }
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: hsl(var(--card-border));
  border: 1px solid hsl(var(--card-border));
}
@media (min-width: 640px)  { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card {
  background: hsl(var(--card));
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  transition: background .2s;
}
.blog-card:hover { background: hsl(var(--secondary) / 0.5); }
.blog-card-meta { display: flex; align-items: center; gap: 0.75rem; }
.blog-card-tag {
  font-family: var(--font-mono); font-size: 0.625rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: hsl(var(--primary));
  border: 1px solid hsl(var(--primary) / 0.3);
  padding: 0.125rem 0.5rem;
}
.blog-card-date {
  font-family: var(--font-mono); font-size: 0.625rem;
  color: hsl(var(--muted-foreground) / 0.6);
}
.blog-card h3 {
  font-size: 0.9375rem; font-weight: 700;
  line-height: 1.35; letter-spacing: -0.01em;
}
.blog-card p {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.6; flex: 1;
  margin: 0;
}
.blog-card-link {
  font-family: var(--font-mono); font-size: 0.625rem;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: hsl(var(--accent)); margin-top: auto;
}
.blog-card:hover .blog-card-link { color: hsl(var(--primary)); }

/* ============================================================
   Blog — article page
   ============================================================ */
.blog-page { padding: 2.5rem 1.5rem; }
.blog-page > * + * { margin-top: 2rem; }

.blog-hero { border-bottom: 1px solid hsl(var(--border)); padding-bottom: 2rem; }
.blog-hero-meta {
  display: flex; align-items: center; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.blog-hero h1 {
  font-size: 2rem; font-weight: 800;
  line-height: 1.1; letter-spacing: -0.02em;
}
@media (min-width: 768px) { .blog-hero h1 { font-size: 2.5rem; } }
.blog-hero-lead {
  font-size: 1.0625rem;
  color: hsl(var(--muted-foreground));
  line-height: 1.65; margin-top: 1rem; max-width: 640px;
}
.blog-author-row {
  display: flex; align-items: center; gap: 0.75rem;
  margin-top: 1.5rem; padding-top: 1.5rem;
  border-top: 1px solid hsl(var(--border));
}
.blog-author-avatar {
  width: 40px; height: 40px; flex-shrink: 0;
  border: 1px solid hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.05);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.75rem;
  color: hsl(var(--primary));
}
.blog-author-name { font-size: 0.875rem; font-weight: 600; }
.blog-author-role {
  font-family: var(--font-mono); font-size: 0.625rem;
  color: hsl(var(--muted-foreground));
  letter-spacing: 0.1em; text-transform: uppercase;
}

/* Article body */
.blog-body { line-height: 1.75; }
.blog-body h2 { font-size: 1.25rem; font-weight: 700; margin: 2rem 0 0.75rem; }
.blog-body h3 { font-size: 1rem; font-weight: 600; margin: 1.5rem 0 0.5rem; }
.blog-body p { font-size: 0.9375rem; color: hsl(var(--muted-foreground)); margin: 0 0 1rem; }
.blog-body strong { color: hsl(var(--foreground)); }
.blog-body ul, .blog-body ol {
  padding-left: 1.5rem; color: hsl(var(--muted-foreground));
  font-size: 0.9375rem; margin: 0 0 1rem;
}
.blog-body li { margin-top: 0.375rem; line-height: 1.65; }
.blog-body blockquote {
  border-left: 3px solid hsl(var(--primary));
  padding: 0.75rem 1.25rem;
  background: hsl(var(--primary) / 0.05);
  margin: 1.5rem 0;
  font-size: 0.9375rem; color: hsl(var(--muted-foreground)); line-height: 1.65;
}
.blog-body .blog-ref {
  font-family: var(--font-mono); font-size: 0.75rem;
  color: hsl(var(--muted-foreground) / 0.6);
  border-top: 1px solid hsl(var(--border));
  padding-top: 1rem; margin-top: 2rem;
}
.blog-body .blog-ref ol {
  list-style: none; padding: 0; counter-reset: bref;
  font-size: 0.75rem; margin: 0.5rem 0 0;
}
.blog-body .blog-ref li { counter-increment: bref; margin-top: 0.375rem; line-height: 1.5; }
.blog-body .blog-ref li::before {
  content: "[" counter(bref) "]";
  color: hsl(var(--primary)); margin-right: 0.375rem;
}

/* CTA box inside article */
.blog-cta {
  padding: 1.5rem;
  border: 1px solid hsl(var(--primary) / 0.4);
  background: hsl(var(--primary) / 0.05);
  margin: 2rem 0;
}
.blog-cta p { font-size: 0.875rem; color: hsl(var(--muted-foreground)); margin: 0 0 1rem; }

/* Related articles strip */
.blog-related { border-top: 1px solid hsl(var(--border)); padding-top: 2rem; margin-top: 2rem; }
.blog-related-heading {
  font-family: var(--font-mono); font-size: 0.75rem;
  letter-spacing: 0.2em; text-transform: uppercase;
  color: hsl(var(--primary)); margin-bottom: 1rem;
}
.blog-related-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .blog-related-grid { grid-template-columns: repeat(2, 1fr); } }
.blog-related-card { padding: 1rem; border: 1px solid hsl(var(--card-border)); background: hsl(var(--card)); }
.blog-related-card h4 { font-size: 0.875rem; font-weight: 600; line-height: 1.35; }
.blog-related-card p { font-size: 0.75rem; color: hsl(var(--muted-foreground)); margin-top: 0.25rem; line-height: 1.5; }
.blog-related-card a {
  font-family: var(--font-mono); font-size: 0.625rem;
  color: hsl(var(--accent)); letter-spacing: 0.1em;
  text-transform: uppercase; margin-top: 0.5rem; display: inline-block;
}
