/* Peptide library explorer — the top of /research (public/research.html).
   Markup is generated by scripts/build-peptide-library.mjs; behaviour lives
   in scripts/peptide-library.js. Palette: Deep #0A261E stage, Glass #BFE3D3
   line art, Mint/Frost tints, Amber for the one active accent. Every intro
   animation's resting state is the final state, so prefers-reduced-motion
   (and no-JS) simply shows the finished map. */

body { margin: 0; background: #fff; color: var(--ink); font-family: var(--font-body); overflow-x: clip; }
.rs-nav-rule { border: 0; height: 1px; background: var(--hairline); margin: 0; }
.pl { --pl-gut: 40px; background: #fff; color: var(--ink); }
.pl-wrap { max-width: 1360px; margin: 0 auto; padding: 18px var(--pl-gut) 56px; box-sizing: border-box; }
.pl-vh { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ── header ─────────────────────────────────────────────────────────── */
.pl-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--slate-2); }
.pl-crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--hairline-strong); font-size: 13px; }
.pl-crumbs a { color: var(--slate); display: inline-block; padding: 12px 4px; margin: -12px -4px; transition: color .15s; }
.pl-crumbs a:hover { color: var(--ink); }

.pl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 48px; flex-wrap: wrap; margin: 18px 0 32px; }
.pl-head__text { min-width: 0; max-width: 640px; }
.pl-lede { margin: 14px 0 0; font-size: 17px; line-height: 1.5; color: var(--slate); max-width: 52ch; text-wrap: pretty; }
.pl-h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.024em; line-height: 1.02; font-size: clamp(34px, 3.7vw, 54px); margin: 0; color: var(--ink); text-wrap: balance; }
.pl-stats { display: flex; margin: 0; padding: 0 0 4px; }
.pl-stats > div { display: flex; flex-direction: column; gap: 5px; padding: 0 22px; border-left: 1px solid var(--hairline-strong); }
.pl-stats > div:first-child { border-left: 0; padding-left: 0; }
.pl-stats > div:last-child { padding-right: 0; }
.pl-stats dd { order: -1; margin: 0; font-family: var(--font-display); font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.pl-stats dt { font-size: 12.5px; line-height: 1.3; color: var(--slate-2); }

/* ── two-column body ────────────────────────────────────────────────── */
.pl-body { display: grid; grid-template-columns: minmax(0, 540px) minmax(0, 1fr); gap: 40px; align-items: start; }
.pl-mapcol { position: sticky; top: 88px; }

/* ── map stage ──────────────────────────────────────────────────────── */
.pl-map {
  position: relative; isolation: isolate; overflow: hidden; border-radius: 16px; color: #EAF2EE;
  padding: 16px 16px 10px;
  background:
    radial-gradient(ellipse 58% 46% at 50% 40%, rgba(37, 107, 85, .46) 0, rgba(37, 107, 85, 0) 72%),
    radial-gradient(ellipse 90% 60% at 50% 110%, rgba(15, 59, 46, .9) 0, rgba(10, 38, 30, 0) 70%),
    #0A261E;
}
.pl-map::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(191, 227, 211, .16) 1px, transparent 1.4px);
  background-size: 18px 18px; background-position: 9px 9px;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, #000 30%, transparent 92%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 46%, #000 30%, transparent 92%);
}
.pl-map__h { margin: 2px 4px 0; font-family: var(--font-display); font-weight: 500; font-size: 15px; letter-spacing: -.005em; color: #EAF2EE; }

/* The frame fixes the box before anything paints (no layout shift); its
   width is capped by the viewport height so the sticky map always fits. */
.pl-map__frame { position: relative; width: min(100%, calc((100vh - 200px) * 680 / 760)); min-width: min(100%, 360px); aspect-ratio: 680 / 760; margin: 0 auto; }
.pl-map__canvas { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 680 / 760; }
.pl-fig { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }

.pl-map__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 4px; border-top: 1px solid rgba(191, 227, 211, .12); }
.pl-map__status { margin: 0; font-size: 13px; color: rgba(234, 242, 238, .78); }
.pl-map__status b { font-weight: 600; color: #fff; }
.pl-map__clear { height: 32px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(191, 227, 211, .35); background: transparent; color: #EAF2EE; font: 500 12.5px/1 var(--font-body); cursor: pointer; transition: background .2s, border-color .2s; }
.pl-map__clear { position: relative; flex: none; white-space: nowrap; }
.pl-map__clear::after { content: ""; position: absolute; inset: -6px -2px; }
.pl-map__clear:hover { background: rgba(191, 227, 211, .12); border-color: rgba(191, 227, 211, .6); }
.pl-map__clear[hidden] { display: none; }

/* figure */
.pl-floor { fill: #BFE3D3; opacity: .07; }
.pl-shape { stroke: none; }
.pl-outline { fill: none; stroke: #BFE3D3; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; stroke-opacity: .9; transition: stroke .35s, stroke-opacity .35s; }
.pl-art { fill: none; stroke: #BFE3D3; stroke-width: 1.15; stroke-linecap: round; stroke-linejoin: round; }
.pl-region { opacity: .4; transition: opacity .35s ease; }
.pl-region .pl-art { transition: stroke .35s; }
.pl-vessel { opacity: 0; transition: opacity .45s ease; }
.pl-glow { opacity: 0; transition: opacity .45s ease; }
.pl-leader { fill: none; stroke: #BFE3D3; stroke-width: 1; stroke-opacity: .4; stroke-dasharray: 2 4; transition: stroke-opacity .3s, stroke .3s; }
.pl-leader-bg { fill: none; stroke: #0A261E; stroke-width: 3; stroke-opacity: .6; }
.pl-land { fill: none; stroke: #BFE3D3; stroke-width: 1; stroke-linecap: round; opacity: .2; }
.pl-land circle { fill: #BFE3D3; stroke: none; }
.pl-land .pl-land--soft { stroke-dasharray: 2 5; }
.pl-art .pl-art--faint { stroke-opacity: .55; }
.pl-art .pl-art--behind { stroke-dasharray: 3 2.5; }
.pl-art circle:not(.pl-art--faint) { fill: rgba(191, 227, 211, .18); }
.pl-art .pl-lymph { stroke-width: .9; stroke-opacity: .6; }
.pl-art .pl-colon { stroke-width: 4.2; stroke-opacity: .38; }
.pl-hot { cursor: pointer; transition: opacity .35s ease; }
.pl-hot__dot { fill: #DCEDE5; stroke: #0A261E; stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: fill .3s, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pl-hot__ring { fill: rgba(191, 227, 211, .08); stroke: #BFE3D3; stroke-opacity: .45; stroke-width: 1; transform-box: fill-box; transform-origin: center; transition: stroke .3s, stroke-opacity .3s, transform .35s cubic-bezier(.34, 1.56, .64, 1); }
.pl-hot__pulse { fill: none; stroke: #BFE3D3; stroke-width: 1.2; opacity: 0; transform-box: fill-box; transform-origin: center; }
.pl-hits > g { fill: transparent; cursor: pointer; }

/* hover / focus preview and selection (classes set by peptide-library.js) */
.pl-region.is-hover, .pl-region.is-on { opacity: 1; }
.pl-region.is-on .pl-art { stroke: #EAF2EE; }
.pl-region.is-hover .pl-vessel, .pl-region.is-on .pl-vessel { opacity: .5; }
.pl-glow.is-hover { opacity: .75; }
.pl-glow.is-on { opacity: 1; }
.pl-leader.is-hover { stroke-opacity: .85; stroke-dasharray: none; }
.pl-leader.is-on { stroke: #F2B544; stroke-opacity: .9; stroke-dasharray: none; }
.pl-hot.is-hover .pl-hot__dot, .pl-hot.is-preview .pl-hot__dot { transform: scale(1.3); }
.pl-hot.is-hover .pl-hot__ring, .pl-hot.is-preview .pl-hot__ring { transform: scale(1.25); stroke-opacity: .9; }
.pl-hot.is-preview .pl-hot__dot { fill: #F2B544; }
.pl-hot.is-on .pl-hot__dot { fill: #F2B544; transform: scale(1.35); }
.pl-hot.is-on .pl-hot__ring { stroke: #F2B544; stroke-opacity: .9; transform: scale(1.35); }
.pl-hot.is-on .pl-hot__pulse { stroke: #F2B544; }
.pl-map.has-sel .pl-hot:not(.is-on):not(.is-hover) { opacity: .4; }
.pl-map.has-sel .pl-region:not(.is-on):not(.is-hover) { opacity: .22; }
.pl-map.has-sel .pl-leader:not(.is-on):not(.is-hover) { stroke-opacity: .16; }
.pl-map[data-sel="skin"] .pl-outline, .pl-map[data-hover="skin"] .pl-outline { stroke: #EAF2EE; stroke-opacity: 1; }
.pl-map.has-preview .pl-hot:not(.is-preview):not(.is-on) { opacity: .45; }
.pl-hot.is-empty:not(.is-on), .pl-region.is-empty:not(.is-on) { opacity: .16; }
.pl-sys.is-empty:not([aria-pressed="true"]) { color: rgba(234, 242, 238, .4); }
.pl-sys.is-empty:not([aria-pressed="true"]) .pl-sys__n { opacity: .5; }
.pl-leader.is-empty:not(.is-on) { stroke-opacity: .1; }

/* system labels (the map's buttons) */
.pl-sys {
  position: absolute; z-index: 2; transform: translateY(-50%);
  display: inline-flex; align-items: center; gap: 6px; max-width: calc(29.4% + 12px); min-height: 44px; padding: 6px 8px; box-sizing: border-box;
  border: 0; border-radius: 10px; background: transparent; color: rgba(234, 242, 238, .84);
  font: 500 13px/1.22 var(--font-body); letter-spacing: -.003em; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background .25s, color .25s, box-shadow .25s;
}
.pl-sys--l { justify-content: flex-end; text-align: right; }
.pl-sys--r { justify-content: flex-start; text-align: left; }
.pl-sys--r .pl-sys__n { order: -1; }
.pl-sys__n { flex: none; min-width: 22px; padding: 3px 6px; border-radius: 999px; box-sizing: border-box; background: rgba(191, 227, 211, .13); color: #BFE3D3; font: 500 11px/1.1 var(--font-mono); text-align: center; transition: background .25s, color .25s; }
.pl-sys:hover, .pl-sys.is-hover { background: rgba(191, 227, 211, .1); color: #fff; }
.pl-sys[aria-pressed="true"] { background: #DCEDE5; color: #0A261E; }
.pl-sys[aria-pressed="true"] .pl-sys__n { background: #0F3B2E; color: #fff; }
.pl-sys:focus-visible { outline: 2px solid #F2B544; outline-offset: 2px; }
.pl-map.has-sel .pl-sys:not([aria-pressed="true"]):not(:hover):not(.is-hover) { color: rgba(234, 242, 238, .58); }

/* ── index: one column of compound rows (the reference format) ──────── */
.pl-index { min-width: 0; }
.pl-index__head { margin: 6px 0 18px; scroll-margin-top: 96px; }
.pl-h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(22px, 2vw, 26px); line-height: 1.15; letter-spacing: -.018em; color: var(--ink); }
.pl-count { font-weight: 400; color: #9AABA3; font-variant-numeric: tabular-nums; }

.pl-tools { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 0 0 30px; }
.pl-search { position: relative; }
.pl-search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--slate-2); pointer-events: none; }
.pl-search input { width: 100%; height: 46px; box-sizing: border-box; padding: 0 16px 0 42px; border: 1px solid var(--card-border); border-radius: 999px; background: #fff; color: var(--ink); font: 400 15px/1 var(--font-body); transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
.pl-search input::placeholder { color: var(--slate-2); }
.pl-search input:focus { outline: 0; border-color: var(--edge); box-shadow: 0 0 0 3px rgba(37, 107, 85, .14); }

/* Status legend: the row colours, quiet as in the reference; each item also
   narrows the list to that status. */
.pl-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 0 2px; margin: 0 0 0 -8px; }
.pl-st { position: relative; display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; color: var(--slate-2); font: 400 12px/1.2 var(--font-body); cursor: pointer; transition: background .2s, color .2s; }
.pl-st:hover { color: var(--ink); }
.pl-st[aria-pressed="true"] { background: var(--frost); color: var(--ink); }
.pl-dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; }
.pl-dot--fda-approved { background: #34B482; }
.pl-dot--clinical-trials { background: #D8B436; }
.pl-dot--not-approved { background: #86A7B0; }
.pl-dot--cosmetic { background: #AFA497; }
.pl-st:focus-visible, .pl-row__a:focus-visible, .pl-empty__btn:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; }

/* Rows: a glass strip, the status bar, the name and its status. Each row is
   a thin slab: with JS the list keeps its perspective origin at the middle
   of the viewport (peptide-library.js), so rows above it show their lower
   face and rows below show their upper face, as in the reference. */
.pl-rows {
  list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 30px;
  perspective: 1000px; perspective-origin: 50% var(--pl-po, 50%); transform-style: preserve-3d;
}
.pl-row { --deep: #86A7B0; --base: #E8EFF1; --rim: #D2DFE3; --depth: 88px; position: relative; transform-style: preserve-3d; transition: transform .4s cubic-bezier(.22, 1, .36, 1); }
.pl-row[hidden] { display: none; }
.pl-row--fda-approved { --deep: #34B482; --base: #E3F5EC; --rim: #C3E7D5; }
.pl-row--clinical-trials { --deep: #D8B436; --base: #F8F3DA; --rim: #ECE1AE; }
.pl-row--cosmetic { --deep: #AFA497; --base: #F0EEEB; --rim: #DFD9D1; }
.pl-row--none { --deep: #A3B0AB; --base: #EEF1F0; --rim: #D9E0DD; }
.pl-row__a { position: relative; display: grid; grid-template-columns: 54% minmax(0, 1fr); height: 74px; box-sizing: border-box; border: 1px solid var(--rim); background: #fff; color: var(--ink); text-decoration: none; transition: border-color .25s; }
.pl-row__img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pl-row__txt { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding: 0 18px; border-left: 3px solid var(--deep); }
.pl-row__name { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.2; letter-spacing: -.012em; color: var(--ink); overflow-wrap: anywhere; transition: color .2s; }
.pl-row__st { font-size: 12px; line-height: 1.3; color: var(--slate-2); }
.pl-js .pl-row::before, .pl-js .pl-row::after {
  content: ""; position: absolute; left: 0; right: 0; height: var(--depth); box-sizing: border-box; pointer-events: none;
  border: 1px solid var(--rim); background: linear-gradient(var(--fade), rgba(255, 255, 255, 0) 0, rgba(255, 255, 255, .6) 100%), linear-gradient(90deg, var(--base) 0 54%, #FBFCFC 54% 100%);
}
.pl-js .pl-row::before { --fade: 180deg; top: 0; transform-origin: 50% 0; transform: rotateX(-90deg); }
.pl-js .pl-row::after { --fade: 0deg; bottom: 0; transform-origin: 50% 100%; transform: rotateX(90deg); }
@media (hover: hover) and (pointer: fine) {
  .pl-row:hover { transform: translateZ(14px); }
  .pl-row:hover .pl-row__a { border-color: var(--deep); }
  .pl-row:hover .pl-row__name { color: var(--bottle); }
}
@media (prefers-reduced-motion: reduce) {
  .pl-js .pl-row::before, .pl-js .pl-row::after { display: none; }
  .pl-row { transition: none; }
}

.pl-empty { margin: 8px 0 0; padding: 28px; border: 1px dashed var(--hairline-strong); border-radius: 12px; text-align: center; color: var(--slate); }
.pl-empty[hidden] { display: none; }
.pl-empty p { margin: 0 0 12px; font-size: 15px; }
.pl-empty__btn { height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--bottle); background: var(--bottle); color: #fff; font: 600 13.5px/1 var(--font-body); cursor: pointer; }

/* the article hub that follows */
.pl + .rs-shell, main > .pl + .rs-shell { border-top: 1px solid var(--hairline); }

/* ── intro (CSS only: runs on first paint, no JS needed) ──────────────── */
@media (prefers-reduced-motion: no-preference) {
  .pl-outline { stroke-dasharray: 1; animation: pl-draw 1.25s cubic-bezier(.65, 0, .35, 1) .1s both; }
  .pl-shape { animation: pl-fade .9s ease .45s both; }
  .pl-floor { animation: pl-fade 1s ease .3s both; }
  .pl-scan { animation: pl-scan 1.5s cubic-bezier(.45, 0, .2, 1) .35s both; }
  .pl-regions { animation: pl-fade .8s ease .85s both; }
  .pl-hot { animation: pl-pop .55s cubic-bezier(.34, 1.56, .64, 1) both; animation-delay: calc(1.05s + var(--i) * 70ms); }
  .pl-hot__pulse { animation: pl-pulse 3.4s cubic-bezier(.22, 1, .36, 1) infinite; animation-delay: calc(2s + var(--i) * .42s); }
  .pl-leader { transform-box: fill-box; animation: pl-grow .5s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(1.15s + var(--i) * 70ms); }
  .pl-leader--l { transform-origin: 100% 50%; }
  .pl-leader--r { transform-origin: 0 50%; }
  .pl-sys { animation: pl-label-l .55s cubic-bezier(.22, 1, .36, 1) both; animation-delay: calc(1.25s + var(--i) * 70ms); }
  .pl-sys--r { animation-name: pl-label-r; }
  .pl-map__h, .pl-map__foot { animation: pl-fade .6s ease .2s both; }
  .pl-land { animation: pl-fade .8s ease .85s both; }
  .pl-leader-bg { transform-box: fill-box; animation: pl-fade .5s ease both; animation-delay: calc(1.15s + var(--i) * 70ms); }
}
@keyframes pl-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes pl-fade { from { opacity: 0; } }
@keyframes pl-scan { from { transform: translateY(0); opacity: 1; } 85% { opacity: 1; } to { transform: translateY(880px); opacity: 0; } }
@keyframes pl-pop { from { opacity: 0; transform: scale(.2); } }
@keyframes pl-grow { from { transform: scaleX(0); } }
@keyframes pl-label-l { from { opacity: 0; transform: translate(10px, -50%); } }
@keyframes pl-label-r { from { opacity: 0; transform: translate(-10px, -50%); } }
@keyframes pl-pulse { 0% { opacity: .6; transform: scale(1); } 70%, 100% { opacity: 0; transform: scale(2.9); } }
.pl-scan { opacity: 0; }

/* ── responsive ─────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  .pl-body { grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 32px; }
}
/* Narrow stage (two columns at 1024-1240, and phones): plain counts and
   tighter padding give the label text the room. */
@media (min-width: 1024px) and (max-width: 1240px) {
  .pl-map { padding-left: 10px; padding-right: 10px; }
  .pl-sys { max-width: calc(29.4% + 10px); padding: 5px 6px; gap: 5px; font-size: 12.5px; }
  .pl-sys__n { min-width: 0; padding: 0; background: none; color: rgba(191, 227, 211, .8); }
  .pl-sys[aria-pressed="true"] .pl-sys__n { background: none; color: #0F3B2E; }
}
@media (max-width: 1023px) {
  .pl { --pl-gut: 24px; }
  .pl-body { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .pl-mapcol { position: static; }
  .pl-map { max-width: 560px; margin: 0 auto; }
  /* Stacked: crop the stage at the shins so the index starts sooner. */
  .pl-map__frame { width: 100%; min-width: 0; aspect-ratio: 680 / 640; overflow: hidden; }
  .pl-map__frame::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: linear-gradient(rgba(10, 38, 30, 0), #0A261E); pointer-events: none; z-index: 1; }
}
@media (max-width: 720px) {
  .pl { --pl-gut: 16px; }
  .pl-wrap { padding-top: 14px; padding-bottom: 40px; }
  .pl-head { margin: 14px 0 20px; gap: 16px; }
  .pl-stats { width: 100%; }
  .pl-stats > div { flex: 1 1 0; padding: 0 12px; }
  .pl-stats dd { font-size: 22px; }
  .pl-stats dt { font-size: 11.5px; }
  /* Wider stage on phones: label rows need 44px each even at 360px. */
  .pl-map { margin: 0 -8px; padding: 12px 4px 6px; border-radius: 14px; }
  .pl-map__h { margin-left: 10px; }
  .pl-sys { max-width: calc(29.4% + 6px); padding: 4px 5px; gap: 4px; font-size: 11.5px; line-height: 1.16; border-radius: 8px; }
  .pl-sys__n { min-width: 0; padding: 0; background: none; font-size: 10.5px; color: rgba(191, 227, 211, .8); }
  .pl-sys[aria-pressed="true"] .pl-sys__n { background: none; color: #0F3B2E; }
  .pl-map__foot { padding: 0 10px; }
  .pl-search input { font-size: 16px; height: 48px; }
  .pl-st { min-height: 40px; }
  .pl-map__clear { height: 36px; padding: 0 16px; }
  .pl-tools { margin-bottom: 26px; }
  .pl-rows { gap: 24px; }
  .pl-row { --depth: 72px; }
  .pl-row__a { grid-template-columns: 44% minmax(0, 1fr); height: 66px; }
  .pl-row__txt { padding: 0 14px; gap: 3px; }
  .pl-row__name { font-size: 15px; }
  .pl-row__st { font-size: 11.5px; }
}

/* ── Browse by type + A–Z index (generated by build-peptide-library.mjs) ── */
.rt, .az { --pl-gut: 40px; background: #fff; color: var(--ink); }
.rt { border-top: 1px solid var(--hairline); }
.rt-wrap, .az-wrap { max-width: 1360px; margin: 0 auto; padding: 56px var(--pl-gut) 0; box-sizing: border-box; }
.az-wrap { padding-top: 64px; padding-bottom: 96px; }
.rt-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 20px; }
.rt-h, .az-h { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.02em; color: var(--ink); }
.rt-sub { margin: 0; font-size: 14px; color: var(--slate-2); }
.rt-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rt-tile { display: flex; flex-direction: column; gap: 8px; height: 100%; min-height: 112px; padding: 18px 20px; box-sizing: border-box; border: 1px solid var(--hairline-strong); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; transition: border-color .2s, background .2s, box-shadow .2s; }
.rt-tile:hover { border-color: #A9C9BA; box-shadow: 0 16px 36px -26px rgba(10, 38, 30, .4); }
.rt-tile:focus-visible { outline: 2px solid var(--edge); outline-offset: 2px; }
.rt-tile__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.rt-tile__name { font-family: var(--font-display); font-size: 19px; font-weight: 600; letter-spacing: -.012em; line-height: 1.2; }
.rt-tile__n { font: 500 14px/1 var(--font-mono); color: var(--edge); font-variant-numeric: tabular-nums; }
.rt-tile__blurb { font-size: 14px; line-height: 1.5; color: var(--slate); }
.rt-tile[aria-current="true"] { background: var(--bottle); border-color: var(--bottle); color: #fff; }
.rt-tile[aria-current="true"] .rt-tile__n { color: var(--glass); }
.rt-tile[aria-current="true"] .rt-tile__blurb { color: rgba(234, 242, 238, .82); }

.az-t { display: block; height: 0; overflow: hidden; scroll-margin-top: 96px; }
.az-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin: 0 0 18px; scroll-margin-top: 96px; }
.az-status { display: flex; align-items: center; gap: 14px; margin: 0; font-size: 14px; color: var(--slate-2); }
.az-clear { display: none; align-items: center; min-height: 36px; padding: 0 14px; border: 1px solid var(--hairline-strong); border-radius: 999px; color: var(--ink); font-size: 13px; font-weight: 500; text-decoration: none; }
.az-clear:hover { border-color: var(--edge); }
.az-letters { margin: 0 0 28px; padding: 0 0 16px; border-bottom: 1px solid var(--hairline); }
.az-letters ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.az-letters a, .az-letters span { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 6px; box-sizing: border-box; border-radius: 8px; font: 500 13px/1 var(--font-body); }
.az-letters a { color: var(--ink); text-decoration: none; }
.az-letters a:hover { background: var(--frost); }
.az-letters span, .az-letters a.is-off { color: var(--hairline-strong); pointer-events: none; }
.az-cols { columns: 3 300px; column-gap: 48px; }
.az-group { break-inside: avoid; margin: 0 0 28px; scroll-margin-top: 96px; }
.az-letter { margin: 0 0 8px; font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--edge); line-height: 1; }
.az-group ul { list-style: none; margin: 0; padding: 0; }
.az-group li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--hairline); }
.az-group li a { color: var(--ink); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.az-group li a:hover { color: var(--edge); text-decoration: underline; text-underline-offset: 3px; }
.az-type { flex: none; font-size: 12px; color: var(--slate-2); white-space: nowrap; }
.az-empty { margin: 0; padding: 28px; border: 1px dashed var(--hairline-strong); border-radius: 12px; text-align: center; color: var(--slate); }
.az-empty[hidden], .az-group[hidden], .az-group li[hidden] { display: none; }
.az[data-filter] .az-type, html:not(.rt-js) .az-t:target ~ .az-cols .az-type { display: none; }

/* No-JS filter: the type tiles link to #type=<id>; :target narrows the index. */
html:not(.rt-js) .az-t:target ~ .az-head .az-clear { display: inline-flex; }
html:not(.rt-js) .az-t[id="type=guide"]:target ~ .az-cols li:not([data-type="guide"]),
html:not(.rt-js) .az-t[id="type=mechanism"]:target ~ .az-cols li:not([data-type="mechanism"]),
html:not(.rt-js) .az-t[id="type=trial"]:target ~ .az-cols li:not([data-type="trial"]),
html:not(.rt-js) .az-t[id="type=comparison"]:target ~ .az-cols li:not([data-type="comparison"]),
html:not(.rt-js) .az-t[id="type=basics"]:target ~ .az-cols li:not([data-type="basics"]),
html:not(.rt-js) .az-t[id="type=buying"]:target ~ .az-cols li:not([data-type="buying"]) { display: none; }
html:not(.rt-js) .az-t[id="type=guide"]:target ~ .az-cols .az-group:not(:has(li[data-type="guide"])),
html:not(.rt-js) .az-t[id="type=mechanism"]:target ~ .az-cols .az-group:not(:has(li[data-type="mechanism"])),
html:not(.rt-js) .az-t[id="type=trial"]:target ~ .az-cols .az-group:not(:has(li[data-type="trial"])),
html:not(.rt-js) .az-t[id="type=comparison"]:target ~ .az-cols .az-group:not(:has(li[data-type="comparison"])),
html:not(.rt-js) .az-t[id="type=basics"]:target ~ .az-cols .az-group:not(:has(li[data-type="basics"])),
html:not(.rt-js) .az-t[id="type=buying"]:target ~ .az-cols .az-group:not(:has(li[data-type="buying"])) { display: none; }
.rt-js .az-clear:not([hidden]) { display: inline-flex; }

@media (max-width: 1023px) {
  .rt, .az { --pl-gut: 24px; }
  .rt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .rt, .az { --pl-gut: 16px; }
  .rt-wrap { padding-top: 40px; }
  .az-wrap { padding-top: 48px; padding-bottom: 64px; }
  .rt-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .rt-tile { min-height: 0; padding: 16px; }
  .az-letters { margin: 0 calc(-1 * var(--pl-gut)) 24px; padding: 0 var(--pl-gut) 12px; overflow-x: auto; scrollbar-width: none; }
  .az-letters::-webkit-scrollbar { display: none; }
  .az-letters ol { flex-wrap: nowrap; }
  .az-letters a, .az-letters span { min-width: 40px; height: 44px; }
  .az-group li { padding: 10px 0; }
  .az-group li a { font-size: 15px; }
}
