/* /androgens/ pillar page: blocks on top of serotonin.css (diagrams, tables, bar charts). */
.an-page { --an-teal: #5ED3C3; --an-coral: #FF7A6B; --an-grey: #8A8A8A; --an-line: #2A2A2A; }

/* inline SVG diagrams */
.x-body .an-diagram { margin: 24px auto; max-width: 560px; padding: 16px 12px 12px; background: var(--sr-card, #0B0B0B); border: 1px solid #333; border-radius: 14px; }
.an-svg { display: block; width: 100%; height: auto; }
.an-svg text { font-family: var(--font-body, system-ui, sans-serif); }
.an-svg .an-t { font-size: 14px; font-weight: 700; fill: #fff; }
.an-svg .an-s { font-size: 11px; fill: #A8A8A8; }
.an-svg .an-e { font-size: 11px; fill: #CFCFCF; font-style: italic; }
.an-diagram figcaption { margin-top: 10px; font-size: 14px; line-height: 1.45; color: #9A9A9A; }

/* tables: real table on wide screens, stacked cards on phones */
.x-body .an-table { margin: 22px 0; }
.an-table figcaption { margin-bottom: 10px; font-family: var(--font-display); font-size: 18px; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.an-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.an-table th { text-align: left; padding: 10px 12px; background: #161616; color: var(--sr-accent, #F2C14E); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; border-bottom: 1px solid #333; }
.an-table td { padding: 10px 12px; border-bottom: 1px solid var(--an-line); vertical-align: top; color: #DADADA; }
.an-table td:first-child { color: #fff; font-weight: 600; }
.an-table td a { color: var(--sr-accent, #F2C14E); }
@media (max-width: 640px) {
  .an-table table, .an-table thead, .an-table tbody, .an-table tr, .an-table td { display: block; }
  .an-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .an-table tr { margin-bottom: 12px; padding: 10px 14px; background: var(--sr-card, #0B0B0B); border: 1px solid #333; border-radius: 12px; }
  .an-table td { padding: 5px 0; border: 0; }
  .an-table td::before { content: attr(data-label); display: block; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: #8A8A8A; }
  .an-table td:first-child { font-size: 17px; }
  .an-table td:first-child::before { display: none; }
}

/* bar charts */
.x-body .an-bars, .x-body .an-stack { margin: 22px 0; padding: 16px; background: var(--sr-card, #0B0B0B); border: 1px solid #333; border-radius: 14px; }
.an-bars__title { margin: 0 0 12px; font-family: var(--font-display); font-size: 18px; letter-spacing: .03em; text-transform: uppercase; color: #fff; }
.an-bars ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.an-bar { display: grid; grid-template-columns: minmax(0, 9.5em) 1fr auto; align-items: center; gap: 10px; margin: 0 !important; }
.an-bar__label { font-size: 14px; color: #CFCFCF; line-height: 1.3; }
.an-bar__track { height: 14px; background: #1C1C1C; border-radius: 7px; overflow: hidden; }
.an-bar__fill { display: block; height: 100%; width: var(--w); border-radius: 7px; background: var(--an-grey); }
.an-bar--gold .an-bar__fill { background: var(--sr-accent, #F2C14E); }
.an-bar--coral .an-bar__fill { background: var(--an-coral); }
.an-bar--teal .an-bar__fill { background: var(--an-teal); }
.an-bar__val { font-family: var(--sr-mono, ui-monospace, monospace); font-size: 14px; color: #fff; white-space: nowrap; }
.an-bars figcaption, .an-stack figcaption { margin-top: 12px; font-size: 14px; line-height: 1.45; color: #9A9A9A; }
@media (max-width: 420px) {
  .an-bar { grid-template-columns: 1fr auto; }
  .an-bar__label { grid-column: 1 / -1; }
}

/* one 100% bar split into parts */
.an-stack__bar { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: #1C1C1C; }
.an-seg { display: block; width: var(--w); height: 100%; }
.an-seg--gold { background: var(--sr-accent, #F2C14E); }
.an-seg--teal { background: var(--an-teal); }
.an-seg--coral { background: var(--an-coral); }
.an-seg--grey { background: var(--an-grey); }
.an-stack__key { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: #CFCFCF; }
.an-stack__key li { margin: 0 !important; display: flex; align-items: center; gap: 6px; }
.an-stack__key i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.an-stack__key strong { color: #fff; }

/* long numbers ("+8.7 nmol/L") in the study stat box: put the label under the number on phones */
@media (max-width: 520px) {
  .an-page .sr-stat { flex-direction: column; align-items: flex-start; gap: 6px; }
  .an-page .sr-stat__num { font-size: 30px; }
}
.x-body .an-bars ul { padding-left: 0; }
