/* ============================================================================
   page-peptides.css — page-unique bits for the Peptides index + research-note
   article. The Aurora design system (.pagehead, .toolbar, .search, .chips,
   .idx-row, .crumbs, .article-head, .article-grid, .prose, .rail*, .callout,
   .ptable, .pullquote …) already lives in aurora.css. This file only:
     1. bridges the AUTHORED markdown body structure (.content-section,
        .research-list, .params-table, .bibliography, .related-links, in-body
        .price-cta / .disclaimer) onto the .prose editorial look, so we never
        have to rewrite the ppl-write-page content; and
     2. styles the quick-reference grid built from `stats`.
   ============================================================================ */

/* ---- Index: keep the per-mg range tidy when a row has no high ------------- */
.idx-row .range .hi { margin-left: 2px; }

/* ===========================================================================
   ARTICLE BODY — the markdown {{ content }} lives inside .prose but is authored
   as <section class="content-section"> blocks. Extend the prose treatment to
   those nested elements (aurora's `.prose > p` only reaches direct children).
   =========================================================================== */

.prose .content-section { margin: 0; }
.prose .content-section + .content-section { margin-top: 8px; }

/* Body paragraphs inside authored sections */
.prose .content-section p,
.prose .price-cta .price-note {
  font-family: var(--serif);
  font-size: 18.5px;
  line-height: 1.68;
  color: var(--ink);
  text-wrap: pretty;
}
.prose .content-section p + p { margin-top: 22px; }

/* Section headings authored inside .content-section already inherit .prose h2,
   but add the mono section marker rhythm and top spacing. */
.prose .content-section h2 { margin-top: 44px; }
.prose .content-section:first-child h2 { margin-top: 8px; }

/* Inline citation superscripts [1] */
.prose .cite {
  font-family: var(--mono);
  font-size: 0.62em;
  font-weight: 500;
  color: var(--accent);
  vertical-align: super;
  text-decoration: none;
  margin-left: 1px;
}
.prose .cite:hover { text-decoration: underline; }

/* Inline links in body copy → accent underline like .prose a.inline */
.prose .content-section a:not(.cite):not(.btn-cta),
.prose .related-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
}

