/* @ekm-tags: style, misc, ui-shell */
/* @ekm-tags+: ui-shell */
/* Command palette (⌘K / Ctrl+K), "Pearl Ledger" direction A: a sheet over a soft scrim, one field, hairline rows grouped
   under small-caps eyebrows, a text shortcut hint on each row. Colours and type come only from the shared --ekm-ds-*
   tokens (css/ekm-ds.css; light on :root, dark under html[data-dark]), so the v2 token set restyles it with no change
   here. No pills, no fills on actions; every row is at least 44px; a full-screen sheet at phone width. */
.ekmk-root{position:fixed;inset:0;z-index:100050;display:flex;justify-content:center;align-items:flex-start;padding:12vh 16px 16px;box-sizing:border-box;background:transparent}
.ekmk-root[hidden]{display:none}
.ekmk-scrim{position:absolute;inset:0;background:color-mix(in srgb,var(--ekm-ds-text,#09090b) 28%,transparent)}
.ekmk-sheet{position:relative;display:flex;flex-direction:column;width:100%;max-width:640px;max-height:min(640px,76vh);box-sizing:border-box;
  background:var(--ekm-ds-surface,#fff);color:var(--ekm-ds-text,#09090b);border:1px solid var(--ekm-ds-border,#e4e4e7);
  border-radius:calc(var(--ekm-ds-radius-card,14px) + 8px);box-shadow:0 30px 80px -30px rgba(0,0,0,.35),0 1px 2px rgba(0,0,0,.06);overflow:hidden;
  font-family:var(--ekm-ds-font,system-ui,sans-serif);font-size:var(--ekm-ds-body-size,14px);line-height:1.5}
.ekmk-field{display:flex;align-items:center;gap:12px;min-height:56px;padding:0 16px;border-bottom:1px solid var(--ekm-ds-divider,#ececee)}
.ekmk-field>.ekmk-ico{color:var(--ekm-ds-muted,#52525b)}
.ekmk-input{flex:1;min-width:0;height:56px;border:0;outline:0;background:transparent;color:var(--ekm-ds-text,#09090b);font:inherit;font-size:16px}
.ekmk-input::placeholder{color:var(--ekm-ds-muted,#52525b);opacity:1}
.ekmk-close{flex:none;min-width:44px;min-height:44px;padding:0 4px;border:0;background:none;color:var(--ekm-ds-muted,#52525b);font:inherit;font-size:var(--ekm-ds-meta-size,12px);
  text-decoration:underline;text-underline-offset:5px;text-decoration-color:var(--ekm-ds-divider,#ececee);cursor:pointer}
/* the box is the dialog's only field: its focus shows as an underline across the field, not a clipped ring */
#ekmk-root .ekmk-input,#ekmk-root .ekmk-input:focus,#ekmk-root .ekmk-input:focus-visible{outline:0;border:0;box-shadow:none;background:transparent}
.ekmk-field:focus-within{box-shadow:inset 0 -2px 0 var(--ekm-ds-focus,#4f46e5)}
.ekmk-close:focus-visible{outline:2px solid var(--ekm-ds-focus,#4f46e5);outline-offset:2px;border-radius:6px}
.ekmk-list{list-style:none;margin:0;padding:6px 8px 8px;overflow-y:auto;overflow-x:hidden;flex:1;min-height:0}
.ekmk-group{padding:14px 10px 6px}
.ekmk-eyebrow{display:block;font-size:12px;font-weight:700;letter-spacing:.14em;text-transform:uppercase;color:var(--ekm-ds-muted,#52525b)}
.ekmk-row{display:flex;align-items:center;gap:12px;min-height:48px;padding:6px 10px;box-sizing:border-box;border-radius:var(--ekm-ds-radius-control,10px);
  color:var(--ekm-ds-text,#09090b);cursor:pointer;transition:background-color .15s cubic-bezier(.22,1,.36,1)}
.ekmk-row.is-active{background:var(--ekm-ds-raised,#f4f4f5);box-shadow:inset 0 0 0 1px var(--ekm-ds-border,#e4e4e7)}
.ekmk-row>.ekmk-ico{flex:none;color:var(--ekm-ds-muted,#52525b)}
.ekmk-ico{width:18px;height:18px}
.ekmk-text{display:flex;flex-direction:column;flex:1;min-width:0}
.ekmk-label,.ekmk-where{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ekmk-label{font-weight:500}
.ekmk-where{font-size:var(--ekm-ds-meta-size,12px);color:var(--ekm-ds-muted,#52525b)}
.ekmk-hint{flex:none;min-width:3.2em;text-align:right;font-size:var(--ekm-ds-meta-size,12px);letter-spacing:.04em;color:var(--ekm-ds-muted,#52525b);font-variant-numeric:tabular-nums}
.ekmk-row--error,.ekmk-row--error>.ekmk-ico{color:var(--ekm-ds-danger,#b91c1c)}
.ekmk-row--error .ekmk-label{white-space:normal}
.ekmk-empty{padding:18px 10px;color:var(--ekm-ds-muted,#52525b)}
.ekmk-skel{display:flex;flex-direction:column;justify-content:center;gap:6px;min-height:48px;padding:6px 10px 6px 40px;box-sizing:border-box}
.ekmk-skel span{display:block;height:10px;border-radius:5px;background:var(--ekm-ds-raised,#f4f4f5)}
.ekmk-skel span:first-child{width:46%}.ekmk-skel span:last-child{width:24%}
.ekmk-foot{display:flex;flex-wrap:wrap;gap:6px 18px;margin:0;padding:10px 18px;border-top:1px solid var(--ekm-ds-divider,#ececee);font-size:var(--ekm-ds-meta-size,12px);color:var(--ekm-ds-muted,#52525b)}
/* phone: a full-screen sheet */
@media (max-width:560px){
  .ekmk-root{padding:0}
  .ekmk-sheet{max-width:none;max-height:none;height:100%;height:100dvh;border:0;border-radius:0;box-shadow:none}
  .ekmk-foot{display:none}
  .ekmk-hint{display:none}
}
@media (prefers-reduced-motion:reduce){.ekmk-row{transition:none}}
/* the rail's search trigger (phones have no ⌘K) */
.hp-nav-rail-search-btn{display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;padding:0;border:0;background:none;color:inherit;cursor:pointer;border-radius:10px}
.hp-nav-rail-search-btn:focus-visible{outline:2px solid var(--ekm-ds-focus,#4f46e5);outline-offset:2px}
.hp-nav-rail-search-btn svg{width:18px;height:18px}
