/* Shared styles for the generated content pages (biomarkers, guide).
   Tokens and header/footer match the inline CSS in index.html; keep them in
   sync when changing either. */
:root {
  --ink: #0f1d27;
  --ink-2: #334552;
  --muted: #5b6b77;
  --primary: #00658d;
  --primary-strong: #004e6d;
  --accent: #1fb3f0;
  --accent-soft: #e6f6fd;
  --surface: #f6f9fc;
  --card: #ffffff;
  --line: #dfe7ee;
  --warn: #a34d00;
  --warn-soft: #fff1e0;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(15, 29, 39, 0.04), 0 12px 32px rgba(0, 101, 141, 0.08);
  --font: "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}
img,
svg {
  display: block;
  max-width: 100%;
}
a {
  color: var(--primary);
}
h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: var(--card);
  padding: 8px 14px;
  border-radius: 8px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-strong);
}
.btn-sm {
  min-height: 40px;
  padding: 8px 18px;
  font-size: 15px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 249, 252, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: none;
  gap: 28px;
}
.site-nav a {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--primary);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.login-link {
  color: var(--ink-2);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 8px 10px;
}
@media (min-width: 900px) {
  .site-nav {
    display: flex;
  }
}

/* Page layout */
.page {
  padding: 32px 0 80px;
}
.crumbs {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}
.crumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.crumbs li + li::before {
  content: "›";
  margin-right: 6px;
}
.crumbs a {
  color: var(--muted);
}
.article {
  max-width: 760px;
}
.article h1 {
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 800;
}
.lede {
  margin: 18px 0 0;
  font-size: 19px;
  color: var(--ink-2);
}
.article h2 {
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 800;
  margin: 48px 0 12px;
}
.article h3 {
  font-size: 19px;
  margin: 28px 0 8px;
}
.article p,
.article li {
  color: var(--ink-2);
}
.article p {
  margin: 0 0 14px;
}
.article ul,
.article ol {
  padding-left: 22px;
  margin: 0 0 14px;
}
.article li {
  margin-bottom: 6px;
}
.meta {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}

.facts {
  display: grid;
  gap: 1px;
  margin: 28px 0 0;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}
@media (min-width: 640px) {
  .facts {
    grid-template-columns: repeat(2, 1fr);
  }
}
.facts div {
  background: var(--card);
  padding: 14px 18px;
}
.facts dt {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.facts dd {
  margin: 2px 0 0;
  font-weight: 600;
}

.table-wrap {
  overflow-x: auto;
  margin: 8px 0 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tr:last-child td {
  border-bottom: 0;
}
th {
  background: var(--surface);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.cta-box {
  margin: 48px 0 0;
  padding: 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, #0088bd 100%);
  color: #fff;
}
.cta-box h2 {
  margin: 0 0 8px;
  color: #fff;
}
.cta-box p {
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 20px;
}
.cta-box .btn {
  background: #fff;
  color: var(--primary-strong);
}

.related {
  display: grid;
  gap: 12px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) {
  .related {
    grid-template-columns: repeat(3, 1fr);
  }
}
.related a {
  display: block;
  height: 100%;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-decoration: none;
  font-weight: 700;
  color: var(--ink);
}
.related a:hover {
  border-color: var(--primary);
}
.article .related li {
  margin: 0;
}

.disclaimer {
  margin-top: 40px;
  padding: 16px 18px;
  border-radius: 16px;
  background: var(--warn-soft);
  font-size: 15px;
  color: var(--ink-2);
}
.sources {
  font-size: 15px;
}

/* Biomarker index */
.group {
  margin-top: 40px;
}
.group h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 14px;
}
.cards {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 700px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1020px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}
.cards a {
  display: block;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-decoration: none;
}
.cards a:hover {
  border-color: var(--primary);
}
.cards strong {
  display: block;
  color: var(--ink);
  font-size: 17px;
}
.cards span {
  display: block;
  margin-top: 4px;
  font-size: 15px;
  color: var(--muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 44px;
  font-size: 15px;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--primary);
}

/* Topic pages */
@media (min-width: 700px) {
  .cards-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 1020px) {
  .cards-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
.article .cards li {
  margin: 0;
}
.meta .btn {
  margin-top: 10px;
}

/* Unit converter */
.converter {
  margin: 28px 0 8px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
  flex: 1;
}
.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}
.field label {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-2);
}
.field select,
.field input {
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font: inherit;
  color: var(--ink);
}
.converter .table-wrap {
  margin-bottom: 0;
}
