/* The top-bar search results (public/app-global-find.js). Type sizes come from the page scale in hl-ui.css: 14 lede, 13 body, 12 label, 11 micro. */
html body .askdrop.hlf {
  --hlf-warn-bg: #fbf0dc;
  left: auto; right: 0; width: min(800px, calc(100vw - 32px)); max-width: none; padding: 4px 0 8px;
}
html body.hl-dark .askdrop.hlf { --hlf-warn-bg: var(--amber-bg); }
html body .askdrop.hlf.open { max-height: min(78vh, 680px); overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }

.hlf-res { font-family: var(--sans); color: var(--ink); }
.hlf-res.is-busy .hlf-grid { opacity: .55; transition: opacity .12s; }

.hlf-grid { display: grid; grid-template-columns: minmax(0, 1fr); align-items: start; }
.hlf-grid.has-profile { grid-template-columns: minmax(0, 1fr) 268px; }
.hlf-main { min-width: 0; }

/* Section labels: quieter than what is under them */
.hlf-hd { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 16px 6px; font-size: var(--hl-fs-label, 12px); font-weight: 700; line-height: 1.4; color: var(--slate); }
.hlf-hd-t { min-width: 0; overflow-wrap: anywhere; }
.hlf-hd-t b { color: var(--ink); font-weight: 700; }
.hlf-hd-n { flex: none; font-size: var(--hl-fs-micro, 11px); font-weight: 600; color: var(--slate); }
.hlf-main > .hlf-hd:first-child { padding-top: 10px; }

/* Rows */
.hlf-row { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0 6px; padding: 8px 10px; border-radius: 9px; cursor: pointer; box-sizing: border-box; min-width: 0; }
.hlf-row:hover { background: var(--canvas); }
.hlf-row.on { background: var(--canvas); box-shadow: inset 0 0 0 2px #0284c7; }
.hlf-row.is-off .hlf-name { color: var(--slate); }
.hlf-body { flex: 1 1 auto; min-width: 0; }
.hlf-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hlf-name { font-size: var(--hl-fs-body, 13px); font-weight: 700; line-height: 1.35; color: var(--ink); min-width: 0; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; overflow-wrap: anywhere; }
.hlf-person .hlf-line { flex-wrap: wrap; row-gap: 2px; }
.hlf-title { font-weight: 600; }
.hlf-sub { margin-top: 1px; font-size: var(--hl-fs-label, 12px); font-weight: 500; line-height: 1.4; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlf-work .hlf-sub { margin-top: 2px; }

.hlf-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--gold-bg); color: var(--gold-ink, var(--slate)); font-size: var(--hl-fs-micro, 11px); font-weight: 700; letter-spacing: .02em; }
.hlf-av-lg { width: 46px; height: 46px; font-size: var(--hl-fs-lede, 14px); }
.hlf-av-r { background: var(--hl-primary, #2f5d8a); color: #fff; }

.hlf-badge { flex: none; font-size: var(--hl-fs-micro, 11px); font-weight: 600; line-height: 1.5; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--slate); background: var(--card); white-space: nowrap; }
.hlf-badge-off { border-style: dashed; }

.hlf-peek { flex: none; margin-left: auto; min-height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); font: 600 var(--hl-fs-label, 12px)/1 var(--sans); cursor: pointer; }
.hlf-peek:hover { background: var(--gold-bg); }
.hlf-peek:focus-visible, .hlf-more:focus-visible, .hlf-open:focus-visible, .hlf-btn:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }
.hlf-person.is-focus { background: var(--gold-bg); }
.hlf-person.is-focus.on { background: var(--gold-bg); }

