/* Practice › Clients › Client Rankings (#rankings): strip, Standouts, the ranking table (client column pinned on narrow
   screens; the table scrolls inside its box, never the page). .rm-tabs from hub.css; .ch-fbtn and .ch-sort from styles.css. */
/* The page never grows wider than the screen: the table scrolls inside its box. */
[data-page="rankings"] { grid-template-columns: minmax(0, 1fr); }
[data-page="rankings"] > * { min-width: 0; }
.rk-tabs { margin: 14px 0 6px; }
.rk-period { margin: 0 0 12px; }
.rk-acts { display: flex; gap: 6px; }
.rk-kpis { margin: 4px 0 14px; }
.rk-kpis .kpi b { font-size: 30px; }
.rk-kpis .kpi:disabled { opacity: 1; cursor: default; }
.rk-kpis .kpi:disabled:hover { transform: none; border-color: var(--line); }
.rk-sub { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }
.rk-h { margin: 0 0 8px; font-size: 15px; }
.rk-stand { margin-bottom: 14px; }
.rk-lines { list-style: none; margin: 0; padding: 0; }
.rk-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.rk-lines li:first-child { border-top: 0; }
.rk-sr { text-align: right; }
.rk-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 12px; }
.rk-tools .search { margin-left: auto; }
.rk-tbl td, .rk-tbl th { white-space: nowrap; }
.rk-tbl td { font-size: 13px; }
.rk-tbl td small { font-size: 11.5px; }
.rk-tbl th:nth-child(2), .rk-tbl td:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--panel); }
.rk-tbl th:nth-child(2) { z-index: 3; }
.rk-tbl tfoot td { font-weight: 700; border-top: 1px solid var(--line); background: var(--panel); }
.rk-name { font-weight: 600; text-decoration: none; }
.rk-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.rk-nm { color: var(--amber); font-size: 12px; font-weight: 600; }
.rk-under { color: var(--amber); font-weight: 600; }
.rk-over { color: var(--pma-blue); font-weight: 600; }
.rk-red { color: var(--red); font-weight: 600; }
.rk-tbl tr.rk-amber td:nth-child(2) { box-shadow: inset 4px 0 0 var(--amber); }
.rk-tier { display: inline-block; min-width: 22px; text-align: center; font-size: 11px; font-weight: 700; padding: 1px 6px; border-radius: 99px; background: var(--line-2); color: var(--ink); }
.rk-tier.tA { background: var(--green-soft); color: var(--green); }
.rk-tier.tB { background: var(--pma-blue-soft); color: var(--pma-blue-ink); }
.rk-unmatched { margin-top: 14px; }
.rk-unmatched summary { cursor: pointer; font-weight: 600; font-size: 13px; color: var(--amber); }
.rk-unmatched .table-wrap { margin: 10px 0 0; }
@media (max-width: 760px) {
  .rk-tools .search { margin-left: 0; width: 100%; }
  .rk-tools .search input { min-width: 0; width: 100%; }
  .rk-lines li { flex-direction: column; gap: 2px; }
  .rk-sr { text-align: left; }
  .page-head .rk-acts { flex-wrap: wrap; }
}
/* Their business */
.rk-modes { margin: 0 0 12px; }
.rk-kpis5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1180px) { .rk-kpis5 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .rk-kpis5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rk-note { margin: -6px 0 12px; }
.rk-cw { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rk-cl small { display: block; font-size: 11px; }
.rk-cur { color: var(--violet); font-weight: 700; }
.rk-re { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 6px; }
.rk-re:hover { color: var(--ink); background: var(--line-2); }
.rk-upm { color: var(--green); font-weight: 600; }
.rk-downm { color: var(--red); font-weight: 600; }
.rk-tbl sup { font-size: 9px; margin-left: 1px; }
.rk-ul { margin: 8px 0; padding-left: 18px; font-size: 13px; }
/* Match to a Xero customer (by hand) */
.rk-msearch { display: flex; margin: 10px 0; }
.rk-msearch input { width: 100%; min-width: 0; padding: 8px 0; }
.rk-mlist { max-height: 340px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; }
.rk-mrow { display: grid; grid-template-columns: 18px 1fr; gap: 10px; padding: 8px 10px; border-top: 1px solid var(--line-2); cursor: pointer; font-size: 13px; }
.rk-mrow:first-child { border-top: 0; }
.rk-mrow small { display: block; }
.rk-mlist > p { margin: 10px; }
