/* =========================================================================
   Lotus Athlete: Peptide Library (body map index + evidence-graded entries)
   ========================================================================= */
.library-page { --bar-h: 58px; --st-approved: #4cc3b2; --st-trials: #f0a84a; --st-unapproved: #ef7fb4; }
.library-page main { min-height: 70vh; }

/* ---------- library bar ---------- */
.lib-bar { position: sticky; top: var(--header-h); z-index: 40; background: rgba(5, 13, 28, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.lib-bar-inner { max-width: 1440px; margin: 0 auto; height: var(--bar-h); padding: 0 28px; display: flex; align-items: center; gap: 22px; }
.lib-title { flex: none; font: 600 22px/1 var(--font-display); color: var(--text); }
.lib-chips { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.lib-chips::-webkit-scrollbar { display: none; }
.lib-chips button { flex: none; padding: 7px 12px; border: 1px solid transparent; border-radius: 999px; background: none; font: 500 13px var(--font-body); color: var(--muted); transition: background .2s, color .2s, border-color .2s; }
.lib-chips button span { color: var(--faint); font-weight: 400; margin-left: 2px; }
.lib-chips button:hover { color: var(--text); }
.lib-chips button.is-on { background: var(--surface); border-color: var(--line-2); color: var(--text); box-shadow: 0 4px 14px -8px rgba(0, 0, 0, 0.70); }
.lib-search { flex: none; width: 260px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 40px; border-radius: 12px; background: rgba(150, 185, 230, .08); border: 1px solid transparent; transition: border-color .2s, background .2s; }
.lib-search:focus-within { background: var(--surface); border-color: var(--line-2); }
.lib-search svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--faint); stroke-width: 1.8; }
.lib-search input { flex: 1; min-width: 0; border: 0; background: none; font: 400 16px var(--font-body); color: var(--text); outline: none; }

/* ---------- index: intro | body | list ---------- */
.lib-index { max-width: 1440px; margin: 0 auto; padding: 0 28px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); gap: 32px; }
.lib-intro, .lib-body { position: sticky; top: calc(var(--header-h) + var(--bar-h)); height: calc(100vh - var(--header-h) - var(--bar-h)); }
.lib-intro { display: flex; flex-direction: column; justify-content: center; padding: 30px 0; }
.lib-intro .eyebrow { margin-bottom: 18px; }
.lib-intro h1 { font: 500 clamp(36px, 3.6vw, 54px)/1.04 var(--font-display); letter-spacing: -.01em; color: var(--text); }
.lib-intro h1 em { font-style: italic; background: linear-gradient(100deg, var(--teal), var(--sky)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lib-intro p.lede { margin: 18px 0 0; max-width: 380px; font-size: 15.5px; color: var(--muted); }
.lib-legend { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, max-content); gap: 10px 22px; font: 400 12px var(--font-body); color: var(--muted); }
.lib-legend li { display: flex; align-items: center; gap: 8px; }
.sdot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 18%, transparent); }
.st-approved { --c: var(--st-approved); } .st-trials { --c: var(--st-trials); } .st-unapproved { --c: var(--st-unapproved); }