/* Work rows */
.hlf-date { flex: none; width: 76px; font-size: var(--hl-fs-label, 12px); font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.hlf-kind { flex: none; width: 92px; font-size: var(--hl-fs-micro, 11px); font-weight: 700; color: var(--slate); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hlf-side-meta { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.hlf-amt { min-width: 64px; text-align: right; font-size: var(--hl-fs-body, 13px); font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.hlf-pill { font-size: var(--hl-fs-micro, 11px); font-weight: 600; line-height: 1.5; padding: 0 9px; border-radius: 999px; background: var(--canvas); color: var(--slate); white-space: nowrap; }
.hlf-pill.ok { background: var(--green-bg); color: var(--green-ink); }
.hlf-pill.warn { background: var(--hlf-warn-bg); color: var(--warn-ink, #8a5300); }
.hlf-pill.bad { background: var(--red-bg); color: var(--red); }

.hlf-ask .hlf-askq { min-width: 0; font-size: var(--hl-fs-label, 12px); font-weight: 500; color: var(--slate); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hlf-ask { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 9px 9px; }
.hlf-ask.is-prominent { margin: 8px 6px 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--gold-bg); }
.hlf-page .hlf-kind { width: 48px; }

.hlf-more { display: block; width: calc(100% - 12px); margin: 2px 6px 0; min-height: 34px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--hl-primary, #2f5d8a); font: 700 var(--hl-fs-label, 12px)/1 var(--sans); text-align: left; cursor: pointer; }
body.hl-dark .hlf-more, body.hl-dark .hlf-peek { color: #9cc3ee; }
.hlf-more:hover { background: var(--canvas); }

.hlf-tip { padding: 6px 16px 12px; font-size: var(--hl-fs-label, 12px); font-weight: 500; line-height: 1.5; color: var(--slate); }

/* Empty / error */
.hlf-msg { padding: 28px 24px 24px; text-align: center; }
.hlf-msg-t { font-size: var(--hl-fs-lede, 14px); font-weight: 700; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.hlf-msg-b { margin: 6px auto 0; max-width: 42ch; font-size: var(--hl-fs-body, 13px); font-weight: 500; line-height: 1.5; color: var(--slate); }
.hlf-msg-a { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.hlf-btn { min-height: var(--hl-h, 36px); padding: 0 16px; border: 1px solid var(--line); border-radius: var(--hl-r, 9px); background: var(--card); color: var(--ink); font: 600 var(--hl-fs-body, 13px)/1 var(--sans); cursor: pointer; }
.hlf-btn:hover { background: var(--canvas); }
.hlf-btn.is-primary { background: var(--hl-primary, #2f5d8a); border-color: var(--hl-primary, #2f5d8a); color: #fff; }
.hlf-btn.is-primary:hover { background: var(--hl-primary-hover, #264d73); }

/* Loading */
.hlf-skel { padding: 4px 6px 8px; }
.hlf-skel-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; }
.hlf-skel-av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--canvas); }
.hlf-skel-b { flex: 1; display: grid; gap: 7px; }
.hlf-skel-b i { display: block; height: 10px; border-radius: 5px; background: var(--canvas); }
.hlf-skel-b i:first-child { width: 42%; }
.hlf-skel-b i:last-child { width: 68%; }
.hlf-skel-av, .hlf-skel-b i { animation: hlf-pulse 1.2s ease-in-out infinite; }
@keyframes hlf-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .hlf-skel-av, .hlf-skel-b i { animation: none; } .hlf-res.is-busy .hlf-grid { transition: none; } }

/* The profile card */
.hlf-card { position: sticky; top: 8px; margin: 10px 12px 8px 4px; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--canvas); min-width: 0; }
.hlf-card-head { display: flex; gap: 12px; align-items: flex-start; }
.hlf-card-id { min-width: 0; }
.hlf-card-name { font-size: var(--hl-fs-lede, 14px); font-weight: 700; line-height: 1.3; color: var(--ink); overflow-wrap: anywhere; }
.hlf-card-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.hlf-card-detail { font-size: var(--hl-fs-label, 12px); font-weight: 500; color: var(--slate); }
.hlf-facts { margin: 14px 0 0; }
.hlf-facts dt { margin-top: 12px; font-size: var(--hl-fs-micro, 11px); font-weight: 600; color: var(--slate); }
.hlf-facts dt:first-child { margin-top: 0; }
.hlf-facts dd { margin: 2px 0 0; font-size: var(--hl-fs-body, 13px); font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.hlf-facts dd a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.hlf-open { display: block; width: 100%; margin-top: 16px; min-height: 40px; border: 0; border-radius: var(--hl-r, 9px); background: var(--hl-primary, #2f5d8a); color: #fff; font: 700 var(--hl-fs-body, 13px)/1 var(--sans); cursor: pointer; }
.hlf-open:hover { background: var(--hl-primary-hover, #264d73); }

/* Phone: the list spans the screen under the search box; the profile sits on top, compact */
@media (max-width: 700px) {
  html body .askdrop.hlf { position: fixed; left: 8px; right: 8px; top: var(--hlf-top, 60px); width: auto; }
  html body .askdrop.hlf.open { max-height: calc(100dvh - var(--hlf-top, 60px) - 12px); }
  .hlf-card { position: static; margin: 8px 8px 4px; padding: 14px; }
  .hlf-card.is-compact { background: var(--card); }
  .hlf-facts { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 10px 16px; margin-top: 0; }
  .hlf-facts dt { margin-top: 0; }
  .hlf-facts dt, .hlf-facts dd { grid-column: auto; }
  .hlf-av-lg { width: 40px; height: 40px; }
  .hlf-row { min-height: 52px; }
  .hlf-person { flex-wrap: wrap; }
  .hlf-person .hlf-body { flex: 1 1 0; }
  .hlf-peek { flex: 1 0 100%; min-height: 44px; margin: 4px 0 2px 46px; width: calc(100% - 46px); }
  .hlf-res { padding-bottom: 72px; }
  .hlf-kind { width: auto; }
  .hlf-more { min-height: 44px; }
  .hlf-open, .hlf-btn { min-height: 44px; }
  .hlf-work { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "body side" "date date"; align-items: start; row-gap: 4px; }
  .hlf-work .hlf-body { grid-area: body; }
  .hlf-work .hlf-side-meta { grid-area: side; flex-direction: column; align-items: flex-end; gap: 4px; }
  .hlf-work .hlf-date { grid-area: date; width: auto; }
  .hlf-work .hlf-amt { min-width: 0; }
  .hlf-work .hlf-line { flex-wrap: wrap; row-gap: 2px; }
}

/* "Back to search results" chip shown after a search result opens its record (app-open-record.js). */
.hlor-back{position:fixed;left:50%;bottom:20px;transform:translateX(-50%);z-index:100000;display:inline-flex;align-items:center;gap:6px;padding:10px 16px;border:0;border-radius:999px;background:#0f172a;color:#fff;font:700 13px/1 var(--sans,system-ui,sans-serif);cursor:pointer;box-shadow:0 8px 24px rgba(15,23,42,.35)}
.hlor-back:hover{background:#1e293b}
.hlor-back:focus-visible{outline:3px solid #93c5fd;outline-offset:2px}
@media (max-width:700px){.hlor-back{bottom:16px}}
