/* ═══════════════════════════════════════
   AnalyzAI — Biomarker reference pages (article body)
   ═══════════════════════════════════════

   Scope: the article body only. Header/footer live in site-chrome.css.
   Tokens come from brand.css; buttons and base table styles from components.css.

   Constraints: mobile-first, lightweight, no animation. There will eventually be
   hundreds of these pages and the traffic is mostly mobile search.
   ═══════════════════════════════════════ */

/* --- RESET (landing_final.css carries its own; these pages don't load it) --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background: var(--bg-page);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* --- Layout --- */

.bm-main {
  /* Readable measure for prose; the norms table can use the full width. */
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

/* --- Breadcrumb --- */

.bm-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  line-height: 20px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.bm-crumbs a {
  color: var(--color-link);
  text-decoration: none;
}

.bm-crumbs a:hover {
  text-decoration: underline;
}

.bm-crumbs__sep {
  color: var(--text-tertiary);
}

/* --- Headings & prose --- */

.bm-title {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.bm-intro {
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-primary);
}

.bm-h2 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  margin: 40px 0 12px;
  padding-top: 8px;
}

.bm-p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
}

.bm-p + .bm-p {
  margin-top: 12px;
}

/* --- Norms table --- */

.bm-table-wrap {
  /* Narrow phones: let the table scroll rather than push the page sideways. */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.bm-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.bm-table th {
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-divider);
  white-space: nowrap;
}

.bm-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-divider);
  color: var(--text-primary);
}

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

.bm-table__norm {
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
}

.bm-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-top: 10px;
}

/* --- Related markers --- */

.bm-related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin-top: 12px;
}

.bm-related__link {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-link);
  background: var(--bg-card);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-pill);
  text-decoration: none;
}

.bm-related__link:hover {
  background: var(--bg-section);
  border-color: var(--color-primary);
}

/* --- FAQ --- */

.bm-faq {
  margin-top: 12px;
}

.bm-faq__item {
  padding: 16px 0;
  border-bottom: 1px solid var(--color-divider);
}

.bm-faq__item:last-child {
  border-bottom: none;
}

.bm-faq__q {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 6px;
}

.bm-faq__a {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* --- CTA --- */

.bm-cta {
  margin-top: 40px;
  padding: 28px 24px;
  background: var(--bg-section);
  border-radius: var(--radius-lg);
  text-align: center;
}

.bm-cta__text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Mirrors the landing's "Загрузить анализы бесплатно" button (.btn-hero-cta,
   landing_final.css:220) — the same gradient CTA on a light section. Copied for
   the same reason as site-chrome.css: that rule lives only in landing_final.css.
   components.css .btn-primary was the wrong match — it is flat indigo, not the
   brand gradient. */
.bm-cta__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  background: linear-gradient(-56deg, #6366F1 0%, #4A90D9 100%);
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 16px;
  line-height: 21px;
  letter-spacing: 0.08px;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s;
}

.bm-cta__btn:hover {
  opacity: 0.9;
}

.bm-cta__btn:active {
  opacity: 1;
}

/* --- Page meta + disclaimer --- */

.bm-meta {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--color-divider);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-tertiary);
}

.bm-disclaimer {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-card);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 20px;
  color: var(--text-secondary);
}

/* --- Index (hub) page --- */

.bm-index__intro {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.bm-cat {
  margin-top: 32px;
}

.bm-cat__title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.bm-cat__list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bm-cat__link {
  display: block;
  padding: 12px 16px;
  font-size: 15px;
  color: var(--color-link);
  background: var(--bg-card);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-md);
  text-decoration: none;
}

.bm-cat__link:hover {
  background: var(--bg-section);
  border-color: var(--color-primary);
}

.bm-empty {
  font-size: 15px;
  color: var(--text-secondary);
  margin-top: 24px;
}

/* --- Desktop --- */

@media (min-width: 769px) {
  .bm-main {
    padding: 32px 24px 80px;
  }

  .bm-title {
    font-size: 38px;
  }

  .bm-h2 {
    font-size: 24px;
  }
}
