/* RAR Pharmacology subject and topic styles. */

/* ============================================================
   Tooltip clipping safety — let .cav-term hover definitions escape
   every card/box on the RAR Pharmacology pages so they are never cut
   off. The cards don't rely on overflow for clipping (no children
   poke out), so forcing overflow:visible is safe; the z-index bump
   floats the tooltip above adjacent cards/interactives.
   ============================================================ */
.rar-topic-content .topic-section-card,
.rar-topic-content .solid-text-card,
.rar-topic-content .hy-callout,
.rar-topic-content .atl-grid,
.rar-topic-content .atl-card,
.rar-topic-content .blf-ro,
.rar-topic-content .blf-ro-fig {
    overflow: visible;
}
.rar-topic-content .cav-term::after { z-index: 200; }

/* High-yield callout tag overlap fix — the shared component uses a fixed
   104px label column, which long provenance tags ("Cross-module pearl →
   Med Micro", "No cross-reactivity", …) overflow, colliding with the body
   text. On RAR pages, stack the tag chip above its paragraph and let it
   wrap, so any-length tag fits with no overlap. */
.rar-topic-content .hy-callout__item {
    grid-template-columns: 1fr;
    gap: 6px;
}
.rar-topic-content .hy-callout__item .hy-tag {
    justify-self: start;
    white-space: normal;
    text-align: left;
    line-height: 1.3;
}

/* ============================================================
   "Beta-Lactam Foundations"  (blf-)  — FIRST built RAR Pharmacology
   page. Reuses the shared RAR topic-page building blocks
   (.topic-section-card / .section-label / .solid-text-card /
   .hy-callout / .atl-grid / .atl-card / .cav-term / .nbme-flag /
   .vasc-tbd). Only page-specific spacing lives here; everything
   else is inherited from the shared components.
   ============================================================ */

/* §1 layout: text card on the left, ring figure on the right (stacks on narrow). */
.rar-topic-content .blf-s1-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 240px);
    gap: 18px;
    align-items: center;
}
@media (max-width: 560px) {
    .rar-topic-content .blf-s1-split { grid-template-columns: 1fr; }
}

/* §1 β-lactam ring figure — small structural diagram, not full width. */
.rar-topic-content .blf-ring-fig {
    margin: 0;
    text-align: center;
}
.rar-topic-content .blf-s1-split .blf-ring-fig { margin: 0; }
.rar-topic-content .blf-ring-fig img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
}
.rar-topic-content .blf-ring-fig figcaption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #111111;
}

/* Section lead paragraph under each <h3> (near-black, canonical reader color). */
.rar-topic-content .blf-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}

/* Allergy section has 4 cards — give them a comfortable min so they wrap 2×2
   instead of squishing to 4-across on wide screens. */
.rar-topic-content .blf-allergy-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* Interactive placeholder mounts (INT-1/2/3 — filled by later builds;
   note styling = shared .vasc-tbd). */
.rar-topic-content .blf-mount {
    margin-top: 14px;
}

