/* kijk.css -- the viewing figures screen (kijk.js): tables with a number per site, every number a button. Tokens from core.css. */

.kj-card { width: 1000px; max-width: calc(100vw - 16px); max-height: calc(100vh - 32px); overflow: auto; position: relative; }
.kj-head { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; }
.kj-h { margin: 0; flex: 1; font-size: calc(var(--ui-fs) * 18 / 13); font-weight: 600; color: var(--text-strong); }
.kj-x { background: none; border: 0; color: var(--text-dim); font-size: 22px; line-height: 1; padding: 2px 6px; border-radius: var(--radius-sm); cursor: pointer; }
.kj-x:hover { background: var(--hover); color: var(--text); }
.kj-x:focus-visible, .kj-num:focus-visible, .kj-period:focus-visible { outline: 1px solid var(--focus); outline-offset: 1px; }

.kj-body { display: flex; flex-direction: column; gap: 14px; }
.kj-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.kj-lab { color: var(--text-dim); }
.kj-period { min-height: 32px; margin-left: 6px; }
.kj-run { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }
.kj-redtext { color: var(--danger); }
.kj-h3 { margin: 0 0 4px; font-size: calc(var(--ui-fs) * 11 / 13); letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.kj-wrap { overflow-x: auto; }
.kj-table { border-collapse: collapse; width: 100%; }
.kj-table th, .kj-table td { padding: 4px 8px; border-bottom: 1px solid var(--rule); text-align: right; white-space: nowrap; }
.kj-table thead th { font-weight: 400; color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); vertical-align: bottom; }
.kj-table th.kj-key, .kj-table td.kj-key { text-align: left; }
.kj-table th.kj-key { font-weight: 500; color: var(--text-strong); white-space: normal; min-width: 120px; overflow-wrap: anywhere; }
.kj-sub { color: var(--text-dim); }
.kj-total { font-weight: 600; }
.kj-num { min-width: 36px; min-height: 28px; background: none; border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; color: var(--text-strong); cursor: pointer; text-decoration: underline; text-decoration-color: var(--rule); }
.kj-num:hover:not(:disabled) { border-color: var(--text-dim); }
.kj-zero, .kj-num:disabled { color: var(--text-muted); cursor: default; text-decoration: none; }
.kj-flag { display: block; font-size: calc(var(--ui-fs) * 10 / 13); color: var(--attn); line-height: 1; }
.kj-path { display: block; font-weight: 400; font-size: calc(var(--ui-fs) * 11 / 13); color: var(--text-muted); }
.kj-none, .kj-note { color: var(--text-muted); margin: 0; font-size: calc(var(--ui-fs) * 12 / 13); }

.kj-list { position: absolute; inset: 0; z-index: 2; overflow: auto; padding: 14px; background: var(--bg-panel, var(--bg, Canvas)); }
.kj-lh { display: flex; align-items: center; gap: 12px; }
.kj-lt { margin: 0; flex: 1; font-size: calc(var(--ui-fs) * 15 / 13); color: var(--text-strong); overflow-wrap: anywhere; }
.kj-rows { display: flex; flex-direction: column; margin-top: 10px; }
.kj-row { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--rule); }
.kj-rt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.kj-val { font-weight: 600; white-space: nowrap; }
.kj-why { color: var(--text-dim); font-size: calc(var(--ui-fs) * 12 / 13); }

@media (max-width: 480px) {
  .kj-table th, .kj-table td { padding: 4px 6px; }
  .kj-table th.kj-key { min-width: 90px; }
}