/* body figure */
.lib-body { display: flex; flex-direction: column; }
.body-frame { position: relative; flex: 1; min-height: 0; overflow: hidden; display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse 58% 46% at 50% 46%, rgba(76, 195, 178, .14), rgba(76, 195, 178, 0) 100%); }
.figure { position: relative; height: min(88%, 700px); aspect-ratio: 448 / 1300; }
.stage { --z: 1; position: absolute; inset: 0; transition: transform .8s cubic-bezier(.22, .8, .2, 1); will-change: transform; }
.fig-img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(0, 0, 0, 0.35)); user-select: none; -webkit-user-drag: none; }
.fig-glow { display: none; position: absolute; left: -70%; right: -70%; top: 2%; bottom: 6%; border-radius: 50%; background: radial-gradient(closest-side, rgba(76, 195, 178, .16), rgba(76, 195, 178, 0)); transition: opacity .6s; }
.fig-floor { position: absolute; left: 10%; right: 10%; bottom: -1%; height: 2.4%; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, 0.48), rgba(0, 0, 0, 0.00)); }
/* the glow over the chosen body region */
.rglow { position: absolute; z-index: 2; width: 46%; aspect-ratio: 1.2; transform: translate(-50%, -50%) scale(.6); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--c, #c4627a) 40%, transparent), color-mix(in srgb, var(--c, #c4627a) 14%, transparent) 55%, transparent); opacity: 0; pointer-events: none; mix-blend-mode: multiply; transition: opacity .5s, transform .8s cubic-bezier(.22, .8, .2, 1); }
.rglow.is-on { opacity: 1; transform: translate(-50%, -50%) scale(1); animation: breathe 3.2s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: .62; } }
/* hotspots stay the same size on screen while the stage zooms */
.spot { position: absolute; z-index: 3; transform: translate(-50%, -50%) scale(calc(1 / var(--z))); transition: transform .8s cubic-bezier(.22, .8, .2, 1); width: 34px; height: 34px; border: 0; padding: 0; background: none; border-radius: 50%; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.spot i { width: 11px; height: 11px; border-radius: 50%; background: var(--c, var(--teal)); border: 2px solid var(--bg); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c, var(--teal)) 20%, transparent), 0 0 14px color-mix(in srgb, var(--c, var(--teal)) 50%, transparent); transition: transform .3s; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--c, var(--teal)) 55%, transparent); opacity: 0; transform: scale(.4); animation: ping 2.6s ease-out infinite; }
.spot:nth-of-type(2n)::before { animation-delay: 1.3s; }
.spot:hover i, .spot.is-on i, .spot.is-sel i { transform: scale(1.3); }
.spot b { position: absolute; left: calc(100% + 2px); top: 50%; transform: translate(-6px, -50%); width: max-content; line-height: 1.25; text-align: center; padding: 5px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.70); font: 500 11.5px var(--font-body); color: var(--text); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.spot.left b { left: auto; right: calc(100% + 2px); transform: translate(6px, -50%); }
.spot:hover b, .spot:focus-visible b, .spot.is-sel b, .lib-index:not(.is-zoomed) .spot.is-on b { opacity: 1; transform: translate(0, -50%); }
.is-zoomed .spot:not(.is-sel) i { opacity: .55; }
.spot.is-dim i { opacity: .35; box-shadow: none; }
@keyframes ping { 0% { opacity: .9; transform: scale(.4); } 100% { opacity: 0; transform: scale(1.6); } }

/* list of systems */
.lib-list { padding: 26px 0 72px; }
.sys { scroll-margin-top: calc(var(--header-h) + var(--bar-h) + 16px); }
.sys + .sys { margin-top: 56px; }
.sys h2 { margin: 0 0 18px; font: 500 30px/1.1 var(--font-display); color: var(--text); }
.sys h2 span { color: var(--faint); font-weight: 500; }
.sys > p { margin: -8px 0 18px; font-size: 14px; color: var(--muted); max-width: 520px; }
.lib-empty { padding: 60px 0; text-align: center; color: var(--faint); }

/* ---------- 3D glass slabs ---------- */
.slabs { list-style: none; margin: 0; padding: 0; display: grid; gap: 30px; }
.slabs li { perspective: 720px; }
.slab { --c: var(--st-unapproved); --d: 44px; position: relative; display: block; height: 92px; transform-style: preserve-3d; transition: transform .35s cubic-bezier(.2, .7, .2, 1); color: var(--text); }
.slab:hover, .slab:focus-visible { transform: translateZ(26px); }
.slab-front, .slab-top, .slab-bottom { position: absolute; left: 0; right: 0; }
.slab-front { inset: 0; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); background: var(--surface); border: 1px solid color-mix(in srgb, var(--c) 18%, var(--line)); overflow: hidden; }
.slab-top, .slab-bottom { height: var(--d); background: linear-gradient(180deg, color-mix(in srgb, var(--c) 22%, var(--surface)), color-mix(in srgb, var(--c) 8%, var(--surface))); border: 1px solid color-mix(in srgb, var(--c) 16%, transparent); }
.slab-top { top: 0; transform-origin: top; transform: rotateX(-90deg); }
.slab-bottom { bottom: 0; transform-origin: bottom; transform: rotateX(90deg); background: linear-gradient(0deg, color-mix(in srgb, var(--c) 26%, var(--surface)), color-mix(in srgb, var(--c) 10%, var(--surface))); }
.slab-art { position: relative; overflow: hidden; background: linear-gradient(110deg, color-mix(in srgb, var(--c) 12%, var(--surface)), var(--surface) 80%); }
.slab-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.slab-info { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 0 18px; border-left: 3px solid var(--c); }
.slab-info b { font: 500 19px/1.15 var(--font-display); }
.slab-info small { font: 400 11.5px var(--font-body); color: var(--faint); }
.slab.is-hidden { display: none; }

