/* Rhetoric Search. Built on shared/css/tsm.css tokens only. */
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-family: var(--mono); font-size: 11.5px; background: var(--chip); padding: 0 3px; border-radius: 3px; }
.qbox { display: flex; gap: 8px; padding: 10px; }
.qbox input { flex: 1 1 auto; min-width: 0; font: 17px var(--body); padding: 9px 12px; border: 1px solid var(--rule); border-radius: 3px; background: var(--bg); color: var(--ink); }
.qbox .btn { font-size: 14px; padding: 9px 16px; }
.toolbar-row { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: end; }
.seg { display: flex; flex-wrap: wrap; gap: 4px; grid-template-columns: none; }
.seg button { padding: 6px 11px; font-weight: 600; }
.pick { display: flex; flex-direction: column; gap: 2px; font-size: 11.5px; color: var(--muted); min-width: 0; }
.pick select, .pick input { font: 13.5px var(--body); padding: 5px 7px; border: 1px solid var(--rule); border-radius: 3px; background: var(--panel); color: var(--ink); max-width: 100%; }
.pick select { max-width: 260px; }
.summary { display: flex; flex-direction: column; gap: 4px; }
.count { margin: 0; font: 600 21px/1.2 var(--display); }
.count .num { font-family: var(--display); }
.progress { height: 4px; background: var(--chip); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.chart { padding: 10px 12px 6px; position: relative; }
.chart-head { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; justify-content: space-between; }
.chart h2 { margin: 0; font-size: 16px; }
#hist { display: block; width: 100%; height: 150px; }
#hist .col { cursor: pointer; }
#hist .bar { fill: var(--c7); }
#hist .bar.med { fill: var(--c5); }
#hist .col:hover .bar, #hist .col.on .bar { fill: var(--accent); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12px; color: var(--muted); }
.legend .key { display: inline-flex; gap: 5px; align-items: center; }
.legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; }
.k-off { background: var(--c7); } .k-med { background: var(--c5); }
.count .sep { color: var(--muted); }
.hit.media { border-left-style: dashed; }
.hit .mt { margin: 5px 0 3px; font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.hit .tag { color: var(--warn); }
#hist .grid { stroke: var(--rule); }
.results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hit { background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid var(--c1); border-radius: 4px; padding: 10px 12px; }
.hit[data-cc="RU"] { border-left-color: var(--red); }
.hit[data-cc="IR"] { border-left-color: var(--c3); }
.hit[data-cc="CN"] { border-left-color: var(--prc); }
.hit .m { display: flex; flex-wrap: wrap; gap: 2px 10px; font: 11.5px var(--mono); color: var(--muted); }
.hit .m b { color: var(--ink); font-weight: 500; }
.hit .s { margin: 5px 0 4px; font-size: 14.5px; line-height: 1.5; }
.hit mark { background: color-mix(in oklab, var(--accent) 32%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.hit .t { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.hit .t a { font-weight: 600; }
.more { align-self: center; }
.tips { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
#corpus table { width: 100%; border-collapse: collapse; font-size: 12px; }
#corpus td { padding: 3px 4px; border-bottom: 1px solid var(--rule); vertical-align: top; }
#corpus td.num { text-align: right; white-space: nowrap; }
#corpus .stopped { color: var(--muted); font-size: 11px; }
body.loading .stage { opacity: .6; }
.rs-pages { max-width: 1400px; margin: 12px auto 0; display: flex; gap: 4px; }
.rs-pages a { padding: 6px 14px; border: 1px solid var(--rule); border-radius: 3px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 13px; }
.rs-pages a[aria-current="page"] { color: var(--ink); border-color: var(--accent); background: var(--panel); }
#app { margin-top: 12px; }
@media (max-width: 520px) {
  .qbox { flex-wrap: wrap; }
  .qbox .btn { flex: 1 1 100%; }
  .pick select { max-width: calc(100vw - 40px); }
  .count { font-size: 18px; }
}
.linkbtn { font: inherit; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
.reader { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1px solid var(--rule); border-radius: 4px; background: var(--panel); color: var(--ink); display: none; flex-direction: column; }
.reader[open] { display: flex; }
.reader::backdrop { background: rgba(0, 0, 0, .45); }
.reader-head { display: flex; gap: 12px; align-items: start; justify-content: space-between; padding: 12px 16px 10px; border-bottom: 1px solid var(--rule); }
.reader-hd { min-width: 0; }
.reader h2 { margin: 0 0 4px; font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.reader .m { display: flex; flex-wrap: wrap; gap: 2px 10px; font: 11.5px var(--mono); color: var(--muted); }
.reader .t { margin-top: 4px; font-size: 12.5px; }
.reader .t a { font-weight: 600; }
.reader-body { overflow: auto; padding: 8px 16px 16px; font-size: 15px; line-height: 1.6; }
.reader-body p { margin: 0 0 .8em; overflow-wrap: anywhere; }
.reader mark { background: color-mix(in oklab, var(--accent) 32%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
