/* pa-sort.css · 30 Nov 2026 (WAT) · the directory Sort. JS: pa-sort.js. The shell (.pp), its motion and the sheet are the kit's (kit/period.css);
   rows are the Filters box's (.flp, pa-filters.css). Tokens only. Screen only. */
/* at rest: the sort mark, its arrow pointing the way it is sorted, and the measure. Like Filters and Export, no chevron */
body:not(.rp-body) .pa-sortm { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 8px; margin-right: -8px; border: 0; border-radius: var(--radius-xs); background: none; font: inherit; font-size: var(--font-size-13); color: var(--color-text-primary); white-space: nowrap; cursor: pointer; transition: transform var(--motion-duration-press) var(--motion-easing-out); }
.pa-sortm svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; color: var(--color-text-secondary); }
.pa-sortm[data-d="0"] svg { transform: scaleY(-1); }
.pa-sortm:active { transform: scale(0.97); }
.pa-sortm:focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); }
.pa-sortm[aria-expanded="true"] { background: var(--color-bg-surface); }
@media (hover: hover) and (pointer: fine) { .pa-sortm:hover { background: var(--color-bg-surface); } }

/* the box */
.pp.srt { width: 208px; }
.srt__l { padding: 4px; flex: 0 1 auto; }
.srt .flp__i { flex: none; }
.srt :is(.flp__i, .srt__w button):focus { outline: none; }
.srt :is(.flp__i, .srt__w button):focus-visible { outline: var(--focus-ring-width) solid var(--focus-ring-color); outline-offset: -2px; }
.srt .srt__more { color: var(--color-text-secondary); }
/* the switch */
.srt__w { flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 4px; border-top: 1px solid var(--color-border-subtle); }
.srt .srt__w button { display: flex; align-items: center; justify-content: center; gap: 4px; height: 28px; border-radius: var(--radius-xs); font-size: var(--font-size-12); color: var(--color-text-secondary); white-space: nowrap; }
.srt .srt__w svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.srt .srt__w [data-d="0"] svg { transform: scaleY(-1); }
.srt .srt__w [aria-checked="true"] { background: var(--color-bg-surface); color: var(--color-text-primary); font-weight: var(--font-weight-medium); }
.srt .srt__w button:active { transform: scale(0.97); }
.srt .srt__w button { transition: transform var(--motion-duration-press) var(--motion-easing-out); }
@media (hover: hover) and (pointer: fine) { .srt .srt__w button:hover { color: var(--color-text-primary); } }

/* phone: the sheet, 44px */
@media (max-width: 760px) { body:not(.rp-body) .pa-sortm { height: 44px; } }
.srt.pp--sheet .srt__l { padding: 8px; }
.srt.pp--sheet .flp__i { font-size: var(--font-size-14); }
.srt.pp--sheet .srt__w { padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); }
.srt.pp--sheet .srt__w button { height: 44px; font-size: var(--font-size-14); }
@media (prefers-reduced-motion: reduce) { .pa-sortm:active, .srt .srt__w button:active { transform: none; } }
