/* ---------------------------------------------------------------------------
   COMPACT RECORD PAGES, October 2026 (Arnold: "the page is too long, plain and
   simple"). render_supp_compact.py marks <main> with .ebl-compact on every /s/,
   /p/, /devices/ and /rx/ page and writes the folds and menus styled here. Everything is keyed to
   main.ebl-compact so no other page changes. No new color: tokens only.
   Every size here is 14px or more (the October 2026 reading floor, G226).
   --------------------------------------------------------------------------- */
main.ebl-compact .ebl-room:not(.ebl-hero):not(.ebl-hub-open) { padding-top: 2.25rem; padding-bottom: 2.25rem; }
main.ebl-compact .ebl-sp-r1 { min-height: 0; padding-top: 1.5rem; padding-bottom: 1.5rem; }
main.ebl-compact .ebl-sp-state { min-height: 0; }
main.ebl-compact .ebl-sp-state-t { font-size: clamp(1.25rem, 1vw + .9rem, 1.75rem); }
main.ebl-compact [data-ebl-usegrades] { margin-top: 0; }
main.ebl-compact > div, main.ebl-compact > details, main.ebl-compact > section:not(.ebl-room) { margin-top: 2rem; }

/* the menu under the title */
main.ebl-compact .ebl-cx-jump { display: flex; flex-wrap: wrap; gap: .5rem; }

/* use cards side by side */
main.ebl-compact .ebl-cx-cards { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 900px) { main.ebl-compact .ebl-cx-cards { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); } }
main.ebl-compact .ebl-cx-cards > div { display: flex; flex-direction: column; }
main.ebl-compact .ebl-cx-cards .ebl-cx-trials { margin-top: auto; }

/* folds */
main.ebl-compact .ebl-cx-fold { margin-top: .9rem; border: 1px solid var(--line); border-radius: 12px; }
main.ebl-compact .ebl-cx-sum { display: flex; align-items: baseline; gap: .75rem; padding: .75rem 1rem; cursor: pointer; list-style: none; }
main.ebl-compact .ebl-cx-sum::-webkit-details-marker { display: none; }
main.ebl-compact .ebl-cx-sum::after { content: "+"; margin-left: auto; flex: none; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 17px; line-height: 1; color: var(--lime); }
main.ebl-compact .ebl-cx-fold[open] > .ebl-cx-sum::after { content: "\2212"; }
main.ebl-compact .ebl-cx-t { flex: none; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
main.ebl-compact .ebl-cx-s { font-size: 15px; color: var(--ink-1); }
main.ebl-compact .ebl-cx-sum:hover .ebl-cx-t { text-decoration: underline; }
main.ebl-compact .ebl-cx-b { padding: 0 1rem 1rem; }
main.ebl-compact .ebl-cx-b > *:first-child { margin-top: 0 !important; }
/* a folded block's own heading repeats the fold title; hide it, keep the bytes */
main.ebl-compact .ebl-cx-b > [data-ebl-grade-basis] > .font-mono:first-child,
main.ebl-compact .ebl-cx-b > [data-ebl-why-persists] > .font-mono:first-child,
main.ebl-compact .ebl-cx-b > [data-ebl-preclinical] > .font-mono:first-child,
main.ebl-compact [data-ebl-cx="evidence"] .ebl-cx-b > div > .eyebrow:first-child { display: none; }
main.ebl-compact .ebl-cx-b > [data-ebl-grade-basis],
main.ebl-compact .ebl-cx-b > [data-ebl-why-persists],
main.ebl-compact .ebl-cx-b > [data-ebl-preclinical] { border: 0 !important; padding: 0 !important; margin-top: 0 !important; }
@media (max-width: 639px) { main.ebl-compact .ebl-cx-sum { flex-wrap: wrap; } main.ebl-compact .ebl-cx-s { flex-basis: 100%; order: 2; } }

/* the menu in the left column, which stays on screen while the middle scrolls */
@media (min-width: 768px) { main.ebl-compact .ebl-cx-side { position: sticky; top: 104px; align-self: start; } }
main.ebl-compact .ebl-cx-side-nav { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
main.ebl-compact .ebl-cx-side-h { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: .5rem; }
main.ebl-compact .ebl-cx-side-nav a { display: block; font-size: 15px; color: var(--ink-1); padding: .3rem 0 .3rem .75rem; border-left: 2px solid var(--line); }
main.ebl-compact .ebl-cx-side-nav a:hover { color: var(--lime); border-left-color: var(--lime); }
@media (max-width: 767px) { main.ebl-compact .ebl-cx-side-nav { display: none; } }
/* protocol, device and Rx pages (October 2026): the folded block's own heading
   repeats the fold title. Hidden, not removed. */
main.ebl-compact [data-ebl-cx="history"] > .ebl-cx-b > div > :first-child,
main.ebl-compact [data-ebl-cx="as-studied"] > .ebl-cx-b > div > :first-child,
main.ebl-compact [data-ebl-cx="evidence-full"] > .ebl-cx-b > div > :first-child,
main.ebl-compact [data-ebl-cx="byuse"] > .ebl-cx-b > div > :first-child,
main.ebl-compact [data-ebl-cx="human-evidence"] > .ebl-cx-b > div > :first-child { display: none; }
main.ebl-compact [data-ebl-cx] > .ebl-cx-b > [data-ebl-grade-history],
main.ebl-compact [data-ebl-cx] > .ebl-cx-b > [data-ebl-as-studied="1"],
main.ebl-compact [data-ebl-cx] > .ebl-cx-b > .card { border: 0 !important; padding: 0 !important; margin-top: 0 !important; background: transparent !important; }

/* the "On this page" menu as chips, on every compacted page (the /s/ chip
   rules in styles.css are keyed to supplement pages only) */
main.ebl-compact .ebl-cx-jump { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1.1rem 0 .4rem; }
main.ebl-compact .ebl-cx-jump a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 1rem; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14.5px; color: var(--ink-1); text-decoration: none; }
main.ebl-compact .ebl-cx-jump a:hover { border-color: var(--lime); color: var(--lime); }