/* ---- INT-1 · MOA / transpeptidation schematic (window.BlfMoaSchematic) ---- */
.rar-topic-content .blf-moa {
    --ink: #111111;
    --backbone: #9a8c5a;
    --backbone-line: #7d7047;
    --peptide: #6f7d6a;
    --bead: #b7c2ae;
    --bead-term: #8fa585;
    --pbp: #2b8a9e;
    --pbp-lock: #9aa3a6;
    --drug: #c0392b;
    --link: #3a7d44;
    --panel: #faf9f6;
    margin-top: 14px;
    outline: none;
}
.rar-topic-content .blf-moa-figure {
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    max-width: 620px;   /* ~a third smaller than full card width; centered */
    margin: 0 auto;
}
.rar-topic-content .blf-moa svg { display: block; width: 100%; height: auto; }
.rar-topic-content .blf-moa text { fill: var(--ink); }
.rar-topic-content .blf-moa .lbl { font-size: 15px; }
.rar-topic-content .blf-moa .lbl-sm { font-size: 13px; fill: #555; }
.rar-topic-content .blf-moa .step-el { opacity: 0; transition: opacity 0.25s; }
.rar-topic-content .blf-moa .show-1 .s1,
.rar-topic-content .blf-moa .show-2 .s2,
.rar-topic-content .blf-moa .show-3 .s3,
.rar-topic-content .blf-moa .show-4 .s4,
.rar-topic-content .blf-moa .show-5 .s5 { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .rar-topic-content .blf-moa .step-el { transition: none; }
}
.rar-topic-content .blf-moa-caption {
    margin-top: 12px;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    background: var(--panel);
    padding: 14px 16px;
    min-height: 64px;
}
.rar-topic-content .blf-moa-k {
    font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
    color: #8a8a8a; margin: 0 0 4px;
}
.rar-topic-content .blf-moa-caption p:last-child { margin: 0; font-size: 14px; line-height: 1.5; color: #111111; }
.rar-topic-content .blf-moa-caption b { font-weight: 700; }
.rar-topic-content .blf-moa-controls { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.rar-topic-content .blf-moa-btn {
    border: 1.5px solid #d0d0d0; background: #fff; color: #111111;
    padding: 8px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer;
}
.rar-topic-content .blf-moa-btn:hover:not(:disabled) { border-color: #9a9a9a; }
.rar-topic-content .blf-moa-btn:disabled { opacity: 0.4; cursor: default; }
.rar-topic-content .blf-moa-dots { display: flex; gap: 8px; margin-left: auto; margin-right: auto; }
.rar-topic-content .blf-moa-dot { width: 10px; height: 10px; border-radius: 50%; background: #d5d5d5; border: 0; padding: 0; cursor: pointer; }
.rar-topic-content .blf-moa-dot.is-active { background: var(--pbp); }
.rar-topic-content .blf-moa-count { font-size: 13px; color: #666; min-width: 34px; text-align: right; }

/* ============================================================
   "Protein-Synthesis Inhibitors — Foundations"  (psi-)  — CAP/Ch.44
   concept anchor. Same shared building blocks as the beta-lactam
   pages; only page-specific spacing lives here.
   ============================================================ */
.rar-topic-content .psi-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .psi-mount { margin-top: 14px; }
.rar-topic-content .psi-links-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.06);
    border: 1px solid rgba(10, 132, 255, 0.14);
    color: var(--text, #111318);
    font-size: 14px;
    line-height: 1.55;
}

/* ---- Generic "Boards note" — lecture answer vs board-standard answer.
       Reusable on any RAR pharm page (see Clindamycin §7). ---- */
.rar-topic-content .boards-note {
    margin-top: 10px;
    padding: 8px 11px;
    border-left: 3px solid rgba(10, 132, 255, 0.4);
    background: rgba(10, 132, 255, 0.05);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #111111;
}

/* ---- "CAP Antimicrobial Selection" (cap-) lens page — helper styles ---- */
.rar-topic-content .cap-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .cap-mount { margin-top: 14px; }
.rar-topic-content .cap-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .cap-xlink:hover,
.rar-topic-content .cap-xlink:focus-visible { color: #0850c4; }
/* §2 typical-vs-atypical lung figure — sized, centered, not blown up. */
.rar-topic-content .cap-figure {
    margin: 0 0 16px;
    text-align: center;
}
.rar-topic-content .cap-figure img {
    display: block;
    width: 100%;
    max-width: 620px;
    height: auto;
    margin: 0 auto;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    background: #fff;
}
.rar-topic-content .cap-figure figcaption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #111111;
}

/* ---- "Linezolid" (lz-) drug-class page — helper styles ---- */
.rar-topic-content .lz-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .lz-mount { margin-top: 14px; }
.rar-topic-content .lz-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .lz-xlink:hover,
.rar-topic-content .lz-xlink:focus-visible { color: #0850c4; }

/* ---- "Chloramphenicol" (chl-) drug-class page — helper styles ---- */
.rar-topic-content .chl-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .chl-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .chl-xlink:hover,
.rar-topic-content .chl-xlink:focus-visible { color: #0850c4; }

/* ---- "Clindamycin" (cl-) drug-class page — helper styles ---- */
.rar-topic-content .cl-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .cl-mount { margin-top: 14px; }
.rar-topic-content .cl-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .cl-xlink:hover,
.rar-topic-content .cl-xlink:focus-visible { color: #0850c4; }

/* ---- "Fluoroquinolones" (fq-) drug-class page — helper styles ---- */
.rar-topic-content .fq-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .fq-mount { margin-top: 14px; }
.rar-topic-content .fq-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .fq-xlink:hover,
.rar-topic-content .fq-xlink:focus-visible { color: #0850c4; }

/* ---- FQ gyrase BioStage — crop dead space top & bottom ---- */
/* Real content lives in y≈77..476 of the 720 stage; the rest is dead space
   (biggest gap is below). Show the y≈50..505 band: small pull off the top so
   the step-3 FQ pill (top=77) never clips, and cut the empty bottom. */
.rar-topic-content #int-fq-gyrase .bsp-stage {
    aspect-ratio: 1280 / 455;
    overflow: hidden;
}
.rar-topic-content #int-fq-gyrase .bsp-svg {
    margin-top: -3.9%;   /* ≈ -50 stage-units; keeps the FQ pill in frame */
}

/* ================================================================
   RAR PHARM KIT — supplement layer (composes the shared mk- kit).
   Scoped to .rar-pharm (added to the page root by each pharm init) so the
   Med-Micro pages, which SHARE .rar-topic-content, are never affected.
   Encodes Chris's corrections: pills = drugs only; non-drug titles are
   bold black (hover-def kept, no pill); cards stay colourful via a hue
   border; the leading term of a stacked row outranks the text after the
   "—"; never list important items inline; figures top-align.
   ================================================================ */

/* Pills are for DRUG NAMES ONLY. A non-drug card title that carries a hover
   definition → bold BLACK with a dotted underline, never a coloured pill.
   (A drug used AS a title keeps its pill via an explicit .mk-pill span.) */
.rar-pharm .mk-factor__name .cav-term:not(.mk-pill) {
    display: inline; padding: 0; border: 0; border-radius: 0; background: none;
    color: #111111; font-weight: 800; text-decoration: none;
    border-bottom: 2px dotted rgba(17, 17, 17, 0.55);
}
.rar-pharm .mk-factor__name .cav-term:not(.mk-pill):hover,
.rar-pharm .mk-factor__name .cav-term:not(.mk-pill):focus-visible {
    border-bottom-color: rgba(17, 17, 17, 0.85);
}

/* Keep cards colourful WITHOUT pilling their titles: the hue becomes a
   coloured left-border accent on the card. */
.rar-pharm .mk-factor[class*="mk-hue-"],
.rar-pharm .mk-card[class*="mk-hue-"] {
    border-left: 4px solid var(--mk-pill-bd, #cbd5e1);
}

/* Stacked rows ("Term — why"): the leading (underlined) term is BIGGER +
   BOLDER than the explanation that follows the em dash. */
.rar-pharm .mk-symptoms > li > strong:first-of-type,
.rar-pharm .mk-symptoms > li > .cav-term:first-of-type,
.rar-pharm .mk-titled-list > li > strong:first-of-type,
.rar-pharm .mk-titled-list > li > .cav-term:first-of-type {
    font-size: 15.75px; font-weight: 800; color: #111111;
}

/* A figure sits flush with the TOP of its text / callout — no vertical drift. */
.rar-pharm .mk-fig-row { align-items: flex-start; }
.rar-pharm .mk-fig-row > .mk-fig { margin-top: 0; }

/* Toxicity rows run FULL-WIDTH, one per line — never the kit's 2-column huddle.
   micro-kit.js auto-adds .mk-symptoms--2col to any list over 5 rows and clamps it to
   max-width:620px. That suits Med-Micro's short symptom words, but a pharm row is
   "TERM — why": in a ~290px column every row wrapped 3–4 deep AND still used only
   half the card, while the mnemonic / board-pearl rows below ran edge-to-edge. One
   full-width column fills the card, wraps at most once, and (because the wrapping
   collapses) is no taller. Reads as the stacked one-idea-per-line list the kit asks
   for. Med-Micro keeps its 2-col huddle — this is scoped to .rar-pharm only. */
.rar-pharm .mk-symptoms.mk-symptoms--2col {
    columns: auto;
    column-count: 1;
    column-width: auto;
    column-rule: none;
    max-width: none;
}
/* full-width rows: give each a touch more breathing room + a hairline separator so a
   long stack still scans as discrete rows rather than a wall of text. */
.rar-pharm .mk-symptoms > li {
    margin-bottom: 7px;
    padding-bottom: 7px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.rar-pharm .mk-symptoms > li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: 0;
}

/* ================================================================
   CAP empiric selector (window.CapRegimenSelector) → #int-cap-selector
   ================================================================ */
.rar-topic-content .capsel { color: #111111; }
.rar-topic-content .capsel-help { font-size: 13px; color: #4a4a4a; margin: 0 0 14px; }
.rar-topic-content .capsel-grouplbl {
    font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
    color: #888; font-weight: 700; margin: 10px 0 6px;
}
.rar-topic-content .capsel-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.rar-topic-content .capsel-set {
    border: 1.5px solid #d6d6d6; background: #fff; border-radius: 10px;
    padding: 11px 12px; cursor: pointer; text-align: left; font-size: 13px;
    font-weight: 600; color: #111111; transition: border-color 0.12s ease, background 0.12s ease;
}
.rar-topic-content .capsel-set:hover { border-color: #9a9a9a; }
.rar-topic-content .capsel-set.is-active { border-color: #111111; background: #f2f2f2; }
.rar-topic-content .capsel-set--mod { border-style: dashed; }
.rar-topic-content .capsel-set--mod.is-active { border-color: #b8791a; background: #fbf1df; }
.rar-topic-content .capsel-card {
    margin-top: 16px; border: 1px solid #e6e6e6; border-radius: 12px;
    background: #faf9f6; padding: 18px; min-height: 120px;
}
.rar-topic-content .capsel-h { margin: 0 0 10px; font-size: 16px; font-weight: 800; color: #111111; }
.rar-topic-content .capsel-rowlbl {
    font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase;
    color: #777; font-weight: 700; margin: 0 0 8px;
}
.rar-topic-content .capsel-rowlbl--add { margin-top: 14px; }
.rar-topic-content .capsel-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
/* drug pill — prototype look, but the platform .cav-term drives the (portaled,
   focus-accessible) mechanism tooltip, so neutralize cav-term's own underline/ink. */
.rar-topic-content .capsel-pill.cav-term {
    display: inline-block; position: relative; font-weight: 700; font-size: 13px;
    background: #fff; border: 1.5px solid #cfd8e3; color: #1f3a5f;
    border-radius: 999px; padding: 6px 13px; cursor: help; text-decoration: none;
    border-bottom: 1.5px solid #cfd8e3;
}
.rar-topic-content .capsel-pill.cav-term:hover,
.rar-topic-content .capsel-pill.cav-term:focus-visible { border-color: #2b6cb0; border-bottom-color: #2b6cb0; }
.rar-topic-content .capsel-note {
    font-size: 13px; line-height: 1.5; color: #111111;
    border-top: 1px dashed #ddd; padding-top: 10px;
}
.rar-topic-content .capsel-placeholder { color: #8a8a8a; font-size: 14px; margin: 0; }

/* ================================================================
   CAP typical/atypical table + quiz (window.CapTypicalAtypical)
   → #int-cap-typical-atypical
   ================================================================ */
.rar-topic-content .capta { color: #111111; }
.rar-topic-content .capta-bar { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.rar-topic-content .capta-tg {
    flex: 1; border: 1.5px solid #d6d6d6; background: #fff; border-radius: 10px;
    padding: 11px; cursor: pointer; text-align: center; font-weight: 700; font-size: 14px;
    color: #111111; transition: border-color 0.12s ease, background 0.12s ease;
}
.rar-topic-content .capta-tg:hover { border-color: #9a9a9a; }
.rar-topic-content .capta-tg[data-s="typ"].is-active { border-color: #2b6cb0; background: #eaf1f8; }
.rar-topic-content .capta-tg[data-s="atyp"].is-active { border-color: #2e7d4f; background: #eef3ef; }
.rar-topic-content .capta-quizbtn {
    border: 1.5px solid #2b8a9e; background: #2b8a9e; color: #fff; border-radius: 10px;
    padding: 11px 18px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.rar-topic-content .capta-banner { font-size: 13px; line-height: 1.5; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; color: #111111; }
.rar-topic-content .capta-banner--typ { background: #eaf1f8; border: 1px solid #c3d6ea; }
.rar-topic-content .capta-banner--atyp { background: #eef3ef; border: 1px solid #cfe0d5; }
.rar-topic-content .capta-tblwrap { overflow-x: auto; }
.rar-topic-content .capta-tbl {
    width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px;
    border: 1px solid #e6e6e6; border-radius: 12px; overflow: hidden; min-width: 640px;
}
.rar-topic-content .capta-tbl thead th {
    background: #faf9f6; text-align: left; padding: 10px 12px; font-size: 11px;
    letter-spacing: 0.04em; text-transform: uppercase; color: #666; border-bottom: 2px solid #e0e0e0;
}
.rar-topic-content .capta-tbl tbody td { padding: 11px 12px; border-bottom: 1px solid #e6e6e6; vertical-align: top; line-height: 1.45; color: #111111; }
.rar-topic-content .capta-tbl tbody tr:last-child td { border-bottom: none; }
.rar-topic-content .capta-org { font-weight: 700; font-style: italic; min-width: 128px; }
.rar-topic-content .capta-drug span {
    display: inline-block; font-weight: 700; font-size: 12px; background: #fff;
    border: 1.5px solid #cfd8e3; color: #1f3a5f; border-radius: 999px; padding: 4px 10px; white-space: nowrap;
}
/* quiz — correct/wrong/teach match the platform RecallGame language */
.rar-topic-content .capta-hud { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 13px; color: #555; }
.rar-topic-content .capta-progress { flex: 1; height: 8px; background: #ececec; border-radius: 4px; overflow: hidden; }
.rar-topic-content .capta-progress > span { display: block; height: 100%; width: 0; background: #2b8a9e; transition: width 0.3s ease; }
.rar-topic-content .capta-streak { font-weight: 700; }
.rar-topic-content .capta-back { border: none; background: none; color: #8a8a8a; font-size: 12px; cursor: pointer; text-decoration: underline; }
.rar-topic-content .capta-qcard { border: 1px solid #e6e6e6; border-radius: 14px; background: #faf9f6; padding: 20px; }
.rar-topic-content .capta-qtype { font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: #8a8a8a; font-weight: 700; margin: 0 0 6px; }
.rar-topic-content .capta-qtext { font-size: 17px; font-weight: 600; margin: 0 0 14px; line-height: 1.4; color: #111111; }
.rar-topic-content .capta-choices { display: flex; flex-direction: column; gap: 8px; }
.rar-topic-content .capta-choice {
    border: 1.5px solid #d6d6d6; background: #fff; border-radius: 10px; padding: 11px 14px;
    cursor: pointer; text-align: left; font-size: 14px; color: #111111; transition: border-color 0.12s ease;
}
.rar-topic-content .capta-choice:hover:not(:disabled) { border-color: #9a9a9a; }
.rar-topic-content .capta-choice:disabled { cursor: default; }
.rar-topic-content .capta-choice.is-correct { border-color: #2e7d4f; background: #eaf5ee; font-weight: 600; }
.rar-topic-content .capta-choice.is-wrong { border-color: #b3352c; background: #f8ebe9; }
.rar-topic-content .capta-teach { margin-top: 12px; font-size: 13px; padding: 10px 12px; border-radius: 9px; background: #fff; border: 1px solid #e6e6e6; display: none; color: #111111; }
.rar-topic-content .capta-teach.is-show { display: block; }
.rar-topic-content .capta-qfoot { display: flex; margin-top: 14px; }
.rar-topic-content .capta-next { margin-left: auto; border: 1.5px solid #111111; background: #111111; color: #fff; border-radius: 9px; padding: 9px 18px; font-weight: 600; cursor: pointer; visibility: hidden; }
.rar-topic-content .capta-next.is-show { visibility: visible; }
.rar-topic-content .capta-end { text-align: center; padding: 26px; }
.rar-topic-content .capta-score { font-size: 40px; font-weight: 800; margin: 0; color: #111111; }
.rar-topic-content .capta-end p { color: #666; margin: 4px 0 16px; }
.rar-topic-content .capta-endbtn { border: 1.5px solid #111111; background: #fff; border-radius: 9px; padding: 9px 18px; font-weight: 600; color: #111111; cursor: pointer; margin: 0 5px; }

/* ---- Macrolide compare table (window.MacrolideCompare) ---- */
.rar-topic-content .mcmp {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    background: #faf9f6;
    color: #111111;
}
.rar-topic-content .mcmp-scroll { overflow-x: auto; }
.rar-topic-content .mcmp-grid {
    display: grid;
    grid-template-columns: 130px repeat(3, minmax(150px, 1fr));
    gap: 8px;
    min-width: 560px;
}
/* Five-drug variant (Azoles, window.AzoleCompare). ADDITIVE modifier — the
   three-column default above is unchanged because the Macrolides page
   depends on it. Wider min-width so five columns scroll rather than crush. */
.rar-topic-content .mcmp-grid--5 {
    grid-template-columns: 130px repeat(5, minmax(150px, 1fr));
    min-width: 900px;
}
.rar-topic-content .mcmp-corner { }
.rar-topic-content .mcmp-head {
    border: 1.5px solid #d6d6d6;
    background: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    font-size: 14px;
    font-weight: 800;
    color: #111111;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.12s ease, background 0.12s ease;
}
.rar-topic-content .mcmp-head:hover { border-color: #9a9a9a; }
.rar-topic-content .mcmp-head.is-focus { border-color: #0a6cff; background: #eef5ff; }
.rar-topic-content .mcmp-head:focus-visible { outline: 2px solid #0a6cff; outline-offset: 2px; }
.rar-topic-content .mcmp-rowlabel {
    display: flex;
    align-items: center;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #667085;
}
.rar-topic-content .mcmp-cell {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 10px;
    padding: 8px 10px;
    transition: opacity 0.15s ease;
}
.rar-topic-content .mcmp-cell.is-dim { opacity: 0.28; }
.rar-topic-content .mcmp-pill {
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 999px;
    padding: 3px 10px;
    line-height: 1.3;
}
.rar-topic-content .mcmp-pill--good { background: #eaf5ee; color: #2e7d4f; border: 1px solid #bfe0cb; }
.rar-topic-content .mcmp-pill--warn { background: #fbf1df; color: #b8791a; border: 1px solid #ead4a6; }
.rar-topic-content .mcmp-pill--bad  { background: #f8ebe9; color: #b3352c; border: 1px solid #eec4bf; }
.rar-topic-content .mcmp-plain { font-size: 12.5px; line-height: 1.45; color: #111111; }
.rar-topic-content .mcmp-note {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px dashed #ddd;
    font-size: 13px;
    line-height: 1.5;
    color: #111111;
}

/* ---- "Macrolides" (mac-) drug-class page — helper styles ---- */
.rar-topic-content .mac-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .mac-mount { margin-top: 14px; }
.rar-topic-content .mac-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .mac-xlink:hover,
.rar-topic-content .mac-xlink:focus-visible { color: #0850c4; }

/* ---- Ribosome target map overlay (window.CapRibosomeTarget) ---- */
.rar-topic-content .psi-ribo {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(238, 245, 255, 0.9), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(10, 132, 255, 0.16);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}
.rar-topic-content .psi-ribo-fig {
    position: relative;
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}
.rar-topic-content .psi-ribo-svg { display: block; width: 100%; height: auto; }
.rar-topic-content .psi-ribo-hot { cursor: pointer; outline: none; }
.rar-topic-content .psi-ribo-hit { fill: rgba(0, 0, 0, 0.001); stroke: none; }
.rar-topic-content .psi-ribo-hl {
    fill: none;
    stroke: var(--accent, #0a6cff);
    stroke-width: 8;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.rar-topic-content .psi-ribo-hot.is-active .psi-ribo-hl { opacity: 1; }
.rar-topic-content .psi-ribo-hot:focus-visible .psi-ribo-hl { opacity: 0.55; }
.rar-topic-content .psi-ribo.has-active .psi-ribo-hot:not(.is-active) { opacity: 0.4; }
.rar-topic-content .psi-ribo-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px;
}
.rar-topic-content .psi-ribo-prompt { color: #111111; font-size: 14px; }
.rar-topic-content .psi-ribo-prompt.is-hidden { visibility: hidden; }
.rar-topic-content .psi-ribo-reset {
    border: 1px solid rgba(15, 23, 42, 0.18); background: #fff; color: #111111;
    border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.rar-topic-content .psi-ribo-reset:hover { background: rgba(15, 23, 42, 0.04); }
.rar-topic-content .psi-ribo-reveal { margin-top: 12px; min-height: 84px; }
.rar-topic-content .psi-ribo-panel { display: none; border-left: 5px solid var(--accent, #0a6cff); padding: 4px 0 4px 14px; }
.rar-topic-content .psi-ribo-panel.is-open { display: block; }
.rar-topic-content .psi-ribo-panel__title { color: #111111; font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.rar-topic-content .psi-ribo-panel__body { color: #111111; font-size: 14px; line-height: 1.55; margin: 0 0 4px; }
.rar-topic-content .psi-ribo-panel__note { color: #111111; font-size: 13px; line-height: 1.5; margin: 0; font-style: italic; }

/* ---- URTI Syndrome Selector (window.UrtiSyndromeSelector) ---- */
.rar-topic-content .urti-sel {
    --us-viral: #5a7d6a; --us-viral-bg: #eef3ef;
    --us-bact: #2b6cb0; --us-bact-bg: #eaf1f8;
    --us-panel: #faf9f6; --us-line: #e6e6e6;
    margin-top: 14px;
}
.rar-topic-content .urti-sel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin-bottom: 16px;
}
.rar-topic-content .urti-syn {
    border: 1.5px solid #d6d6d6; background: #fff; border-radius: 10px;
    padding: 11px 12px; cursor: pointer; text-align: left; transition: all 0.12s; color: #111111;
}
.rar-topic-content .urti-syn:hover { border-color: #9a9a9a; }
.rar-topic-content .urti-syn.is-active { border-color: #111111; background: #f2f2f2; }
.rar-topic-content .urti-syn b { display: block; font-size: 13px; }
.rar-topic-content .urti-syn-k { font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; font-weight: 700; margin-bottom: 3px; display: block; }
.rar-topic-content .urti-syn--v .urti-syn-k { color: var(--us-viral); }
.rar-topic-content .urti-syn--b .urti-syn-k { color: var(--us-bact); }
.rar-topic-content .urti-sel-card {
    border-radius: 12px; border: 1px solid var(--us-line); background: var(--us-panel);
    padding: 18px; min-height: 120px; color: #111111;
}
.rar-topic-content .urti-sel-card--v { background: var(--us-viral-bg); border-color: #cfe0d5; }
.rar-topic-content .urti-sel-card--b { background: var(--us-bact-bg); border-color: #c3d6ea; }
.rar-topic-content .urti-sel-card h3 { margin: 0 0 2px; font-size: 16px; color: #111111; }
.rar-topic-content .urti-sel-org { font-size: 12px; color: #666; margin: 0 0 12px; }
.rar-topic-content .urti-sel-line { display: flex; gap: 10px; margin-bottom: 8px; font-size: 14px; align-items: baseline; }
.rar-topic-content .urti-sel-l { min-width: 96px; font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: #777; font-weight: 700; }
.rar-topic-content .urti-sel-val b { font-weight: 700; }
.rar-topic-content .urti-sel-note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed #cfcfcf; font-size: 13px; line-height: 1.5; }
.rar-topic-content .urti-sel-home {
    display: inline-block; margin-top: 12px; font-size: 12px; font-weight: 600;
    border: 1px solid #ccc; border-radius: 999px; padding: 5px 12px; background: #fff; color: #111111; cursor: pointer;
}
.rar-topic-content .urti-sel-home:hover { border-color: #9a9a9a; }
.rar-topic-content .urti-sel-placeholder { color: #8a8a8a; font-size: 14px; margin: 0; }

/* ---- BLI Shield · two-state toggle (window.BliShieldSchematic) ---- */
.rar-topic-content .bli-shield {
    --bs-drug: #2b6cb0; --bs-enzyme: #c0392b; --bs-bli: #2e7d4f; --bs-pbp: #7a5aa0;
    --bs-line: #e6e6e6; --bs-fail: #b3352c; --bs-win: #2e7d4f;
    margin-top: 14px;
}
.rar-topic-content .bli-shield-toggle { display: flex; gap: 8px; margin-bottom: 14px; }
.rar-topic-content .bli-shield-tg {
    flex: 1; border: 1.5px solid #d6d6d6; background: #fff; border-radius: 10px;
    padding: 11px 14px; cursor: pointer; text-align: center; font-weight: 600; font-size: 14px;
    color: #111111; transition: all 0.12s;
}
.rar-topic-content .bli-shield-tg:hover { border-color: #9a9a9a; }
.rar-topic-content .bli-shield-tg.is-active { border-color: #111111; background: #f2f2f2; }
.rar-topic-content .bli-shield-figure { border: 1px solid var(--bs-line); border-radius: 12px; background: #fff; overflow: hidden; max-width: 560px; margin: 0 auto; }
.rar-topic-content .bli-shield svg { display: block; width: 100%; height: auto; }
.rar-topic-content .bli-shield text { fill: #111111; }
.rar-topic-content .bli-shield .lbl-sm { font-size: 12px; fill: #555; }
.rar-topic-content .bli-shield .bs-st { opacity: 0; transition: opacity 0.25s; }
.rar-topic-content .bli-shield .show-alone .a,
.rar-topic-content .bli-shield .show-bli .b { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .rar-topic-content .bli-shield .bs-st { transition: none; } }
.rar-topic-content .bli-shield-verdict { margin-top: 12px; border-radius: 12px; padding: 14px 16px; border: 1px solid; font-size: 14px; line-height: 1.5; color: #111111; }
.rar-topic-content .bli-shield-verdict--fail { background: #f8ebe9; border-color: #eec4bf; }
.rar-topic-content .bli-shield-verdict--win { background: #eaf5ee; border-color: #bfe0cb; }
.rar-topic-content .bli-shield-verdict b { font-weight: 700; }
.rar-topic-content .bli-shield-facts { margin-top: 12px; border-top: 1px dashed #ddd; padding-top: 12px; font-size: 13px; color: #333; }
.rar-topic-content .bli-shield-row { margin-bottom: 4px; }
.rar-topic-content .bli-shield-row b { color: #111111; }

/* ---- INT-3 · Allergy decision fork (window.BlfAllergyFork) ---- */
.rar-topic-content .blf-af {
    --af-ink: #111111;
    --af-safe: #2e7d4f; --af-safe-bg: #eaf5ee; --af-safe-line: #bfe0cb;
    --af-caution: #b8791a; --af-caution-bg: #fbf1df; --af-caution-line: #ead4a6;
    --af-avoid: #b3352c; --af-avoid-bg: #f8ebe9; --af-avoid-line: #eec4bf;
    --af-panel: #faf9f6; --af-line: #e6e6e6;
    margin-top: 14px;
}
.rar-topic-content .blf-af-q {
    border: 1px solid var(--af-line);
    border-radius: 12px;
    background: var(--af-panel);
    padding: 16px 18px;
    margin-bottom: 14px;
}
.rar-topic-content .blf-af-qk { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #8a8a8a; margin: 0 0 8px; }
.rar-topic-content .blf-af-qt { font-size: 15px; font-weight: 600; margin: 0 0 12px; color: #111111; }
.rar-topic-content .blf-af-choices { display: flex; gap: 10px; flex-wrap: wrap; }
.rar-topic-content .blf-af-choice {
    flex: 1; min-width: 150px;
    border: 1.5px solid #d6d6d6; background: #fff; border-radius: 10px;
    padding: 12px 14px; cursor: pointer; text-align: left; transition: all 0.12s;
    color: #111111;
}
.rar-topic-content .blf-af-choice:hover { border-color: #9a9a9a; }
.rar-topic-content .blf-af-choice.is-sel { border-color: var(--af-ink); background: #f2f2f2; }
.rar-topic-content .blf-af-choice b { display: block; font-size: 14px; margin-bottom: 2px; }
.rar-topic-content .blf-af-choice span { font-size: 12px; color: #666; }
.rar-topic-content .blf-af-out { border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; border: 1px solid; }
.rar-topic-content .blf-af-out--safe { background: var(--af-safe-bg); border-color: var(--af-safe-line); }
.rar-topic-content .blf-af-out--caution { background: var(--af-caution-bg); border-color: var(--af-caution-line); }
.rar-topic-content .blf-af-out--avoid { background: var(--af-avoid-bg); border-color: var(--af-avoid-line); }
.rar-topic-content .blf-af-tag {
    display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; padding: 3px 10px; border-radius: 6px; margin-bottom: 8px; color: #fff;
}
.rar-topic-content .blf-af-out--safe .blf-af-tag { background: var(--af-safe); }
.rar-topic-content .blf-af-out--caution .blf-af-tag { background: var(--af-caution); }
.rar-topic-content .blf-af-out--avoid .blf-af-tag { background: var(--af-avoid); }
.rar-topic-content .blf-af-out h3 { margin: 0 0 6px; font-size: 15px; color: #111111; }
.rar-topic-content .blf-af-out p { margin: 0 0 8px; font-size: 14px; line-height: 1.5; color: #111111; }
.rar-topic-content .blf-af-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.rar-topic-content .blf-af-pill { font-size: 12px; font-weight: 600; background: #fff; border: 1px solid #ddd; border-radius: 999px; padding: 4px 11px; color: #111111; }
.rar-topic-content .blf-af-hidden { display: none; }
.rar-topic-content .blf-af-reset { border: none; background: none; color: #8a8a8a; font-size: 12px; cursor: pointer; text-decoration: underline; padding: 0; }

/* ---- INT-2 · Resistance overlay (window.BlfEnvelopeOverlay) ---- */
.rar-topic-content .blf-ro {
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(238, 245, 255, 0.9), rgba(255, 255, 255, 0.96));
    border: 1px solid rgba(10, 132, 255, 0.16);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}
.rar-topic-content .blf-ro-fig {
    position: relative;
    width: 100%;
    max-width: 600px;   /* ~two-thirds of the former 900px; viewBox unchanged */
    margin: 0 auto;
}
/* §4 cards are two-way linked to the figure hotspots (see betalactam-resistance-overlay.js). */
.rar-topic-content .blf-res-card { cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease; outline: none; }
.rar-topic-content .blf-res-card.is-linked,
.rar-topic-content .blf-res-card:focus-visible {
    border-color: var(--accent, #0a6cff);
    box-shadow: 0 0 0 2px var(--accent, #0a6cff) inset;
}
.rar-topic-content .blf-ro-svg {
    display: block;
    width: 100%;
    height: auto;
}
/* peptidoglycan reference band — subtle, non-interactive */
.rar-topic-content .blf-ro-band {
    fill: rgba(15, 23, 42, 0.04);
    stroke: rgba(15, 23, 42, 0.14);
    stroke-width: 2;
    stroke-dasharray: 10 8;
    pointer-events: none;
}
/* hotspot groups */
.rar-topic-content .blf-ro-hot { cursor: pointer; outline: none; }
.rar-topic-content .blf-ro-hit { fill: rgba(0, 0, 0, 0.001); stroke: none; }
.rar-topic-content .blf-ro-hl {
    fill: none;
    stroke: var(--accent, #0a6cff);
    stroke-width: 12;
    stroke-linejoin: round;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.rar-topic-content .blf-ro-labelbox {
    fill: none;
    stroke: var(--accent, #0a6cff);
    stroke-width: 5;
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}
.rar-topic-content .blf-ro-hot.is-active .blf-ro-hl,
.rar-topic-content .blf-ro-hot.is-active .blf-ro-labelbox { opacity: 1; }
/* keyboard focus ring on the hit region */
.rar-topic-content .blf-ro-hot:focus-visible .blf-ro-hl { opacity: 0.55; }
/* dim non-active groups when one is active */
.rar-topic-content .blf-ro.has-active .blf-ro-hot:not(.is-active) { opacity: 0.4; }

/* prompt + reset bar */
.rar-topic-content .blf-ro-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.rar-topic-content .blf-ro-prompt { color: var(--text, #111318); font-size: 14px; }
.rar-topic-content .blf-ro-prompt.is-hidden { visibility: hidden; }
.rar-topic-content .blf-ro-reset {
    border: 1px solid rgba(15, 23, 42, 0.18);
    background: #fff;
    color: #111111;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.rar-topic-content .blf-ro-reset:hover { background: rgba(15, 23, 42, 0.04); }

/* reveal panel (below the figure, clear of the right-side labels) */
.rar-topic-content .blf-ro-reveal { margin-top: 12px; min-height: 96px; }
.rar-topic-content .blf-ro-panel { display: none; border-left: 5px solid var(--accent, #0a6cff); padding: 4px 0 4px 14px; }
.rar-topic-content .blf-ro-panel.is-open { display: block; }
.rar-topic-content .blf-ro-panel__title { color: #111111; font-weight: 800; font-size: 15px; margin-bottom: 4px; }
.rar-topic-content .blf-ro-panel__body { color: #111111; font-size: 14px; line-height: 1.55; margin: 0 0 4px; }
.rar-topic-content .blf-ro-panel__bugs { color: #111111; font-size: 13px; line-height: 1.5; margin: 0; font-style: italic; }

/* Closing "this page is the anchor" note in §6. */
.rar-topic-content .blf-links-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(10, 132, 255, 0.06);
    border: 1px solid rgba(10, 132, 255, 0.14);
    color: var(--text, #111318);
    font-size: 14px;
    line-height: 1.55;
}

/* ============================================================
   "Cephalosporins"  (ceph-)  — DRUG-CLASS PAGE TEMPLATE (the
   Penicillins / BLI-Other pages mirror this). Same shared building
   blocks as the foundations page; only page-specific spacing +
   the inline cross-topic link style live here.
   ============================================================ */

/* Section lead paragraph under each <h3>. */
.rar-topic-content .ceph-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}

/* Interactive placeholder mount (filled by later build; note = shared .vasc-tbd). */
.rar-topic-content .ceph-mount {
    margin-top: 14px;
}

/* Inline cross-topic link (renders a <button> as a text link inside prose). */
.rar-topic-content .ceph-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .ceph-xlink:hover,
.rar-topic-content .ceph-xlink:focus-visible {
    color: #0850c4;
}

/* §8 down-link button row. */
.rar-topic-content .ceph-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================================
   "Penicillins"  (pcn-)  — sibling of the cephalosporins drug-class
   template; identical helper styles under a page-specific prefix.
   ============================================================ */
.rar-topic-content .pcn-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .pcn-mount {
    margin-top: 14px;
}
.rar-topic-content .pcn-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .pcn-xlink:hover,
.rar-topic-content .pcn-xlink:focus-visible {
    color: #0850c4;
}
.rar-topic-content .pcn-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================================
   "β-Lactamase Inhibitors & Other Beta-Lactams"  (obl-)  — adapts the
   drug-class template; identical helper styles under its own prefix.
   ============================================================ */
.rar-topic-content .obl-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .obl-mount {
    margin-top: 14px;
}
.rar-topic-content .obl-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .obl-xlink:hover,
.rar-topic-content .obl-xlink:focus-visible {
    color: #0850c4;
}
.rar-topic-content .obl-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================================
   "URTI Antimicrobial Selection" (urti-)  — lens/synthesis page;
   same helper styles under its own prefix.
   ============================================================ */
.rar-topic-content .urti-lead {
    margin: 2px 0 14px;
    color: var(--text, #111318);
    font-size: 15px;
    line-height: 1.6;
}
.rar-topic-content .urti-mount {
    margin-top: 14px;
}
.rar-topic-content .urti-xlink {
    display: inline;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    color: #0a6cff;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}
.rar-topic-content .urti-xlink:hover,
.rar-topic-content .urti-xlink:focus-visible {
    color: #0850c4;
}
.rar-topic-content .urti-links {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
/* "Boards note" — board-standard vs lecture, kept visually secondary. */
.rar-topic-content .urti-boards {
    margin-top: 8px;
    padding: 8px 11px;
    border-left: 3px solid rgba(10, 132, 255, 0.4);
    background: rgba(10, 132, 255, 0.05);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: #111111;
}
/* Small "board / beyond lecture" scope badge (C1/C2). */
.rar-topic-content .blf-board-badge,
.rar-topic-content .obl-board-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b4bb3;
    background: rgba(124, 58, 237, 0.1);
    border: 1px solid rgba(124, 58, 237, 0.28);
    border-radius: 999px;
    padding: 2px 8px;
    vertical-align: middle;
    cursor: help;
}

/* ================================================================
   TB Regimen Selector (window.TbRegimenSelector) → #int-tbrx-selector

   Chrome ONLY for the approved prototype's own parts. The regimen cards
   themselves are kit .mk-card + .mk-hue-* (the coloured left-border comes
   from the .rar-pharm supplement above), and every card title is a kit
   .mk-subhead — nothing here re-rolls a title, a pill, or a callout.
   Accent = the prototype's teal (#0f766e). Reader text #111111.
   ================================================================ */
.rar-topic-content .tbrx { color: #111111; --tbrx-accent: #0f766e; --tbrx-accent-soft: #e6f2f0; }
.rar-topic-content .tbrx-help { font-size: 13px; color: #4a4a4a; margin: 0 0 14px; }

/* --- scenario buttons --- */
.rar-topic-content .tbrx-scenarios {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px;
}
@media (max-width: 640px) { .rar-topic-content .tbrx-scenarios { grid-template-columns: repeat(2, 1fr); } }
.rar-topic-content .tbrx-scn {
    border: 1.5px solid #e4e7ea; background: #fff; color: #111111; border-radius: 12px;
    padding: 14px 12px; text-align: left; cursor: pointer; font: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.rar-topic-content .tbrx-scn:hover { border-color: var(--tbrx-accent); background: var(--tbrx-accent-soft); }
.rar-topic-content .tbrx-scn:focus-visible { outline: 3px solid var(--tbrx-accent); outline-offset: 2px; }
.rar-topic-content .tbrx-scn[aria-pressed="true"] {
    border-color: var(--tbrx-accent); background: var(--tbrx-accent); color: #fff;
    box-shadow: 0 4px 14px rgba(15, 118, 110, 0.25);
}
/* button label — sized on the kit's block-title step (18px/800), never body size */
.rar-topic-content .tbrx-scn__k { display: block; font-size: 18px; font-weight: 800; line-height: 1.15; color: inherit; }
.rar-topic-content .tbrx-scn__s { display: block; font-size: 12px; opacity: 0.8; margin-top: 4px; color: inherit; }

/* --- panel --- */
.rar-topic-content .tbrx-panel {
    border: 1px solid #e4e7ea; border-radius: 16px; padding: 18px; background: #fff;
}
.rar-topic-content .tbrx-h.tbrx-h { margin: 0 0 4px; }
.rar-topic-content .tbrx-why { font-size: 13.5px; color: #4a4a4a; margin: 0 0 16px; }
.rar-topic-content .tbrx-empty { color: #8a8a8a; font-size: 14px; text-align: center; padding: 24px 0; margin: 0; }

/* --- sub-picker (Intolerance) --- */
.rar-topic-content .tbrx-subpick { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 16px; }
.rar-topic-content .tbrx-subpick button {
    border: 1.5px solid #d5dadf; background: #eef1f3; color: #111111; border-radius: 999px;
    padding: 7px 14px; font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.rar-topic-content .tbrx-subpick button:hover { border-color: var(--tbrx-accent); }
.rar-topic-content .tbrx-subpick button:focus-visible { outline: 3px solid var(--tbrx-accent); outline-offset: 2px; }
.rar-topic-content .tbrx-subpick button[aria-pressed="true"] {
    background: var(--tbrx-accent); color: #fff; border-color: var(--tbrx-accent);
}

/* --- regimen card internals (the card itself is .mk-card .mk-hue-*) --- */
.rar-topic-content .tbrx-rcard { margin: 0 0 12px; }
.rar-topic-content .tbrx-rcard:last-child { margin-bottom: 0; }
.rar-topic-content .tbrx-rt { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.rar-topic-content .tbrx-rname.tbrx-rname { margin: 0; }
.rar-topic-content .tbrx-meta { font-size: 12.5px; color: #5b6168; font-weight: 600; }
.rar-topic-content .tbrx-badge {
    font-size: 11px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
    padding: 3px 8px; border-radius: 6px; background: var(--tbrx-accent); color: #fff;
}
.rar-topic-content .tbrx-badge--alt { background: #eef1f3; color: #5b6168; }
.rar-topic-content .tbrx-freq {
    display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
    text-transform: uppercase; background: #eef1f3; color: #5b6168; border-radius: 6px; padding: 3px 8px;
}
.rar-topic-content .tbrx-freq--wk { background: var(--tbrx-accent-soft); color: var(--tbrx-accent); }

/* --- drug row (chips are kit .mk-pill .cav-term — not restyled here) --- */
.rar-topic-content .tbrx-drugs { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; margin: 2px 0 8px; }
.rar-topic-content .tbrx-plus { color: #5b6168; font-weight: 800; font-size: 14px; }

/* --- notes --- */
.rar-topic-content .tbrx-note {
    font-size: 13px; line-height: 1.5; color: #111111; background: #fff;
    border: 1px dashed #d5dadf; border-radius: 8px; padding: 9px 11px; margin-top: 8px;
}
.rar-topic-content .tbrx-note--warn {
    border-color: #eccb9a; border-style: solid; background: #fdf3e7; color: #b45309; font-weight: 600;
}

/* --- phase strip --- */
.rar-topic-content .tbrx-phase {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 13px; font-weight: 700; margin: 4px 0 16px;
}
.rar-topic-content .tbrx-phase__seg { background: var(--tbrx-accent-soft); color: #111111; border-radius: 999px; padding: 6px 13px; }
.rar-topic-content .tbrx-phase__arw { color: #5b6168; font-weight: 800; }
.rar-topic-content .tbrx-phase__tot { color: var(--tbrx-accent); font-weight: 800; }

/* --- decode-key strip --- */
.rar-topic-content .tbrx-decode {
    font-size: 13.5px; background: var(--tbrx-accent-soft); border-radius: 10px;
    padding: 11px 14px; margin: 0 0 16px; color: #111111; line-height: 1.5;
}
.rar-topic-content .tbrx-decode b { color: var(--tbrx-accent); }

/* --- shorthand code chip (3HP / 4R / 3HR / 9H) — NOT a drug, so NOT a pill.
       .cav-term drives the portaled decode tooltip; neutralize its ink/underline
       so the dark chip reads as designed. --- */
.rar-topic-content .tbrx-code.cav-term {
    display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px; font-weight: 800; background: #111111; color: #fff;
    border-radius: 6px; padding: 3px 8px; cursor: help; text-decoration: none; border-bottom: 0;
}
.rar-topic-content .tbrx-code.cav-term:hover,
.rar-topic-content .tbrx-code.cav-term:focus-visible { background: var(--tbrx-accent); }

/* --- CYP/rifabutin principle banner --- */
.rar-topic-content .tbrx-principle {
    display: flex; gap: 10px; align-items: flex-start; background: #fdf3e7;
    border: 1px solid #eccb9a; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.rar-topic-content .tbrx-principle__ic { font-size: 18px; line-height: 1.2; }
.rar-topic-content .tbrx-principle__tx { font-size: 13.5px; color: #b45309; font-weight: 600; }