/* ---- "What researchers study it for" definition list ---------------------- */
.prose .research-list {
  list-style: none;
  margin: 18px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.prose .research-list li {
  padding-left: 0;
  position: static;
  display: block;
}
.prose .research-list li::before { content: none; }
.prose .research-list strong {
  display: block;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 4px;
}
.prose .research-list span {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Parameter / reference tables ---------------------------------------- */
.prose .params-table-wrap {
  margin: 24px 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.prose .params-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
}
.prose .params-table th,
.prose .params-table td {
  text-align: left;
  padding: 14px 18px;
  font-size: 14px;
  line-height: 1.5;
  vertical-align: top;
}
.prose .params-table thead th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.prose .params-table tbody tr + tr td { box-shadow: 0 -1px 0 var(--hairline); }
.prose .params-table td:first-child { color: var(--muted); width: 38%; }
.prose .params-table td:last-child { color: var(--ink); }

/* ---- Stack-page price table (authored on stack pages; mirrors .comparison-table) */
.prose .price-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: var(--sans);
  font-size: 14px;
}
.prose .price-table th,
.prose .price-table td {
  text-align: left;
  padding: 12px 14px;
  line-height: 1.5;
  color: var(--ink);
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
}
.prose .price-table thead th {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.prose .price-table tbody tr:last-child td { border-bottom: none; }

/* ---- In-body price CTA → glass band -------------------------------------- */
.prose .price-cta {
  margin: 34px 0;
  padding: 24px 26px;
  border-radius: 22px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.prose .price-cta .price-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  font-family: var(--sans);
}
.prose .price-cta .price-range {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
}
.prose .price-cta .price-note { font-size: 13.5px; color: var(--muted); }
.prose .price-cta .btn-cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 48px;
  padding: 0 22px;
  border-radius: 99px;
  background: linear-gradient(120deg, var(--accent-deep, var(--accent)), #9A6FE8);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease;
}
.prose .price-cta .btn-cta:hover { transform: translateY(-1px); }

/* ---- In-body research-use disclaimer ------------------------------------- */
.prose > .disclaimer,
.prose .content-section ~ .disclaimer {
  display: block;
  margin: 30px 0;
  padding: 18px 22px;
  border-radius: 14px;
  background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ---- Bibliography --------------------------------------------------------- */
.prose .bibliography { margin-top: 44px; }
.prose .ref-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  counter-reset: none;
}
.prose .ref-list li {
  padding-left: 0;
  position: static;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.prose .ref-list li::before { content: none; }
.prose .ref-list .ref-num { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.prose .ref-list .ref-text em { font-style: italic; color: var(--ink); }
.prose .ref-list a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: color-mix(in oklch, var(--accent) 40%, transparent);
  text-underline-offset: 3px;
  white-space: nowrap;
}

/* ---- Related research notes (in-body) ------------------------------------ */
.prose .related-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}
.prose .related-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  text-decoration: none !important;
  color: var(--ink) !important;
  transition: transform 0.15s ease;
}
.prose .related-link:hover { transform: translateY(-1px); }
.prose .related-link .arrow { color: var(--accent); font-size: 18px; }

/* Icon + stacked-text variant (used on stack / comparison pages) */
.prose .related-link:has(.rl-text) { align-items: flex-start; justify-content: flex-start; }
.prose .related-link .rl-icon {
  flex: 0 0 auto;
  font-size: 22px;
  line-height: 1.2;
}
.prose .related-link .rl-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
}
.prose .related-link .rl-text strong {
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.prose .related-link .rl-text span {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ===========================================================================
   QUICK-REFERENCE GRID (built from `stats` front-matter, below the article)
   =========================================================================== */
.rn-quickref .marker {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.02em;
}
.rn-quickref-card { padding: 6px; }
.rn-quickref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--hairline);
  border-radius: 14px;
  overflow: hidden;
}
.rn-fact { background: var(--glass); padding: 18px 20px; }
.rn-fact-label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.rn-fact-value {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-top: 6px;
}
.rn-fact-note { font-size: 12.5px; color: var(--muted); margin-top: 4px; font-family: var(--sans); }

/* ===========================================================================
   STACK / COMPARISON PAGES — compound cards + combined cost card
   ---------------------------------------------------------------------------
   Aurora-glass port of the legacy `compound-grid` / `compound-card` / `stat-row`
   / `cost-card` components. The markup is authored directly in the three stack
   pages (anti-aging-stack, ipamorelin-cjc-1295, wolverine-stack); the original
   styles lived in the dropped content.css, which left them rendering as raw
   text. Restyled here to match the page's other glass cards (.related-link).
   =========================================================================== */
.prose .compound-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin: 24px 0 28px;
}
.prose .compound-card {
  display: flex;
  flex-direction: column;
  padding: 22px 22px 20px;
  border-radius: 16px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.prose .compound-name {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.prose .compound-alias {
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 3px;
}
.prose .compound-card .stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--chip-border);
}
.prose .compound-card .stat-row:first-of-type { margin-top: 14px; }
.prose .stat-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  flex: 0 0 auto;
}
.prose .stat-value {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-align: right;
}
.prose .btn-notes {
  align-self: flex-start;
  margin-top: 18px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13.5px;
  color: var(--accent) !important;
  text-decoration: none !important;
  transition: opacity 0.15s ease;
}
.prose .btn-notes:hover { opacity: 0.7; }

/* Combined cost card — full-width glass panel */
.prose .cost-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 28px;
  padding: 24px 26px;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.prose .cost-label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}
.prose .cost-range {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-top: 2px;
}
.prose .cost-note {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
}
.prose .btn-calc {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  height: 44px;
  padding: 0 20px;
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg) !important;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(33,29,51,0.18);
  transition: transform 0.15s ease;
}
:root[data-theme="dark"] .prose .btn-calc { color: #14121F !important; }
.prose .btn-calc:hover { transform: translateY(-1px); }

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
@media (max-width: 920px) {
  .prose .ref-list li { grid-template-columns: 28px 1fr; }
  .prose .ref-list a { white-space: normal; }
}
