.ps-scope, .ps-queues, .ps-filters, .ps-form-grid, .ps-detail-grid {
  display: grid;
  gap: 14px;
}
.ps-queues { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 20px; }
.ps-queue {
  display: grid;
  gap: 5px;
  align-content: start;
  text-align: left;
  color: var(--ink);
  background: white;
  border: 1px solid #d8e3e6;
  border-top: 3px solid #568590;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
}
.ps-queue[data-id="due"] { border-top-color: #ad6442; }
.ps-queue[data-id="unscheduled"] { border-top-color: #8067a5; }
.ps-queue[data-id="engaged"] { border-top-color: #487497; }
.ps-queue[data-id="research"] { border-top-color: var(--work-amber); }
.ps-queue[aria-pressed="true"] { background: #e8f3f5; box-shadow: inset 0 0 0 1px #568590; }
.ps-queue strong { font-size: 1.8rem; line-height: 1.1; }
.ps-queue small, .ps-table small { color: var(--muted); }
.ps-scope { grid-template-columns: repeat(2, minmax(0, 16rem)); }
.ps-scope label { margin: 0; }
.ps-filters { grid-template-columns: 2fr 1fr 1fr 1.4fr; }
.ps-form-grid, .ps-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ps-table { min-width: 620px; }
.ps-table th[scope="row"] { text-align: left; padding-top: 12px; vertical-align: top; }
.ps-table th:nth-child(n), .ps-table td:nth-child(n) { display: table-cell; }
.ps-signals { display: flex; flex-wrap: wrap; gap: 5px; }
.ps-table td small, .ps-table th small { display: block; font-weight: normal; margin-top: 3px; }
.ps-record-link { text-align: left; padding: 0; }
.ps-empty { padding: 22px; }
.ps-result-count { margin: 0 0 12px; }
.ps-contact { margin: 0; }
.ps-contact div { display: grid; grid-template-columns: 5rem 1fr; gap: 10px; margin: 4px 0; }
.ps-contact dt { font-weight: 650; }
.ps-contact dd { margin: 0; overflow-wrap: anywhere; }
.ps-history { list-style: none; padding: 0; margin: 0; }
.ps-history li { border-top: 1px solid #d8e3e6; padding: 15px 0; }
.ps-entry-date { margin: 4px 0; }
.ps-note { white-space: pre-wrap; overflow-wrap: anywhere; }
.ps-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.ps-links:empty { display: none; }
.ps-sales-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; }
.ps-sales-grid .panel-header { margin-bottom: 12px; }
.ps-priorities ol, .ps-stage-bars { list-style: none; padding: 0; margin: 0; }
.ps-priorities li { border-top: 1px solid var(--line); padding: 11px 0; }
.ps-priorities li:last-child { padding-bottom: 0; }
.ps-priorities li p { margin: 3px 0; overflow-wrap: anywhere; }
.ps-priority-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.ps-priority-title .ps-record-link { min-height: 30px; font-size: 1rem; }
.ps-stage-bars li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) 2ch; align-items: center; gap: 8px; margin: 10px 0; font-size: .88rem; }
.ps-stage-bars meter, .ps-goal progress { width: 100%; height: 12px; accent-color: var(--work-color, var(--work-green)); }
.ps-stage-bars meter { appearance: none; }
.ps-stage-bars meter::-webkit-meter-bar { background: #edf1f4; border: 0; border-radius: 20px; }
.ps-stage-bars meter::-webkit-meter-optimum-value { background: var(--work-color); border-radius: 20px; }
.ps-stage-bars meter::-moz-meter-bar { background: var(--work-color); border-radius: 20px; }
.ps-goal { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.ps-goal p { margin-bottom: 5px; }
.ps-recent-sales { margin-top: 8px; }
.ps-script-text { min-height: 10rem; }
.ps-roster { margin-top: 14px; font-size: .9rem; }
.ps-roster summary { cursor: pointer; color: var(--teal); font-weight: 650; }
.ps-roster p { margin: 8px 0; }
.ps-assessments { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.ps-assessments button { border: 1px solid transparent; }
.ps-assessments button[aria-pressed="true"] { border-color: currentColor; }
.ps-assessments strong { margin-left: 3px; }
.ps-verify { display: flex; align-items: flex-start; gap: 8px; }
.ps-verify input { width: auto; margin: 4px 0 0; }
@media (max-width: 1000px) {
  .ps-queues, .ps-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ps-sales-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ps-table { display: block; min-width: 0; }
  .ps-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ps-table tbody { display: grid; gap: 10px; }
  .ps-table tbody tr {
    display: grid;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 9px;
    padding: 12px;
  }
  .ps-table tbody th:nth-child(n), .ps-table tbody td:nth-child(n) {
    display: block;
    padding: 0;
    border: 0;
  }
  .ps-table .ps-record-link { min-height: 32px; }
}
@media (max-width: 580px) {
  .ps-scope, .ps-filters, .ps-form-grid, .ps-detail-grid { grid-template-columns: 1fr; gap: 8px; }
  .ps-queue { padding: 12px; }
}
