/* Scoped additions retain the current palette, typography and motion preferences. */
.term-subnav{display:flex;flex-wrap:wrap;gap:.4rem;margin:0 0 1.2rem}
.term-toolbar{display:flex;flex-wrap:wrap;gap:1rem;margin:1rem 0;align-items:end}
.term-toolbar>label{flex:1 1 200px;display:grid;gap:.4rem;font-weight:600}
.term-toolbar input,.term-toolbar select,.term-quiz input,.term-quiz textarea,.term-matches select{width:100%;min-width:0}
.term-toolbar>.term-check{display:flex;align-items:center;font-size:.9rem;flex:0 1 auto;padding:.5rem 0}
.term-check input,.term-multi input{width:auto;min-height:20px;accent-color:#9b78b7}
.term-layout{display:grid;grid-template-columns:minmax(210px,290px) minmax(0,1fr);gap:1.3rem;align-items:start}
.term-index{padding:1rem;position:sticky;top:110px}
.term-list{max-height:60vh;overflow:auto;overscroll-behavior:contain}
.term-index-item{display:block;width:100%;padding:.8rem;text-align:left;border:1px solid transparent;border-radius:12px;background:transparent;margin-bottom:.25rem;color:inherit;cursor:pointer}
.term-index-item small{display:block;font-size:.8rem;color:#716779;margin-top:.3rem}
.term-index-item.active{background:#f3e7fa;border-color:#ccb2df}
.term-simple{font-size:1.15rem;line-height:1.55;color:#4f3e61}
.term-definition details{margin:1rem 0;padding:.75rem;background:#faf6fd;border-radius:12px}
.term-definition summary,.case-terminology summary,.term-result summary{cursor:pointer;font-weight:650;min-height:36px}
.term-definition h3{font-size:1rem;margin:.9rem 0 .4rem}
.term-memory{background:#fff5de;padding:.85rem;border-radius:12px;line-height:1.5}
.term-cell-links{margin-bottom:1rem;padding:1rem;background:#f4ecfc;border:1px solid #ded0ee;border-radius:16px}
.term-cell-links h3{margin:0}
.term-link{white-space:normal;text-align:left}
.term-progress{width:100%;height:10px;border:0;border-radius:10px;accent-color:#a67bbd;margin:1rem 0}
.term-stats{display:flex;justify-content:space-between;flex-wrap:wrap;gap:.5rem;font-size:.9rem}
.flashcard-shell{max-width:760px;margin:0 auto;background:linear-gradient(145deg,#fffafd,#f2f2ff)}
.flashcard-top,.flashcard-navigation{display:flex;justify-content:space-between;align-items:center;gap:.8rem;flex-wrap:wrap}
.flashcard-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;width:100%;min-height:260px;padding:1.5rem;margin:1rem 0;border:1px solid #dfcbe8;border-radius:22px;background:#fff9fc;color:#45364f;cursor:pointer;box-shadow:0 7px 0 #f0e5f5;transition:background .2s ease,transform .2s ease}
.flashcard-face.is-flipped{background:#edf7f5}
.flashcard-face:active{transform:scale(.99)}
.flashcard-face strong{font-size:clamp(1.2rem,3vw,1.8rem);line-height:1.5;max-width:95%}
.flashcard-label{font-size:.8rem;letter-spacing:.08em;text-transform:uppercase;color:#776382}
.flash-star{font-size:1.8rem;color:#e4b87f}
.flashcard-explanation{margin:1rem 0;padding:1rem;background:#fff;border-radius:14px}
.clinical-pattern-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;margin:1rem 0}
.clinical-pattern-grid h2{font-size:1.2rem}
.word-parts{display:flex;flex-wrap:wrap;gap:.5rem;margin:1rem 0}
.term-multi{display:flex;align-items:start;gap:.7rem;margin:1rem 0;font-weight:400}
.term-matches{display:grid;gap:1rem}
.term-result,.case-terminology{margin:1rem 0;padding:1rem;border:1px solid #ded0ee;background:#faf6fd;border-radius:14px}
.case-terminology>div{padding:.5rem 0;border-bottom:1px solid #e7dbef}
.term-return{margin-bottom:1rem}
.term-quiz fieldset{border:1px solid #ded0ee;border-radius:14px;margin:1rem 0}
@media(max-width:800px){.term-layout{grid-template-columns:1fr}.term-index{position:static}.term-list{max-height:220px}.clinical-pattern-grid{grid-template-columns:1fr}.term-toolbar{gap:.65rem}.flashcard-face{min-height:230px}.term-subnav button{font-size:.9rem}.flashcard-shell{padding:1rem}}
@media(prefers-reduced-motion:reduce){.flashcard-face{transition:none}}
body.animations-off .flashcard-face{transition:none}
