/* 專有名詞、搜尋、標籤、靜態頁（模組 D）—— 搭配 front.css 變數 */
.gloss-search { position: relative; }
.gloss-search input { height: 50px; border-radius: 999px !important; padding-left: 48px; background: var(--surface-2); border-color: transparent; }
.gloss-search .bi-search { position: absolute; left: 19px; top: 50%; transform: translateY(-50%); color: var(--text-3); z-index: 5; pointer-events: none; }
.gloss-search .btn { position: absolute; right: 5px; top: 5px; height: 40px; z-index: 5; }

.gloss-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gloss-cat { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: transform .15s, box-shadow .15s; }
.gloss-cat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); color: var(--text); }
.gloss-cat.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.gloss-cat strong { display: block; font-size: .98rem; }
.gloss-cat span.n { font-size: .78rem; color: var(--text-3); }

.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gloss-item { display: block; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--text); transition: background .15s; }
.gloss-item:hover { background: var(--surface-3); color: var(--text); }
.gloss-item strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.gloss-item span { font-size: .84rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.55; }

.term-head { display: flex; gap: 16px; align-items: flex-start; }
.term-head h1 { font-size: 1.9rem; font-weight: 900; margin: 0; line-height: 1.25; }
.term-aliases { color: var(--text-2); font-size: .9rem; margin-top: 6px; }
.def-box { margin-top: 18px; padding: 16px 20px; border-radius: 18px; background: linear-gradient(120deg, var(--brand-soft), var(--surface-2)); font-size: 1.12rem; font-weight: 700; line-height: 1.7; }
.def-box .label { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .06em; color: var(--brand-soft-text); margin-bottom: 4px; }
.term-section { margin-top: 26px; }
.term-section > h2 { font-size: 1.08rem; font-weight: 800; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.term-section .md { line-height: 1.95; font-size: 1.02rem; }
.term-section .md p { margin-bottom: .9rem; }
.md blockquote, .md .blockquote-note { border-left: 4px solid var(--brand); background: var(--surface-2); padding: 10px 16px; border-radius: 0 12px 12px 0; color: var(--text-2); margin: 0 0 1rem; }
.law-list { list-style: none; margin: 0; padding: 0; }
.law-list li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px dashed var(--line-strong); }
.law-list li:first-child { border-top: 0; }
.revision-list { list-style: none; padding: 0; margin: 0; font-size: .88rem; }
.revision-list li { padding: 8px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.revision-list li:first-child { border-top: 0; }

/* 搜尋 */
.search-term-hit { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: linear-gradient(120deg, var(--brand-soft), var(--surface-2)); text-decoration: none; color: var(--text); }
.search-term-hit:hover { color: var(--text); filter: brightness(.98); }
.search-term-hit strong { font-size: 1.15rem; }
.search-filters .form-select, .search-filters .form-control { font-size: .9rem; }
mark, .mark { background: rgba(250, 204, 21, .45); color: inherit; border-radius: 3px; padding: 0 .1em; }

/* 標籤雲 */
.tag-cloud .chip { font-size: .92rem; }
.tag-cloud .chip.lg { font-size: 1.05rem; padding: 8px 15px; }

/* 靜態頁 */
.doc-body { font-size: 1.02rem; line-height: 1.95; }
.doc-body h2 { font-size: 1.3rem; font-weight: 800; margin: 2rem 0 .8rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc-body h3 { font-size: 1.1rem; font-weight: 800; margin: 1.6rem 0 .6rem; scroll-margin-top: calc(var(--header-h) + 16px); }
.doc-body h4, .doc-body h5 { font-size: 1rem; font-weight: 800; margin: 1.2rem 0 .5rem; }
.doc-body ul, .doc-body ol { padding-left: 1.4rem; margin-bottom: 1rem; }
.doc-body li { margin-bottom: .3rem; }
.doc-body hr { margin: 2rem 0; opacity: .12; }
.doc-body code { background: var(--surface-2); color: var(--text); padding: .1em .35em; border-radius: 6px; }
.toc { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.toc li a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--text-2); text-decoration: none; }
.toc li a:hover { background: var(--surface-2); color: var(--text); }
.toc li.lv3 a { padding-left: 24px; font-size: .85rem; }
.term-section .md h2, .term-section .md h3, .term-section .md h4 { font-size: 1.02rem; font-weight: 800; margin: 1.1rem 0 .45rem; }
.term-section .md h2:first-child, .term-section .md h3:first-child { margin-top: 0; }
.term-section .md ul { padding-left: 1.3rem; }