/* ---------- entry (detail) ---------- */
.entry { max-width: 1240px; margin: 0 auto; padding: 36px 28px 40px 56px; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 64px; align-items: start; }
.spec-wrap { position: sticky; top: calc(var(--header-h) + var(--bar-h) + 24px); }
.spec { --c: var(--st-unapproved); border-radius: 6px; background: var(--surface); box-shadow: 0 1px 0 var(--line), 0 30px 60px -28px rgba(150, 185, 230, .5); overflow: hidden; }
.spec-art { position: relative; aspect-ratio: 1 / 1.05; background: linear-gradient(160deg, color-mix(in srgb, var(--c) 14%, var(--surface)), var(--surface) 75%); border-bottom: 4px solid var(--c); }
.spec-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.spec-body { padding: 18px 20px 22px; }
.spec-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font: 500 11.5px var(--font-body); color: var(--muted); }
.spec-row span { display: inline-flex; align-items: center; gap: 8px; }
.spec h1 { margin: 22px 0 6px; font: 500 clamp(40px, 4vw, 54px)/1 var(--font-display); letter-spacing: -.01em; color: var(--text); overflow-wrap: anywhere; }
.spec .aka { margin: 0; font-size: 12px; color: var(--faint); }
.spec dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0 0; }
.spec dt { font: 400 10.5px var(--font-body); color: var(--faint); }
.spec dd { margin: 2px 0 0; font: 500 12.5px/1.35 var(--font-body); color: var(--text); }
.spec-shop { margin-top: 16px; display: grid; gap: 8px; }
.shop-mini { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); transition: border-color .2s; }
.shop-mini:hover { border-color: var(--teal); }
.shop-mini img { width: 38px; height: 38px; border-radius: 8px; object-fit: contain; background: var(--surface)fff; }
.shop-mini div { flex: 1; min-width: 0; }
.shop-mini b { display: block; font: 500 13.5px var(--font-display); }
.shop-mini small { font-size: 11.5px; color: var(--faint); }
.shop-mini strong { font: 500 15px var(--font-display); color: var(--teal); }
.spec-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 13px; }
.spec-links a { color: var(--teal); }

/* reading rail */
.rail { position: fixed; left: 18px; top: 50%; transform: translateY(-50%); z-index: 20; display: flex; flex-direction: column; gap: 9px; }
.rail button { width: 12px; height: 2px; padding: 0; border: 0; background: var(--line-2); border-radius: 2px; transition: width .25s, background .25s; }
.rail button.is-on { width: 24px; background: var(--text); }
.rail button:hover { background: var(--teal); }

