/* the token page (/token/<token>): headline tiles, tabs, sections, tables */
.tk-tabs { margin-top: 14px; border-bottom: 1px solid #e3e6eb; }
.tk-tabs .tk-tab { padding: 8px 18px !important; border: none !important; border-bottom: 2px solid transparent !important; background: none !important; color: #555;
                   font: 500 14px system-ui, sans-serif; }
.tk-tabs .tk-tab--on { border-bottom-color: #1a56db !important; color: #111 !important; font-weight: 600; }
.tk-pane { padding-top: 12px; }
.tk-h2 { margin: 26px 0 4px; font: 600 15px system-ui, sans-serif; }
.tk-ext { margin-left: 4px; color: #999 !important; font-size: 11px; text-decoration: none; }
.tk-input { width: 100%; box-sizing: border-box; padding: 7px 8px; border: 1px solid #ccc; border-radius: 4px; font: 13px system-ui, sans-serif; }
.tk-input-wide { font-family: ui-monospace, monospace; }
.dash-table-container .dash-spreadsheet-container .dash-spreadsheet-inner td .dash-cell-value a { color: #999; text-decoration: none; }
.tk-title { margin: 8px 0 2px; font: 600 20px system-ui, sans-serif; }
.tk-page .controls { margin-top: 10px; }
.tk-kpis-load { position: relative; overflow: hidden; }  /* the headline tiles' loading runner stays inside their row, never over the tabs below */
.tk-kpis-load .rv-runner { width: 54px; }
.tk-kpis-box { min-height: 76px; }
.tk-load { position: relative; }  /* a tab's one loading wrapper: tall enough that the runner never spills over the controls above */
.tk-block { min-height: 240px; }
.tk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 14px 0 4px; }
.tk-kpi { border: 1px solid #e3e6eb; border-radius: 8px; padding: 8px 12px; background: #fafbfc; }
.tk-kpi-label { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .04em; }
.tk-kpi-value { font: 600 18px/1.3 system-ui, sans-serif; color: #111; font-variant-numeric: tabular-nums; }
.tk-kpi-sub { font-size: 11px; color: #6b7280; }
/* Insiders: question cards, a short answer as a chip */
.tk-qs { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tk-chip-row { margin: 8px 0 6px; }
.tk-q-value { font-size: 16px; }
.tk-chip { display: inline-block; font: 600 11px/1.7 system-ui, sans-serif !important; text-transform: uppercase; letter-spacing: .06em; padding: 0 8px;
           border: 1px solid currentColor; border-radius: 3px; white-space: nowrap; }
.tk-q-weak .tk-chip { border-style: dashed; color: #6b7280; }
.tk-section { margin-top: 26px; }
.tk-h { margin: 0 0 2px; font: 600 16px system-ui, sans-serif; }
.tk-intro { margin-bottom: 6px; max-width: 110ch; }
.tk-sub { margin: 16px 0 4px; font: 600 13px system-ui, sans-serif; }
.tk-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tk-paths { flex: 1 1 520px; min-width: 0; }
.tk-summary { flex: 1 1 420px; min-width: 0; padding-top: 34px; }
.tk-bykind { flex: 1 1 380px; min-width: 0; }
.tk-recent { flex: 2 1 560px; min-width: 0; max-height: 520px; overflow-y: auto; }
.tk-scroll { overflow-x: auto; }
.tk-table { border-collapse: collapse; font: 12px/1.4 system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.tk-table th, .tk-table td { padding: 3px 12px 3px 0; text-align: right; white-space: nowrap; }
.tk-table th { color: #666; font-weight: 600; border-bottom: 1px solid #ddd; position: sticky; top: 0; background: #fff; }
.tk-table td:has(a), .tk-table td:has(.tk-chip), .tk-table th:first-child, .tk-table td:first-child { text-align: left; }
.tk-table th.l { text-align: left; }
.tk-table a { color: #1a56db; text-decoration: none; }
.tk-table a:hover { text-decoration: underline; }
.tk-table .tk-base td { color: #777; border-top: 1px solid #eee; }
.tk-dim { color: #999; font-size: 11px; }
.tk-chip { display: inline-block; border: 1px solid; border-radius: 9px; padding: 0 7px; font-size: 11px; line-height: 16px; background: #fff; }
.tk-nets { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 12px; color: #444; margin: 4px 0 8px; }
.tk-details { margin-top: 8px; }
.tk-pending:not(:has(*)) { color: #888; font-size: 14px; }

@media (max-width: 700px) {
  .tk-kpis { grid-template-columns: repeat(2, 1fr); }
  .tk-kpi-value { font-size: 16px; }
  .tk-summary { padding-top: 0; }
}

/* phone: the pinned first column of a table stays narrow (its text scrolls sideways inside, no scrollbar) so the other columns keep room */
@media (max-width: 700px) {
  .dash-table-container .dash-spreadsheet-inner th.column-0,
  .dash-table-container .dash-spreadsheet-inner td.column-0 { width: 112px !important; min-width: 112px !important; max-width: 112px !important; }
  .dash-table-container .dash-spreadsheet-inner td.column-0 div.dash-cell-value { display: block !important; padding-top: 9px; max-width: 100%; overflow-x: auto !important; overflow-y: hidden; text-overflow: clip !important; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .dash-table-container .dash-spreadsheet-inner td.column-0 div.dash-cell-value::-webkit-scrollbar { display: none; }
}
