.word-counts { max-width: 960px; margin: 1.5rem auto; font-family: "DejaVu Sans", system-ui, sans-serif; color: #333; }
.word-counts [hidden] { display: none !important; }
.word-counts .counts-interactive { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 2rem; align-items: stretch; }
.word-counts .counts-text { display: flex; flex-direction: column; justify-content: space-between; font-size: 1.15rem; line-height: 1.5; }
.word-counts .counts-excerpt { font-size: inherit; line-height: inherit; margin: 1rem 0; user-select: none; -webkit-user-select: none; }
.word-counts .counts-surrounding { color: #aaa; font-size: inherit; line-height: inherit; white-space: pre-line; }
.word-counts .counts-ellipsis { fill: #aaa; }
.word-counts .counts-token { border-radius: 3px; padding: .15em .12em; cursor: default; }
.word-counts .counts-token.is-context { background: #eee6bb; }
.word-counts .counts-token.is-center { background: #44aa99; color: white; }
.word-counts svg { display: block; width: 100%; height: auto; user-select: none; }
.word-counts svg text { font-family: inherit; font-size: 16px; fill: #333; }
.word-counts .counts-cell rect { fill: #f7f7f5; stroke: white; stroke-width: 1.5; }
.word-counts .counts-cell.is-column rect { fill: #f5f0da; }
.word-counts .counts-cell.is-row rect { fill: #d9eee9; }
.word-counts .counts-cell.is-active rect { fill: #ddcc77; }
.word-counts .counts-row.is-active { fill: #278474; font-weight: bold; }
.word-counts .counts-column.is-active { font-weight: bold; text-decoration: underline; }
@media (max-width: 760px) {
  .word-counts .counts-interactive { grid-template-columns: 1fr; gap: .5rem; }
  .word-counts .counts-matrix-panel { max-width: 500px; width: 100%; }
}
@media print {
  .word-counts .counts-interactive { display: none !important; }
  .word-counts .counts-fallback { display: block !important; }
}