/* article */
.art { max-width: 760px; min-width: 0; }
.crumbs-lib { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; font: 400 12px var(--font-body); color: var(--faint); }
.crumbs-lib a:hover { color: var(--text); }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 28px; position: sticky; top: calc(var(--header-h) + var(--bar-h)); z-index: 5; background: var(--bg); padding-top: 6px; }
.tabs button { padding: 14px 0 12px; border: 0; background: none; font: 500 14px var(--font-body); color: var(--faint); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.is-on { color: var(--text); border-color: var(--text); }
.art .lede { font-size: 17px; color: var(--muted); margin: 0 0 18px; }
.e-meta { display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 0 0 28px; font-size: 12.5px; color: var(--faint); }
.e-meta b { display: block; font-weight: 500; color: var(--text); }
.takeaway { padding: 20px 22px; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); }
.takeaway .k { margin: 0 0 8px; font: 500 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.takeaway p:last-child { margin: 0; }
.art h2 { margin: 52px 0 16px; font: 500 30px/1.15 var(--font-display); color: var(--text); scroll-margin-top: calc(var(--header-h) + var(--bar-h) + 70px); }
.art p { margin: 0 0 16px; font-size: 15.5px; line-height: 1.75; color: #c3d0e2; }
.art ul.dots { margin: 0 0 16px; padding-left: 20px; font-size: 15.5px; line-height: 1.7; color: #c3d0e2; }
.art ul.dots li + li { margin-top: 8px; }
.glance { width: 100%; border-collapse: collapse; border: 1px solid var(--line-2); font-size: 14px; background: var(--surface); }
.glance td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; color: #c3d0e2; }
.glance td:first-child { width: 32%; color: var(--muted); }
.glance tr:first-child td { border-top: 0; }
.cmp-wrap { overflow-x: auto; margin: 6px 0 18px; }
.cmp { width: 100%; min-width: 480px; border-collapse: collapse; font-size: 14px; background: var(--surface); border: 1px solid var(--line-2); }
.cmp th { text-align: left; padding: 12px 14px; font: 500 12px var(--font-body); color: var(--muted); background: var(--bg-2); }
.cmp td { padding: 12px 14px; border-top: 1px solid var(--line); vertical-align: top; color: #c3d0e2; }
.cites-sup { font: 500 10.5px var(--font-body); color: var(--faint); line-height: 0; margin-left: 1px; }
.cite { display: inline; padding: 0 1px; border: 0; background: none; font: inherit; color: var(--teal); cursor: pointer; }
.cite:hover { text-decoration: underline; }
.women { margin: 8px 0 0; padding: 20px 22px; border-radius: var(--radius); background: linear-gradient(135deg, rgba(76, 195, 178, .08), rgba(29, 69, 150, .14)); border: 1px solid rgba(76, 195, 178, .25); }
.women p:last-child { margin-bottom: 0; }
.status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.status-grid div { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; }
.status-grid span { display: block; font-size: 12px; color: var(--faint); margin-bottom: 4px; }
.status-grid b { font-weight: 500; font-size: 14.5px; color: var(--text); }
.meter { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 10px; }
.meter i { height: 6px; border-radius: 3px; background: var(--line-2); }
.meter i.on { background: linear-gradient(90deg, var(--teal), var(--sky)); }
.meter-lab { display: flex; justify-content: space-between; font: 400 11px var(--font-mono); color: var(--faint); margin-bottom: 16px; }
.ev-big { font: 500 26px var(--font-display); color: var(--text); margin: 0 0 6px; }
.e-faq details { border-top: 1px solid var(--line); }
.e-faq details:last-child { border-bottom: 1px solid var(--line); }
.e-faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 0; font: 500 16px var(--font-display); color: var(--text); }
.e-faq summary::-webkit-details-marker { display: none; }
.e-faq summary::after { content: "+"; flex: none; font: 300 22px/1 var(--font-display); color: var(--faint); transition: transform .25s; }
.e-faq details[open] summary::after { transform: rotate(45deg); }
.e-faq details p { margin: -4px 0 18px; }
.more { margin-top: 56px; }
.more .slabs { margin-top: 18px; }
.sources-note { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12.5px !important; color: var(--faint) !important; }
.cites { margin: 0; padding-left: 0; list-style: none; counter-reset: c; }
.cites li { counter-increment: c; position: relative; padding: 14px 0 14px 40px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.55; color: #c3d0e2; transition: background .4s; }
.cites li::before { content: counter(c); position: absolute; left: 6px; top: 14px; font: 500 12px var(--font-mono); color: var(--faint); }
.cites li.flash { background: var(--teal-glow); }
.cites a { color: var(--teal); word-break: break-word; }
.back-guide { margin: 0 0 18px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font: 500 12.5px var(--font-body); color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .lib-index { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
  .lib-intro { position: static; height: auto; grid-column: 1 / -1; padding: 30px 0 0; }
  .lib-intro .lib-legend { margin-top: 22px; }
  .entry { grid-template-columns: 300px minmax(0, 1fr); gap: 44px; }
}
@media (max-width: 900px) {
  .lib-search { width: 200px; }
  .lib-title { display: none; }
  .entry { grid-template-columns: minmax(0, 1fr); padding: 22px 20px 30px; gap: 28px; }
  .spec-wrap { position: static; }
  .spec { display: grid; grid-template-columns: 38% minmax(0, 1fr); }
  .spec-art { aspect-ratio: auto; border-bottom: 0; border-right: 4px solid var(--c); }
  .spec h1 { margin-top: 14px; font-size: 38px; }
  .rail { display: none; }
}
@media (max-width: 760px) {
  .library-page { --bar-h: 56px; }
  .lib-bar-inner { padding: 0 16px; gap: 10px; }
  .lib-search { display: none; }
  .lib-index { grid-template-columns: minmax(0, 1fr); padding: 0 16px; gap: 0; }
  .lib-intro { padding-top: 26px; }
  .lib-body { position: static; height: 360px; margin-top: 10px; }
  .figure { height: 100%; }
  .lib-list { padding-top: 0; }
  .slab { height: 80px; }
  .slab-info b { font-size: 17px; }
  .slab-info { padding: 0 14px; }
  .sys h2 { font-size: 26px; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .spec-art { aspect-ratio: 16 / 7; border-right: 0; border-bottom: 4px solid var(--c); }
  .art h2 { font-size: 26px; margin-top: 42px; }
  .status-grid { grid-template-columns: 1fr; }
  .glance td { padding: 12px; }
  .glance td:first-child { width: 38%; }
}

/* the site-wide icon rule (svg { stroke: currentColor }) must not touch the figure or the artwork */
.slab-art svg, .spec-art svg { width: 100%; height: 100%; stroke: none; stroke-width: 1; }
.glance { min-width: 0; table-layout: fixed; } .glance td { overflow-wrap: anywhere; }

/* body controls */
.zoom-out { position: absolute; top: 14px; left: 0; z-index: 5; display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px 8px 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, 0.70); font: 500 12.5px var(--font-body); color: var(--text); }
.zoom-out svg { width: 15px; height: 15px; }
.body-hint { position: absolute; bottom: 10px; left: 0; right: 0; margin: 0; text-align: center; font: 400 12px var(--font-body); color: var(--faint); pointer-events: none; }
.connector { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 30; pointer-events: none; opacity: 0; transition: opacity .3s; }
.connector.on { opacity: 1; }
.connector path { fill: none; stroke: rgba(150, 185, 230, .5); stroke-width: 1; }


@media (max-width: 1180px) and (min-width: 761px) {
  .lib-body { top: calc(var(--header-h) + var(--bar-h)); }
}
@media (max-width: 760px) {
  .lib-body { height: auto !important; }
  .body-frame { flex: none; height: min(64vh, 470px); border-radius: var(--radius); background: radial-gradient(ellipse at 50% 40%, rgba(76, 195, 178, .08), rgba(29, 69, 150, .08)); border: 1px solid var(--line); }
  .figure { height: 92%; }
  .zoom-out { top: 12px; left: 12px; }
  .body-hint { display: none; }
  .spot b { font-size: 11px; }
}
.zoom-out[hidden], .body-hint[hidden] { display: none; }

/* ---------- whole-body modes: skin glows at the outline, bones tint the whole body ---------- */
.fig-tint { position: absolute; inset: 0; z-index: 2; background: rgb(196, 98, 122); -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; opacity: 0; mix-blend-mode: multiply; pointer-events: none; transition: opacity .6s; }
.stage[data-mode="tint"] .fig-tint { opacity: .26; }
.fig-img { transition: filter .6s; }
.stage[data-mode="outline"] .fig-img { filter: drop-shadow(0 0 1.2px rgba(196, 98, 122, .95)) drop-shadow(0 0 9px rgba(196, 98, 122, .5)); }
.lib-search.in-body { display: none; }

/* ---------- footer (the library page doesn't load tools.css) ---------- */
.lib-foot { text-align: center; padding: 44px 20px 52px; border-top: 1px solid var(--line); }
.lib-foot img { width: 54px; margin: 0 auto 12px; }
.lib-foot .signoff-name { margin: 0; font: 300 22px/1 var(--font-display); letter-spacing: .32em; color: var(--text); }
.lib-foot .signoff-name b { font-weight: 500; color: var(--teal); }
.lib-foot .signoff-tag { margin: 12px 0 0; color: var(--muted); }
.lib-foot .fine { max-width: 620px; margin: 14px auto 10px; }
.lib-foot .signoff-meta { margin: 0; font-size: 13px; color: var(--faint); }

/* ---------- phones: body + search pinned under the chips, list scrolls underneath ---------- */
@media (max-width: 760px) {
  .lib-index { --body-h: clamp(220px, 33svh, 300px); }
  .lib-intro { padding-bottom: 14px; }
  .lib-body { position: sticky !important; top: calc(var(--header-h) + var(--bar-h)); z-index: 20; height: auto !important; margin: 0 -16px; padding: 4px 16px 10px; background: var(--bg); }
  .lib-body::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 22px; background: linear-gradient(var(--bg), rgba(5, 13, 28, 0)); pointer-events: none; }
  .body-frame { flex: none; height: var(--body-h); border: 0; border-radius: 0; background: radial-gradient(ellipse 60% 55% at 50% 50%, rgba(76, 195, 178, .12), rgba(76, 195, 178, 0)); }
  .figure { height: 94%; }
  .zoom-out, .body-hint { display: none !important; }
  .lib-search.in-body { display: flex; width: auto; height: 44px; margin-top: 6px; background: rgba(150, 185, 230, .09); }
  .lib-list { padding: 22px 0 32px; }
  .sys + .sys { margin-top: 40px; }
  .lib-foot { padding: 36px 20px 44px; }
}
.sys h2 .sdot { display: inline-block; width: 9px; height: 9px; margin: 0 12px 0 2px; vertical-align: middle; position: relative; top: -3px; }

/* ---------- phones: tighter first screens ---------- */
@media (max-width: 760px) {
  .lib-intro { padding-top: 20px; }
  .lib-intro .eyebrow { margin-bottom: 12px; }
  .lib-intro h1 { font-size: 34px; }
  .lib-intro p.lede { margin-top: 12px; font-size: 15px; }
  .lib-intro .lib-legend { display: none; } /* the chips above already list every system */
  .entry { padding-top: 16px; gap: 20px; }
  .spec-art { aspect-ratio: auto; height: 84px; }
  .spec-body { padding: 14px 16px 16px; }
  .spec h1 { margin-top: 10px; font-size: 34px; }
  .spec dl { margin-top: 14px; }
  .spec-shop { margin-top: 10px; }
  .crumbs-lib { margin-bottom: 8px; }
  .tabs { margin-bottom: 20px; }
  .takeaway { padding: 16px 18px; }
}

/* ---------- small and short phones ---------- */
@media (max-width: 760px) {
  .lib-chips button { padding: 9px 13px; }
  .spot b { border-radius: 12px; }
}
@media (max-width: 760px) and (max-height: 720px) {
  .lib-index { --body-h: clamp(150px, 27svh, 230px); }
  .lib-search.in-body { height: 40px; margin-top: 4px; }
  .lib-body { padding-bottom: 8px; }
  .spec-art, .crumbs-lib { display: none; }
  .spec h1 { margin-top: 8px; }
}
.spec-na { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px dashed var(--line-2); font-size: 13px; color: var(--muted); }
.spec-links:empty { display: none; }
.status-grid.one { grid-template-columns: 1fr; }
.slab-info { min-width: 0; }
.slab-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-foot .signoff-name { padding-left: .32em; }
