/* Key-term pages (phase 4 spec §1): the index table and one term's page (facts table,
   occurrences by chapter with the term highlighted). Tokens only; base.css does the rest. */

.t-zh { font-family: var(--font-zh); font-size: 1.25em; letter-spacing: 0.04em; }
.t-py { color: var(--text-muted); }

/* Index */
.terms-table { width: 100%; margin-top: var(--space-4); border-collapse: collapse; }
.terms-table th, .terms-table td { padding: var(--space-2) var(--space-2) var(--space-2) 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.terms-table thead th { color: var(--text-muted); font: 600 var(--step--1) var(--font-ui); }
.terms-table tbody th { font-weight: 400; white-space: nowrap; }
.terms-table tbody th a { text-decoration: none; }
.terms-table tbody th a .t-zh { color: var(--text); }
.terms-table .t-count { color: var(--text-muted); font-size: var(--step--1); }

/* Term page */
.crumbs { margin: 0 0 var(--space-2); font-size: var(--step--1); }
.term-intro p { margin: var(--space-3) 0; }
.term-facts { width: 100%; margin: var(--space-4) 0; border-collapse: collapse; font-size: var(--step--1); }
.term-facts caption { padding-bottom: var(--space-2); color: var(--text-muted); font: 600 var(--step--1) var(--font-ui); text-align: left; }
.term-facts th, .term-facts td { padding: var(--space-2) var(--space-3) var(--space-2) 0; border-top: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.term-facts th { width: 34%; color: var(--text-muted); font-weight: 400; }
.term-facts td.t-zh { font-size: var(--step-1); }
.t-chapters { line-height: 1.8; }
.t-ch { white-space: nowrap; }   /* a number and its comma never part at a line end */

.occ-chapter h3 { margin: var(--space-4) 0 0; font-size: var(--step-0); }
.occ-lines { margin: 0; padding: 0; list-style: none; }
.occ-lines li { padding: var(--space-3) 0; border-bottom: 1px solid var(--line); }
.occ-k { font: var(--step--1) var(--font-ui); color: var(--text-muted); }
.occ-lines .zh { margin-top: var(--space-1); font-size: calc(var(--step-2) * var(--user-scale, 1)); }
.occ-lines .tr { font-size: calc(var(--step-0) * var(--user-scale, 1)); }
/* The term itself: an underline in the accent colour, so the text colour stays readable. */
.zh .w.hl { color: var(--text); box-shadow: inset 0 -0.12em 0 var(--red); }
.zh .w.hl rt { color: var(--text); }

.term-related ul { margin: 0; padding: 0; list-style: none; }
.term-related li { padding: var(--space-1) 0; }
.term-related .t-gloss { color: var(--text-muted); }
.term-all { margin-top: var(--space-5); }
.term-facts .t-chapters a { display: inline-block; min-width: 1.5rem; padding: 0.1rem 0; text-align: center; }   /* one- and two-digit links: 24px wide to tap */
