/* Compound library. Neutral labels deliberately avoid clinical grade colors. */
.peptide-library { padding: clamp(1.1rem,3vw,2.7rem); scroll-margin-top: 2rem; background: linear-gradient(145deg,#15281f,#101e19 65%); }
.peptide-library [hidden] { display: none !important; }
.peptide-library-intro { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,1fr); gap: clamp(1.5rem,4vw,4rem); align-items: center; }
.peptide-library h2 { font: 400 clamp(2.3rem,4vw,4rem)/1.05 Georgia,serif; letter-spacing: -.04em; margin: 1rem 0; }
.peptide-library-intro p { max-width: 64ch; }
.peptide-import-label { display: inline-block; font-size: .78rem; padding: .4rem .7rem; border: 1px solid #7c7957; border-radius: 3px; color: #ded6ad; }
.peptide-coverage { margin: 0; padding: clamp(1.1rem,2.5vw,2rem); background: #ececdd; color: #182e25; border-radius: 4px; }
.peptide-coverage figcaption { font-family: Georgia,serif; font-size: 1.5rem; }
.peptide-coverage > p { font-size: .75rem; margin-bottom: 0; }
.peptide-counts { display: flex; gap: 2rem; margin-block: 1.1rem; font-size: .75rem; }
.peptide-counts strong { display: block; font: 400 2.5rem/1.1 Georgia,serif; }
.peptide-coverage-button { display: block; width: 100%; border: 0; padding: .65rem 0; color: #182e25; background: transparent; text-align: left; cursor: pointer; font: inherit; font-size: .8rem; }
.peptide-coverage-button[aria-pressed="true"] { font-weight: 750; }
.peptide-coverage-button > span:first-child { display: flex; justify-content: space-between; gap: 1rem; }
.peptide-coverage-track { display: block; margin-top: .4rem; background: #d5d9ca; height: 6px; }
.peptide-coverage-track > span { display: block; height: 100%; background: #376b53; }
.peptide-coverage-button:focus-visible { outline: 2px solid #166b55; outline-offset: 4px; }
.peptide-import-guide { margin-block: 2rem; border-block: 1px solid var(--line); padding-block: 1rem; }
.peptide-import-guide summary { cursor: pointer; font-weight: 650; }
.peptide-import-guide p { max-width: 95ch; font-size: .88rem; color: var(--muted); }
.peptide-library-links { display: flex; gap: .75rem 1.4rem; flex-wrap: wrap; font-size: .85rem; }
.peptide-controls { display: grid; gap: 1rem; grid-template-columns: repeat(4,minmax(0,1fr)); }
.peptide-search-field { grid-column: span 3; }
.peptide-controls label { display: block; min-width: 0; font-size: .78rem; font-weight: 650; }
.peptide-controls input, .peptide-controls select, .peptide-reader-navigation select { width: 100%; min-width: 0; padding: .75rem; margin-top: .35rem; border: 1px solid #597063; color: var(--ink); background: #0c1913; border-radius: 3px; font: inherit; font-size: .9rem; }
.peptide-result-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem; align-items: center; margin-block: 1.25rem; }
.peptide-result-toolbar p { margin: 0; color: var(--muted); font-size: .85rem; }
.peptide-filter-summary { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }
.peptide-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.peptide-card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; border: 1px solid var(--line); padding: 1.3rem; border-radius: 3px; background: #0d1b15; }
.peptide-card h3 { font: 400 1.5rem/1.2 Georgia,serif; margin: .5rem 0; overflow-wrap: anywhere; }
.peptide-card h3 a { text-decoration: none; }
.peptide-card h3 a:hover { text-decoration: underline; }
.peptide-card .peptide-card-description { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; overflow: hidden; font-size: .85rem; color: var(--muted); }
.peptide-card-meta { color: var(--muted); font-size: .73rem; margin-top: 0; }
.peptide-source-grade { font-size: .7rem; letter-spacing: .02em; border: 1px solid #526354; padding: .2rem .45rem; border-radius: 2px; color: #d3ddcf; }
.peptide-card > a:last-child { margin-top: auto; padding-top: 1rem; font-size: .8rem; color: var(--accent); }
.peptide-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; font-size: .85rem; }
.peptide-library button:disabled { opacity: .45; cursor: default; }
.peptide-empty { padding: 2rem; border: 1px dashed var(--line); grid-column: 1 / -1; }
.peptide-reader { max-width: 100%; }
.peptide-reader-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .85rem; margin-block: 1rem; }
.peptide-reader h3 { font: 400 clamp(2rem,3.5vw,3.2rem)/1.12 Georgia,serif; margin: 1.2rem 0 .6rem; overflow-wrap: anywhere; }
.peptide-reader-title-note { color: var(--muted); max-width: 85ch; font-size: .85rem; }
.peptide-reader-notice { border-left: 3px solid #b4a365; padding: .7rem 1rem; background: #262a1e; font-size: .85rem; max-width: 95ch; }
.peptide-reader-navigation { position: sticky; top: .5rem; z-index: 1; background: #101e19; padding: .7rem 0; border-block: 1px solid var(--line); margin-block: 1.5rem; }
.peptide-reader-navigation label { display: flex; gap: .75rem; align-items: center; font-size: .85rem; }
.peptide-reader-navigation select { max-width: 480px; margin: 0; }
.peptide-reader-section { scroll-margin-top: 6rem; padding-block: 1rem; border-bottom: 1px solid var(--line); }
.peptide-reader-section > summary { cursor: pointer; font-size: 1.1rem; font-weight: 650; }
.peptide-reader-section h4 { margin: 0; font-size: 1.1rem; }
.peptide-reader-section h5 { font-size: .9rem; color: var(--accent); margin-bottom: .5rem; }
.peptide-source-text { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 92ch; line-height: 1.75; font-size: .92rem; color: #d4dfd4; }
.peptide-field-label { font-weight: 650; font-size: .8rem; margin-top: 1.4rem; color: var(--accent); }
.peptide-source-fields { margin-bottom: 1.5rem; }
.peptide-source-fields dt { font-size: .75rem; font-weight: 650; margin-top: 1rem; color: var(--accent); overflow-wrap: anywhere; }
.peptide-source-fields dd { margin: .35rem 0 0; }
.peptide-citations { padding-left: 1.5rem; }
.peptide-citations > li { margin-block: 1.4rem; padding-left: .4rem; overflow-wrap: anywhere; }
.peptide-citations a { font-size: .85rem; }
.peptide-citations p, .peptide-source-note { font-size: .82rem; color: var(--muted); }
.peptide-citations details { margin-top: .4rem; }
.peptide-reader-footer { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; margin-block: 2rem .5rem; }
.peptide-library-overview { border-left: 1px solid var(--line); padding-left: clamp(1rem,3vw,3rem); }
.peptide-library-overview > p, .peptide-library-overview > a { font-size: .85rem; color: var(--muted); max-width: 48ch; }
.peptide-library-overview > a { color: var(--accent); }
.peptide-library-overview .peptide-counts { gap: clamp(.9rem,2vw,2rem); margin-block: .5rem 1.5rem; flex-wrap: wrap; }
.peptide-library-overview .peptide-counts strong { color: #e4e6d5; font-size: clamp(2rem,3vw,3.2rem); }
.peptide-library-overview .peptide-counts > span > span { color: var(--muted); }
.peptide-import-guide .peptide-coverage { max-width: 520px; margin-block: 1.5rem; }
.peptide-import-guide .peptide-coverage > p { color: #304f3d; }
.peptide-browser { margin-top: 2rem; }
.peptide-browser > .peptide-controls { grid-template-columns: minmax(0,3fr) minmax(0,1fr); }
.peptide-browser > .peptide-controls .peptide-search-field { grid-column: auto; }
.peptide-browser > .peptide-controls input { padding-left: 1rem; font-size: 1rem; }
.peptide-category-filter { display: flex; flex-wrap: wrap; gap: .5rem; margin-block: 1.1rem; }
.peptide-category-caption { flex-basis: 100%; margin: 0 0 .2rem; font-size: .72rem; color: var(--muted); }
[data-category="approved"] { --category-color: #a6cabb; }
[data-category="trials"] { --category-color: #abc6df; }
[data-category="wellness"] { --category-color: #d9b393; }
[data-category="cosmetic"] { --category-color: #c5b5dc; }
[data-category="all"] { --category-color: #d8ddcd; }
.peptide-category-chip { display: flex; align-items: center; gap: .5rem; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 4px; background: #0c1913; color: #cedacc; font: inherit; font-size: .73rem; cursor: pointer; }
.peptide-category-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--category-color); flex: 0 0 auto; }
.peptide-category-chip[aria-pressed="true"] { border-color: var(--category-color); background: #26392d; color: var(--ink); }
.peptide-category-count { font-variant-numeric: tabular-nums; color: var(--category-color); }
.peptide-advanced-filters { margin-block: 1rem; font-size: .8rem; }
.peptide-advanced-filters summary { cursor: pointer; color: var(--muted); }
.peptide-advanced-filters .peptide-controls { padding-block: 1rem; }
.peptide-view-switch { display: flex; width: fit-content; padding: .25rem; background: #0a1711; border: 1px solid var(--line); border-radius: 5px; margin-block: 1.7rem; gap: .25rem; }
.peptide-view-switch button { border: 0; border-radius: 3px; padding: .6rem 1rem; color: var(--muted); background: transparent; font: inherit; font-size: .8rem; cursor: pointer; }
.peptide-view-switch button[aria-pressed="true"] { background: #dfe5d1; color: #193526; }
.peptide-explorer-layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1.05fr); gap: clamp(1.4rem,3vw,3rem); align-items: start; border-top: 1px solid var(--line); padding-top: 1.8rem; }
.peptide-result-column, .peptide-atlas-panel { min-width: 0; }
.peptide-atlas-panel { align-self: stretch; }
.peptide-atlas-sticky { position: sticky; top: 1rem; }
.peptide-atlas-sticky > .eyebrow, .peptide-result-column > .eyebrow { margin: 0 0 1.3rem; }
.peptide-atlas-navigation { display: grid; grid-template-columns: minmax(130px,.85fr) minmax(0,1.35fr); gap: .5rem; align-items: center; }
.peptide-system-list { display: flex; flex-direction: column; gap: .4rem; }
.peptide-system-button { display: grid; grid-template-columns: 1.1rem minmax(0,1fr) auto; align-items: center; gap: .35rem; padding: .75rem .45rem; text-align: left; font: inherit; font-size: .74rem; line-height: 1.4; color: #b7c9bb; background: transparent; border: 1px solid transparent; border-radius: 4px; cursor: pointer; min-height: 48px; }
.peptide-system-button:hover { background: #213d2e; color: #e6eadb; }
.peptide-system-button[aria-pressed="true"] { background: #213d2e; color: #eef0e1; border-color: #617d60; }
.peptide-system-number { font-size: .6rem; color: #9bb991; font-variant-numeric: tabular-nums; }
.peptide-system-count { font-size: .67rem; color: #a8bdac; font-variant-numeric: tabular-nums; }
.peptide-body-figure { margin: 0; min-width: 0; }
.peptide-body-stage { position: relative; width: 100%; max-width: 320px; aspect-ratio: 320 / 620; margin-inline: auto; isolation: isolate; }
.peptide-body-stage > img { display: block; width: 100%; height: auto; }
.peptide-body-figure figcaption { color: #92a999; font-size: .65rem; line-height: 1.5; padding-inline: .7rem; text-align: center; }
.peptide-body-hotspot { position: absolute; transform: translate(-50%,-50%); display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #d4e9cf; font: inherit; font-size: .6rem; cursor: pointer; z-index: 1; }
.peptide-body-hotspot > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid #bdd2a9; border-radius: 50%; background: #1b3225; box-shadow: 0 0 0 5px #182d2266; transition: background .15s, box-shadow .15s; }
.peptide-body-hotspot:hover > span, .peptide-body-hotspot:focus-visible > span { background: #456045; box-shadow: 0 0 0 7px #b3c89f22; }
.peptide-body-hotspot[aria-pressed="true"] > span { background: #e5d3aa; color: #1c3022; border-color: #f4e9cb; box-shadow: 0 0 0 7px #e5d3aa33,0 0 24px #e5d3aa55; font-weight: 750; }
.peptide-atlas-annotation { border-top: 1px solid var(--line); margin-top: 1.2rem; padding-top: 1rem; }
.peptide-atlas-current { color: #dce6ce; font: 400 1.25rem Georgia,serif; margin: 0; }
.peptide-atlas-annotation p:last-child { color: var(--muted); font-size: .75rem; max-width: 65ch; line-height: 1.65; }
.peptide-atlas-jump { border: 0; border-bottom: 1px solid #607b64; border-radius: 0; background: transparent; color: var(--accent); padding: .3rem 0; font: inherit; font-size: .75rem; cursor: pointer; }
.peptide-result-column > h3 { font: 400 clamp(1.6rem,2.5vw,2.4rem)/1.15 Georgia,serif; margin: 0; letter-spacing: -.025em; }
.peptide-result-column .peptide-result-toolbar { gap: .6rem; margin-block: .9rem 1.2rem; }
.peptide-result-column .peptide-result-toolbar p { font-size: .73rem; }
.peptide-result-column .peptide-result-toolbar button { font-size: .7rem; }
.peptide-browser[data-view="atlas"] .peptide-grid { grid-template-columns: 1fr; gap: .65rem; }
.peptide-browser[data-view="atlas"] .peptide-card { position: relative; padding: 1rem 1.2rem 1rem 1.5rem; overflow: hidden; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: .35rem 1rem; align-items: start; background: linear-gradient(110deg,#243a2c88,#0d1b15 38%); border-color: #304a39; }
.peptide-browser[data-view="atlas"] .peptide-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--category-color); opacity: .8; }
.peptide-browser[data-view="atlas"] .peptide-card h3 { grid-row: 2; grid-column: 1 / -1; margin: 0; font-size: 1.3rem; }
.peptide-browser[data-view="atlas"] .peptide-card > .peptide-card-meta:first-child { grid-column: 1 / -1; margin: 0; color: var(--category-color); font-size: .65rem; }
.peptide-browser[data-view="atlas"] .peptide-source-grade { grid-column: 1; font-size: .6rem; border: 0; padding: 0; color: #aec1b1; }
.peptide-browser[data-view="atlas"] .peptide-card-description, .peptide-browser[data-view="atlas"] .peptide-card > .peptide-card-meta:not(:first-child) { display: none; }
.peptide-browser[data-view="atlas"] .peptide-card > a:last-child { grid-column: 2; grid-row: 3; padding: 0; margin: 0; font-size: .67rem; }
.peptide-browser[data-view="directory"] .peptide-explorer-layout { grid-template-columns: minmax(0,1fr); }
.peptide-browser[data-view="directory"] .peptide-card { border-top: 2px solid var(--category-color); }
.peptide-library input:focus-visible, .peptide-library select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (max-width: 1100px) {
  .peptide-explorer-layout { grid-template-columns: minmax(0,1fr); }
  .peptide-atlas-sticky { position: static; }
  .peptide-atlas-navigation { grid-template-columns: minmax(0,1fr) minmax(220px,1fr); gap: 1.5rem; max-width: 660px; margin-inline: auto; }
  .peptide-body-stage { max-width: 250px; }
  .peptide-system-button { padding-inline: 1rem; font-size: .85rem; }
  .peptide-atlas-annotation { margin-top: .5rem; }
}
@media (max-width: 1040px) { .peptide-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 760px) { .peptide-library-intro { grid-template-columns: 1fr; gap: 1rem; } .peptide-library-overview { border-left: 0; padding-left: 0; } .peptide-controls { grid-template-columns: repeat(2,minmax(0,1fr)); } .peptide-search-field { grid-column: 1 / -1; } .peptide-atlas-navigation { gap: .5rem; } }
@media (max-width: 580px) {
  .peptide-atlas-navigation { grid-template-columns: minmax(0,1fr); }
  .peptide-system-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .25rem; }
  .peptide-system-button { padding: .6rem .4rem; font-size: .74rem; }
  .peptide-system-button:first-child { grid-column: 1 / -1; }
  .peptide-body-figure { margin-top: .5rem; }
  .peptide-body-stage { max-width: 250px; }
  .peptide-browser > .peptide-controls { grid-template-columns: minmax(0,1fr); }
  .peptide-category-chip { font-size: .68rem; }
}
@media (max-width: 480px) { .peptide-grid, .peptide-controls { grid-template-columns: 1fr; } .peptide-reader-navigation label { display: block; } .peptide-reader-navigation select { margin-top: .35rem; } .peptide-reader-section { scroll-margin-top: 8rem; } .peptide-browser[data-view="atlas"] .peptide-card { padding: .8rem 1rem; gap: .4rem; } .peptide-browser[data-view="atlas"] .peptide-card > a:last-child { grid-column: 1 / -1; grid-row: auto; } }
@media (prefers-reduced-motion: reduce) { .peptide-body-hotspot > span { transition: none; } }
@media (max-height: 850px) { .peptide-atlas-sticky { position: static; } }
.peptide-body-stage[data-renderer="3d"] { background: radial-gradient(ellipse at 50% 38%,#b2bba314,transparent 65%); }
.peptide-body-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; cursor: grab; border-radius: 6px; }
.peptide-body-canvas:active { cursor: grabbing; }
.peptide-body-canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.peptide-body-stage[data-renderer="3d"] .peptide-body-hotspot > span { width: 22px; height: 22px; font-size: .55rem; background: #153021da; }
.peptide-body-stage[data-renderer="3d"] .peptide-body-hotspot[aria-pressed="true"] > span { background: #e5d3aa; color: #1c3022; }
.peptide-render-modes { display: flex; justify-content: center; gap: .3rem; margin-top: .8rem; }
.peptide-render-modes button, .peptide-3d-tools button { border: 1px solid var(--line); background: #10271b; color: #d6e4cf; border-radius: 4px; font: inherit; font-size: .67rem; cursor: pointer; padding: .5rem .55rem; min-height: 36px; }
.peptide-render-modes button[aria-pressed="true"] { background: #dfe5d1; color: #193526; }
.peptide-3d-tools { display: flex; justify-content: center; gap: .25rem; flex-wrap: wrap; margin-top: .5rem; }
.peptide-3d-tools button { min-width: 36px; }
.peptide-3d-tools button[aria-pressed="true"] { border-color: #bacb9d; }
.peptide-3d-instructions, .peptide-3d-status, .peptide-3d-hover, .peptide-3d-credits { font-size: .65rem; line-height: 1.5; color: var(--muted); text-align: center; margin: .6rem .2rem; }
.peptide-3d-status { color: #d6d1ad; }
.peptide-3d-hover { color: var(--accent); min-height: 1.5em; }
.peptide-3d-credits { font-size: .6rem; }
@media (pointer: coarse) { .peptide-3d-tools button, .peptide-render-modes button { min-width: 44px; min-height: 44px; } }
