/* Shapes, labels and color repeat across the text, key and definition cards. */
[data-category="matching"]{--term-color:#285c98;--term-tint:#edf3fc}
[data-category="immune"]{--term-color:#995227;--term-tint:#fff1e4}
[data-category="prevention"]{--term-color:#086e66;--term-tint:#e5f5ee}
[data-category="cells"]{--term-color:#7652a4;--term-tint:#f3edfb}
.term-icon{width:29px;height:29px;flex:0 0 29px;display:inline-flex;align-items:center;justify-content:center;border-radius:9px;background:var(--term-tint);color:var(--term-color)}
.term-icon svg{width:20px;height:20px}
.term-guide{padding:14px 16px;margin:-12px 0 26px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(115deg,#fff,#f2f6ed)}
.term-guide-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.term-guide-open{display:flex;align-items:center;gap:8px;min-height:44px;padding:0;border:0;background:none;color:var(--ink);font-size:14px;font-weight:700;white-space:nowrap}
.term-guide-open svg{width:20px;height:20px;color:var(--teal)}

.term-guide-hint{font-size:10px;line-height:1.6;color:var(--muted);text-align:right}
.term-key{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin-top:6px}
.term-key button{display:flex;flex-direction:column;align-items:center;gap:5px;min-height:60px;background:none;border:0;border-radius:8px;color:var(--term-color);padding:4px 0;font-size:10px;font-weight:600;line-height:1.4}
.term-key button:hover{background:var(--term-tint)}
.term-trigger{display:inline;padding:2px 1px;border:0;border-radius:3px;background:none;color:inherit;font:inherit;line-height:inherit;text-align:inherit;cursor:help;text-decoration:underline dotted var(--term-color);text-underline-offset:4px;text-decoration-thickness:1.5px}
.term-trigger>svg{display:inline-block;width:12px;height:12px;margin-right:3px;vertical-align:-1px;stroke:var(--term-color)}
.term-trigger:hover,.term-trigger:focus-visible{background:var(--term-tint);color:var(--term-color)}
.lab-result .term-trigger>span{display:inline;margin:0;font:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit}
.term-tooltip{position:fixed;z-index:100;width:min(320px,calc(100vw - 24px));padding:16px;border:1px solid var(--line);border-top:3px solid var(--term-color);border-radius:14px;background:#fff;color:var(--ink);box-shadow:0 10px 34px #173a3629;font-size:12px;line-height:1.65}
.term-tooltip-title{display:flex;align-items:center;gap:10px;font-size:13px;line-height:1.4}
.term-tooltip p{margin:10px 0 8px}.term-tooltip small{color:var(--muted);font-size:10px}
.term-dialog{width:calc(100% - 24px);max-width:570px;padding:24px;max-height:88vh;max-height:88dvh;overscroll-behavior:contain;background:#fafbf8;border:1px solid var(--line);border-radius:23px}
.term-dialog-top{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px}
.term-close{background:#eef2eb;border:0;border-radius:50%;width:44px;height:44px;flex:0 0 44px;font-size:26px;color:var(--ink);line-height:1}
.term-dialog h2{font:400 34px/1.1 Georgia,serif;letter-spacing:-1px;margin:0 0 14px;outline:none}
.term-dialog-intro{font-size:13px;color:var(--muted);line-height:1.7;margin:0 0 20px}
.term-filters{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:18px}
.term-filters button{border:1px solid var(--line);border-radius:25px;background:#fff;min-height:44px;display:flex;gap:6px;align-items:center;padding:6px 10px;font-size:11px;color:var(--ink)}
.term-filters .term-icon{width:23px;height:23px;flex-basis:23px;border-radius:50%}.term-filters .term-icon svg{width:17px;height:17px}
.term-filters button[aria-pressed="true"]{box-shadow:inset 0 0 0 1px var(--term-color,var(--teal));border-color:var(--term-color,var(--teal));background:var(--term-tint,var(--mint))}
.term-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.term-list-item{display:flex;gap:10px;align-items:center;min-height:76px;padding:13px 11px;border:1px solid var(--line);border-radius:13px;background:#fff;text-align:left;color:var(--ink)}
.term-list-item:hover{border-color:var(--term-color);background:var(--term-tint)}
.term-list-item>span:nth-child(2){flex:1;min-width:0}.term-list-item strong{font-size:13px;line-height:1.35;display:block}.term-list-item small{display:block;font-size:10px;line-height:1.4;color:var(--muted);margin-top:4px}.term-list-item>span:last-child{color:var(--term-color)}
.term-back{display:block;min-height:44px;margin:-8px 0 15px;padding:0;border:0;background:none;color:var(--muted);font-size:12px}
.term-detail-category{display:flex;align-items:center;gap:9px;color:var(--term-color);font-size:11px;font-weight:650;margin-bottom:17px}
.term-detail-category .term-icon{width:38px;height:38px;flex-basis:38px;border-radius:12px}.term-detail-category svg{width:25px;height:25px}
.term-expanded{color:var(--term-color);font-size:13px;font-weight:600;margin:-3px 0 17px;line-height:1.5}
.term-definition{font-size:16px;line-height:1.75;margin:0 0 22px}
.term-connection{background:var(--term-tint);border-left:3px solid var(--term-color);border-radius:0 13px 13px 0;padding:17px 18px;margin-bottom:24px}
.term-connection .eyebrow{color:var(--term-color);font-size:9px;letter-spacing:1.2px}.term-connection>p:last-child{font-size:14px;line-height:1.75;margin:9px 0 0}
.term-related-label{font-size:11px;font-weight:650;color:var(--muted);margin:0 0 8px}.term-related{display:flex;gap:8px;flex-wrap:wrap}
.term-related button{display:flex;gap:7px;align-items:center;min-height:44px;padding:5px 10px 5px 6px;border:1px solid var(--line);border-radius:11px;background:#fff;color:var(--ink);font-size:12px}.term-related button:hover{border-color:var(--term-color)}
.term-source{display:inline-block;font-size:11px;line-height:1.6;margin-top:25px;min-height:44px;padding:12px 0;text-underline-offset:3px}
.term-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:380px){.term-dialog{padding:20px 17px}.term-list{grid-template-columns:1fr}.term-guide{padding:11px 12px}.term-guide-hint{font-size:9px}.term-key button{font-size:9px}.term-dialog h2{font-size:30px}}
@media(min-width:1100px){.term-guide{max-width:530px}}

.term-direction{display:flex;align-items:center;justify-content:center;gap:30px;margin:4px 0 24px;padding:18px;border:1px solid var(--line);border-radius:14px;background:white}.term-direction>span:not(.direction-arrow){display:flex;flex-direction:column;align-items:center;gap:4px;min-width:80px}.term-direction strong{font-size:12px}.term-direction small{font-size:10px;color:var(--muted)}.direction-arrow{font-size:30px;color:var(--term-color)}.direction-symbol{display:block;width:64px;height:56px;flex:none;color:var(--term-color)}.direction-hla{stroke:#285c98;fill:#edf3fc}.direction-tissue>rect{fill:#e5f0e8;stroke:#aac4b3}.direction-tissue>ellipse{fill:#b7a5c7;stroke:#8f7aa1}

@media(max-width:380px){.term-direction{gap:14px;padding:14px 10px}.term-direction>span:not(.direction-arrow){min-width:65px}}
