/* species tree viewer (treeviz.js) */
.tv-views{display:inline-flex;border:1px solid var(--rule);border-radius:8px;overflow:hidden;margin-right:8px}
.tv-views button{background:none;border:0;color:var(--muted);font:500 13px var(--sans);padding:7px 14px;cursor:pointer}
.tv-views button[aria-pressed="true"]{background:var(--panel);color:var(--ink);box-shadow:inset 0 -2px 0 var(--accent)}
.tv-views button:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}
.tv{width:100%;margin:8px 0 0}
.tv-stage{position:relative;height:min(92vh,1250px);min-height:520px;background:var(--bg);border-block:1px solid var(--rule);overflow:hidden}
.tv-stage:fullscreen{height:100vh}
.tv-stage canvas{display:block;touch-action:none;cursor:grab}
.tv-stage canvas:active{cursor:grabbing}
.tv-help{position:absolute;left:16px;bottom:8px;margin:0;color:var(--faint);pointer-events:none}
.tv-card{position:absolute;z-index:3;width:300px;max-width:calc(100% - 16px);background:rgba(13,20,18,.97);border:1px solid var(--rule);border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.5);overflow:hidden;pointer-events:none}
.tv-card.pinned{pointer-events:auto;border-color:var(--accent)}
.tv-pic{background:#0d1412;display:flex;justify-content:center}
.tv-pic img,.tv-pic canvas{width:100%;height:auto;max-height:240px;object-fit:contain;display:block}
.tv-pic canvas{width:150px;height:150px;margin:8px auto}
.tv-body{padding:10px 14px 12px}
.tv-body h3{margin:0 0 2px;font-size:17px;line-height:1.25}
.tv-body p{margin:3px 0;font-size:12.5px;line-height:1.45}
.tv-rk{color:var(--accent);font:600 11px var(--mono)!important;text-transform:uppercase;letter-spacing:.06em}
.tv-au,.tv-ln,.tv-cr{color:var(--muted)}
.tv-sh{color:var(--ink)}
.tv-cr a,.tv-body a{color:var(--accent)}
.tv-fl span{display:inline-block;border:1px solid var(--rule);border-radius:99px;padding:0 7px;margin:0 4px 2px 0;font-size:11px;color:var(--muted)}
.tv-act{margin-top:8px!important;display:flex;flex-wrap:wrap;gap:6px}
.tv-legend span[style]{display:inline-flex;align-items:center;gap:5px;margin-right:10px}
.tv-legend span[style]::before{content:"";width:10px;height:10px;border-radius:50%;background:var(--c)}
.tv-tray{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px;margin:14px 0 26px}
.tv-cmp{position:relative;background:var(--panel);border:1px solid var(--rule);border-radius:10px;overflow:hidden}
.tv-cmp .tv-pic img{max-height:260px}
.tv-x{position:absolute;top:6px;right:6px;width:28px;height:28px;border-radius:50%;border:1px solid var(--rule);background:rgba(7,11,10,.8);color:var(--ink);font-size:18px;line-height:1;cursor:pointer}
.tv-lineup{padding:8px max(16px,calc((100vw - 1400px)/2)) 30px}
.tv-oh{margin:26px 0 6px;padding-left:12px;border-left:4px solid var(--c);font-size:20px}
.tv-oh span{font:400 13px var(--sans);color:var(--muted)}
.tv-fams{display:flex;flex-wrap:wrap;gap:14px 26px;align-items:flex-start}
.tv-fam{margin:6px 0 4px}
.tv-fh{margin:0 0 6px;font:600 13px var(--cond);color:var(--muted);text-transform:uppercase;letter-spacing:.05em}
.tv-fh span{font-weight:400;color:var(--faint)}
.tv-grid{display:flex;flex-wrap:wrap;gap:8px}
.tv-li{width:112px;display:flex;flex-direction:column;align-items:center;gap:3px;background:var(--panel);border:1px solid var(--rule);border-radius:10px;padding:8px 6px;color:var(--ink);cursor:pointer;font:13px var(--sans)}
.tv-li:hover,.tv-li:focus-visible{border-color:var(--accent);outline:none}
.tv-li img,.tv-li canvas{width:96px;height:96px;border-radius:50%;object-fit:cover;background:#0d1412}
.tv-li.drawn canvas{opacity:.8}
.tv-li span{font-size:11px;color:var(--faint)}
@media (prefers-reduced-motion:reduce){.tv-card{transition:none}}
.tv-pic{position:relative}
.tv-pic img.tv-dr{width:220px;height:220px;max-height:none;object-fit:contain;margin:6px auto}
.tv-pic img.tv-ph{position:absolute;right:8px;bottom:8px;width:72px;height:72px;border-radius:50%;object-fit:cover;border:2px solid var(--rule)}
.tv-li img.dr{object-fit:contain;background:#0d1412;padding:4px}
.tv-cmp .tv-pic img.tv-dr{width:100%;height:auto;max-height:280px}

/* A-Z index: plain links, in the HTML, so the species pages are reachable without JavaScript.
   See the note in build_species.py - before this existed only 5% of the site could be crawled. */
.az{margin:44px 0 0;border-top:1px solid var(--rule,#2a3531);padding-top:22px}
.az h2{font-size:1.15rem;margin:0 0 6px}
.azp{color:var(--muted,#94a39d);font-size:.92rem;margin:0 0 14px;max-width:62ch}
.azjump{display:flex;flex-wrap:wrap;gap:7px;margin-bottom:18px}
.azjump a{font:500 .82rem/1 ui-monospace,monospace;padding:5px 8px;border:1px solid var(--rule,#2a3531);
  border-radius:6px;text-decoration:none;color:var(--muted,#94a39d)}
.azjump a:hover{color:var(--ink,#e7ece9);border-color:currentColor}
.az h3{font:600 .95rem/1 ui-monospace,monospace;margin:20px 0 8px;color:var(--muted,#94a39d);
  scroll-margin-top:60px}
ul.azlist{list-style:none;margin:0;padding:0;columns:4;column-gap:22px}
ul.azlist li{break-inside:avoid;font-size:.88rem;line-height:1.55}
ul.azlist a{text-decoration:none}
ul.azlist a:hover{text-decoration:underline}
@media (max-width:900px){ul.azlist{columns:2}}
@media (max-width:520px){ul.azlist{columns:1}}
