/* Richard's Health: the Medications section. Same tokens as style.css. */
.hd-meds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 28px 44px; margin: 0 0 56px; padding: 0; list-style: none; }
.hd-meds.dash-skeleton { min-height: 180px; }
.hd-meds__group { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.hd-meds__group:first-child { margin-top: 0; }
.hd-meds__group h3 { display: flex; align-items: center; gap: 8px; font-family: var(--hd-display); font-weight: 600; font-size: 15px; letter-spacing: -.005em; }
.hd-meds__group h3::before { content: ""; width: 8px; height: 8px; background: var(--hd-c1); }
.hd-meds__group::after { content: ""; flex: 1; height: 1px; background: var(--hd-line); }
.hd-med { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 14px 16px; align-content: start; padding-top: 16px; border-top: 1px solid var(--hd-line); }
.hd-med.is-inactive { opacity: .6; }
.hd-med__msg { padding: 16px 0; border-top: 1px solid var(--hd-line); font-size: 13px; color: var(--color-fg-muted); }
.hd-med__pic { display: grid; place-items: center; width: 84px; height: 84px; overflow: hidden; background: #fff; border: 1px solid var(--hd-line); }
.hd-med__pic img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.hd-med__pic.is-empty { background: color-mix(in srgb, var(--hd-c1) 10%, transparent); border-color: transparent; color: var(--hd-accent); font: 600 22px/1 var(--hd-display); letter-spacing: -.02em; }
.hd-med__head { display: grid; align-content: start; gap: 3px; min-width: 0; }
.hd-med__name { font-family: var(--hd-display); font-weight: 600; font-size: 16.5px; line-height: 1.25; letter-spacing: -.01em; }
.hd-med__meta { font-size: 12.5px; color: var(--color-fg-muted); }
.hd-med__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.hd-med__tag { padding: 2px 8px; background: var(--hd-soft); font-size: 11.5px; font-weight: 500; }
.hd-med__facts { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; margin: 0; }
.hd-med__facts > div { min-width: 0; padding: 8px 0; border-top: 1px solid var(--hd-line); }
.hd-med__facts dt { font-size: 12px; color: var(--color-fg-muted); }
.hd-med__facts dd { margin: 2px 0 0; font-family: var(--hd-display); font-weight: 600; font-size: 16px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.hd-med__facts .hd-med__sub { display: block; margin-top: 1px; font-family: var(--hd-text); font-weight: 400; font-size: 12px; color: var(--color-fg-muted); }
.hd-med__facts .is-soon { color: var(--color-bad); }
.hd-med__foot { grid-column: 1 / -1; display: grid; justify-items: start; gap: 8px; }
.hd-med__buy { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--cds-radius, 2px); background: var(--color-fg); color: var(--color-bg); text-decoration: none; font-size: 13px; font-weight: 600; }
.hd-med__buy::after { content: "\2197"; font-weight: 400; }
.hd-med__buy:hover { background: var(--hd-c1); color: #fff; }
.hd-med__buy:focus-visible, .hd-table a.hd-prod:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
.hd-med__note { font-size: 12px; color: var(--color-fg-muted); }
.hd-med__note.is-about { font-size: 14px; line-height: 1.5; color: var(--color-fg); }
.hd-med__link { color: var(--hd-accent); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.hd-med__link:hover { text-decoration-thickness: 2px; }
.hd-med__link:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
.hd-table a.hd-prod { color: inherit; text-decoration: underline; text-decoration-color: var(--hd-line); text-underline-offset: 3px; }
.hd-table a.hd-prod:hover { text-decoration-color: var(--hd-c1); }
.hd-also { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); column-gap: 32px; }
.hd-also li { grid-template-columns: minmax(0, 1fr); padding: 9px 0; border-bottom: 1px solid var(--hd-line); }
.hd-also li:last-child { border-bottom: 1px solid var(--hd-line); }
.hd-also a.hd-prod { color: inherit; text-decoration: underline; text-decoration-color: var(--hd-line); text-underline-offset: 3px; }
.hd-also a.hd-prod:hover { text-decoration-color: var(--hd-c1); }
.hd-also a.hd-prod:focus-visible { outline: 2px solid var(--hd-accent); outline-offset: 2px; }
.hd-table th.hd-num, .hd-table td.hd-num { text-align: right; }
.hd-table td.hd-nowrap { white-space: nowrap; }
#medications .hd-table { min-width: 760px; }
.hd-table-wrap--scroll { max-height: 560px; overflow: auto; }
.hd-table-wrap--scroll thead th { position: sticky; top: 0; z-index: 1; background: var(--color-bg); }
@container hd (max-width: 600px) {
  .hd-med { grid-template-columns: 64px minmax(0, 1fr); }
  .hd-med__pic { width: 64px; height: 64px; }
}
