/* Universal search (web/search.mjs) on the Sat Globe design system (DESIGN.md).
 *
 * Desktop: a results panel under the strip's search field (the field itself is console.css's).
 * Touch: a full-screen sheet with its own field. The desktop palette (Ctrl K with no field
 * on screen) is the sheet, centred.
 *
 * Tokens: --cx-* from console.css, each with the DESIGN.md value as its fallback; night (body.nvg)
 * comes through console.css re-pointing the --cx-* set to the red palette.
 * Rows: one line at 32 px with a mouse; two lines at 44 px on touch; hairline separators.
 * Blue is selection only (pressed tab, pressed toggle, switch on). Links are ink, underlined.
 * Mono only for coordinates, ranges, bearings, ages, counts and query syntax.
 */

.sx, .sx-pulse {
  --sx-bg: var(--cx-panel, #1c2127);
  --sx-raised: var(--cx-raised, #252a31);
  --sx-hover: var(--cx-hover, #2f343c);
  --sx-line: var(--cx-line, rgba(255, 255, 255, .10));
  --sx-line-hi: var(--cx-line-hi, rgba(255, 255, 255, .22));
  --sx-ink: var(--cx-ink, #f6f7f9);
  --sx-dim: var(--cx-dim, #abb3bf);
  --sx-mute: var(--cx-mute, #8f99a8);
  --sx-sel: var(--cx-select, #2d72d2);
  --sx-sel-ink: var(--cx-select-ink, #fff);
  --sx-bad: var(--cx-bad, #e76a6e);
  --sx-font: var(--cx-font, "Public Sans", system-ui, sans-serif);
  --sx-mono: var(--cx-mono, "IBM Plex Mono", ui-monospace, monospace);
  --sx-r: var(--cx-r, 2px);
  --sx-shadow: var(--cx-shadow, 0 6px 20px rgba(0, 0, 0, .45));
  --sx-input: rgba(0, 0, 0, .28);
}

.sx {
  --sx-row: 32px;          /* row height */
  --sx-ctl: 28px;          /* tabs, toggles, row actions */
  --sx-lead: 24px;         /* icon / thumbnail column */
  --sx-g: 16px;            /* icon size */
  --sx-pad: 12px;          /* panel padding */
  --sx-rowpad: 3px;        /* row padding: 24 px lead + 6 + 1 px hairline ≤ 32 */
  position: fixed;
  z-index: 47;             /* above cards (EW .ewc 45, air 24, library 26), under the sign-in sheet (200) */
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 0;
  background: var(--sx-bg);
  color: var(--sx-ink);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-r);
  box-shadow: var(--sx-shadow);
  font: 400 13px/1.35 var(--sx-font);
  letter-spacing: normal;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}
/* Touch: 44 px rows and controls, 16 px padding (DESIGN.md Layout). */
:root:is([data-input="touch"], [data-input="pen"]) .sx,
.sx[data-mode="sheet"]:not([data-form="desktop"]) {
  --sx-row: 44px;
  --sx-ctl: 44px;
  --sx-lead: 32px;
  --sx-g: 18px;
  --sx-pad: 16px;
  --sx-rowpad: 5px;
}
.sx[hidden], .sx [hidden] { display: none !important; }
/* Focus: console.css's ring, drawn inside so the panel's overflow never clips it; the field
 * shows focus with its select border instead (same specificity as console.css's rule). */
.ui-console:not(#x#x) .sx button:focus-visible { outline: 2px solid var(--cx-focus, #4c90f0); outline-offset: -2px; }
.ui-console:not(#x#x) .sx .sx-q:focus-visible { outline: none; }
.sx *, .sx *::before, .sx *::after { box-sizing: border-box; letter-spacing: normal; }
.sx :where(button) {
  font: inherit; color: inherit; background: none; border: 0; margin: 0; padding: 0;
  cursor: pointer; touch-action: manipulation;
}
.sx :where(p, h3, ul, figure) { margin: 0; }
.sx .sx-g { display: block; width: var(--sx-g); height: var(--sx-g); flex: none; }

/* ———————————————————— sheet (touch; desktop palette when no field is on screen) ———————————————————— */
.sx[data-mode="sheet"] {
  left: 0;
  right: 0;
  top: var(--sx-vvt, 0px);
  height: var(--sx-vvh, 100dvh);
  padding: var(--safe-t, 0px) var(--safe-r, 0px) 0 var(--safe-l, 0px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.sx[data-mode="sheet"][data-form="desktop"] {
  left: 50%;
  right: auto;
  top: 10vh;
  width: min(680px, calc(100vw - 32px));
  height: auto;
  max-height: 76vh;
  padding: 0;
  transform: translateX(-50%);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-r);
  box-shadow: var(--sx-shadow);
}
/* iPad: full-width sheet, readable centre column */
.sx[data-mode="sheet"][data-form="tablet"] :is(.sx-head, .sx-bar, .sx-foot),
.sx[data-mode="sheet"][data-form="tablet"] .sx-list > *,
.sx[data-mode="sheet"][data-form="tablet"] .sx-detail > * {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}
.sx[data-mode="sheet"][data-form="tablet"] .sx-bar,
.sx[data-mode="sheet"][data-form="tablet"] .sx-head { border-bottom: 0; }
.sx[data-mode="sheet"][data-form="tablet"] .sx-bar { box-shadow: 0 1px 0 var(--sx-line); }

.sx-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px var(--sx-pad);
  border-bottom: 1px solid var(--sx-line);
}
.sx-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 0 0 12px;
  background: var(--sx-input);
  box-shadow: inset 0 0 0 1px var(--sx-line); /* hairline inside: the input keeps the full 44 px */
  border-radius: var(--sx-r);
  cursor: text;
}
.sx[data-form="desktop"] .sx-field { height: 36px; }
.sx-field:focus-within { box-shadow: inset 0 0 0 1px var(--sx-sel); }
.sx-field-g { color: var(--sx-mute); }
.sx-q {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--sx-ink);
  font: 400 16px/1 var(--sx-font); /* ≥ 16 px: no iOS focus zoom */
  -webkit-appearance: none;
  appearance: none;
}
.sx[data-form="desktop"] .sx-q { font-size: 13px; }
.sx-q::placeholder { color: var(--sx-mute); opacity: 1; }
.sx-q::-webkit-search-cancel-button, .sx-q::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.sx-q:focus-visible { outline: 0; }
.sx-clear {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 100%;
  color: var(--sx-mute);
  border-radius: var(--sx-r);
}
.sx[data-form="desktop"] .sx-clear { width: 36px; }
.sx-clear .sx-g { width: 16px; height: 16px; }
.sx-cancel {
  flex: none;
  height: 44px;
  padding: 0 8px;
  color: var(--sx-ink);
  font: 500 13px/1 var(--sx-font);
  border-radius: var(--sx-r);
}
.sx[data-mode="sheet"][data-form="desktop"] .sx-cancel { display: none; }

/* ———————————————————— tabs (segmented) and toggles ———————————————————— */
.sx-bar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: calc(var(--sx-ctl) + 12px);
  padding: 6px var(--sx-pad);
  border-bottom: 1px solid var(--sx-line);
}
.sx-chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.sx-chips::-webkit-scrollbar { display: none; }
.sx-chip, .sx-tog {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: var(--sx-ctl);
  padding: 0 8px;
  color: var(--sx-dim);
  border-radius: var(--sx-r);
  font: 500 13px/1 var(--sx-font);
  white-space: nowrap;
}
.sx-chip-n {
  font: 400 12px/1 var(--sx-mono);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--sx-mute);
}
.sx-chip-n:empty { display: none; }
.sx-chip[aria-pressed="true"], .sx-tog[aria-pressed="true"] { background: var(--sx-sel); color: var(--sx-sel-ink); }
.sx-chip[aria-pressed="true"] .sx-chip-n { color: var(--sx-sel-ink); }
.sx-toggles { flex: none; display: flex; gap: 2px; margin-left: auto; }
.sx-tog .sx-g { width: 16px; height: 16px; }
@media (hover: hover) {
  .sx-chip:not([aria-pressed="true"]):hover,
  .sx-tog:not([aria-pressed="true"]):hover { background: var(--sx-hover); color: var(--sx-ink); }
}
/* phone: toggles are icon-only so the tabs keep the row */
.sx[data-form="phone"] .sx-tog { width: var(--sx-ctl); padding: 0; justify-content: center; }
.sx[data-form="phone"] .sx-tog span { display: none; }

.sx-back {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: var(--sx-ctl);
  padding: 0 8px 0 4px;
  margin-left: -4px;
  color: var(--sx-dim);
  border-radius: var(--sx-r);
  font: 500 13px/1 var(--sx-font);
}
@media (hover: hover) { .sx-back:hover { background: var(--sx-hover); color: var(--sx-ink); } }
.sx-dtitle {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 600 13px/1.2 var(--sx-font);
  color: var(--sx-ink);
}

/* ———————————————————— results ———————————————————— */
.sx-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 4px;
  scrollbar-width: thin;
  scrollbar-color: var(--sx-line-hi) transparent;
}
.sx-group + .sx-group, .sx-group + .sx-syntax { border-top: 1px solid var(--sx-line); }
.sx-gh {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-height: 32px;
  padding: 12px var(--sx-pad) 4px;
  font: 600 12px/1.2 var(--sx-font);
  color: var(--sx-dim);
}
.sx-gh-n {
  font: 400 12px/1.2 var(--sx-mono);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--sx-mute);
}
.sx-gh-act {
  margin: 0 -6px -4px auto;
  height: 24px;
  padding: 0 6px;
  color: var(--sx-dim);
  font: 500 12px/1 var(--sx-font);
  border-radius: var(--sx-r);
}
:root:is([data-input="touch"], [data-input="pen"]) .sx-gh-act,
.sx[data-mode="sheet"]:not([data-form="desktop"]) .sx-gh-act { height: 44px; margin-block: -14px -12px; padding: 0 12px; }
@media (hover: hover) { .sx-gh-act:hover { background: var(--sx-hover); color: var(--sx-ink); } }

.sx-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--sx-row);
  padding: var(--sx-rowpad) var(--sx-pad);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
.sx-row + .sx-row { border-top: 1px solid var(--sx-line); }
.sx-row:has(.sx-acts) { padding-block: 2px; }
.sx-row.is-active { background: var(--sx-hover); }
@media (hover: hover) { .sx-row:hover { background: var(--sx-hover); } }
.sx-row:active { background: var(--sx-hover); }

.sx-lead {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--sx-lead);
  height: var(--sx-lead);
  color: var(--sx-dim);
  overflow: hidden;
}
.sx-lead[data-tone="hi"] { color: var(--sx-ink); }
.sx-lead[data-tone="bad"] { color: var(--sx-bad); }
.sx-lead[data-tone="mute"] { color: var(--sx-mute); }
.sx-lead:empty { visibility: hidden; }
/* MIL-STD-2525 affiliation: the letter tag repeats the map symbol's colour (DESIGN.md). */
.sx-lead[data-a="f"], .sx-row[data-a="f"] .sx-lead-aff { color: var(--fr, #80e0ff); }
.sx-lead[data-a="h"], .sx-row[data-a="h"] .sx-lead-aff { color: var(--ho, #ff3031); }
.sx-lead[data-a="n"], .sx-row[data-a="n"] .sx-lead-aff { color: var(--ne, #aaffaa); }
.sx-lead[data-a="u"], .sx-row[data-a="u"] .sx-lead-aff { color: var(--uk, #ffff80); }
.sx-lead-aff { color: var(--uk, #ffff80); }
.sx-aff {
  display: grid;
  place-items: center;
  width: 20px;
  height: 18px;
  border: 1px solid currentColor;
  border-radius: var(--sx-r);
  font: 600 11px/1 var(--sx-mono);
}
.sx-lead-img { background: var(--sx-raised); border-radius: var(--sx-r); }
.sx-lead-img img { display: block; width: 100%; height: 100%; object-fit: cover; }

.sx-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.sx-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sx-tt {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 500 13px/16px var(--sx-font);
  color: var(--sx-ink);
}
.sx-s {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font: 400 12px/15px var(--sx-font);
  color: var(--sx-dim);
}
/* Mouse: one line per result, the detail after the name. */
.sx[data-form="desktop"] .sx-main { display: flex; align-items: baseline; gap: 8px; }
.sx[data-form="desktop"] .sx-t { flex: 0 1 auto; max-width: 68%; }
.sx[data-form="desktop"] .sx-t:last-child { max-width: none; }
.sx[data-form="desktop"] .sx-s { flex: 1 1 0; }
/* Coordinates are data: mono. Names (places, aircraft, tracks) stay in the UI face. */
.sx-num { font-family: var(--sx-mono); font-weight: 400; font-variant-numeric: tabular-nums slashed-zero; }
.sx-k-coord .sx-s { font-family: var(--sx-mono); font-variant-numeric: tabular-nums slashed-zero; }

/* Neutral tags: kind, band, MIL, EMG. */
.sx-badge, .sx-sim {
  flex: none;
  display: inline-block;
  padding: 0 4px;
  border: 1px solid var(--sx-line-hi);
  border-radius: var(--sx-r);
  font: 600 11px/14px var(--sx-font);
  color: var(--sx-dim);
  white-space: nowrap;
}
.sx-sim { margin-right: 6px; vertical-align: 1px; }
.sx-row[data-tone="bad"] .sx-badge { color: var(--sx-bad); border-color: var(--sx-bad); }

.sx-meta {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  font: 400 12px/15px var(--sx-mono);
  font-variant-numeric: tabular-nums slashed-zero;
  color: var(--sx-dim);
  white-space: nowrap;
}
.sx[data-form="desktop"] .sx-meta { flex-direction: row; align-items: baseline; gap: 12px; }
.sx[data-form="desktop"] .sx-rb { order: 2; }
.sx-meta:not(:has(.sx-rb:not(:empty), .sx-state, .sx-age:not(:empty))) { display: none; }
.sx-rb:empty, .sx-age:empty { display: none; }
.sx-l2 { display: flex; align-items: baseline; gap: 8px; }
.sx-age { color: var(--sx-mute); }
.sx-state {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 12px/1 var(--sx-font);
  color: var(--sx-ink);
}
.sx-state::before { content: ""; width: 6px; height: 6px; border-radius: 1px; border: 1.5px solid currentColor; }
.sx-state.is-active::before { background: currentColor; }
.sx-state.is-silent { color: var(--sx-mute); }

/* Layer switch: track = hover slate, on = select fill (DESIGN.md Switches). */
.sx-sw {
  flex: none;
  position: relative;
  width: 28px;
  height: 16px;
  background: var(--sx-hover);
  border-radius: var(--sx-r);
}
.sx-sw-k {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 1px;
  background: var(--sx-dim);
  transition: transform 150ms cubic-bezier(.2, 0, 0, 1);
}
.sx-sw[data-on="true"] { background: var(--sx-sel); }
.sx-sw[data-on="true"] .sx-sw-k { transform: translateX(12px); background: var(--sx-sel-ink); }

.sx-acts { flex: none; display: flex; gap: 2px; margin-right: -8px; }
.sx-act {
  height: min(var(--sx-ctl), 32px);
  padding: 0 8px;
  color: var(--sx-dim);
  border-radius: var(--sx-r);
  font: 500 12px/1 var(--sx-font);
  white-space: nowrap;
}
:root:is([data-input="touch"], [data-input="pen"]) .sx-act,
.sx[data-mode="sheet"]:not([data-form="desktop"]) .sx-act { height: 44px; min-width: 44px; padding: 0 12px; }
@media (hover: hover) { .sx-act:hover { background: var(--sx-raised); color: var(--sx-ink); } }

/* Links: ink, underlined (DESIGN.md One blue). */
.sx-row-more .sx-tt, .sx-row-auth .sx-tt, .sx-row-retry .sx-tt {
  font-weight: 400;
  text-decoration: underline;
  text-decoration-color: var(--sx-line-hi);
  text-underline-offset: 3px;
}
@media (hover: hover) {
  :is(.sx-row-more, .sx-row-auth, .sx-row-retry):hover .sx-tt { text-decoration-color: currentColor; }
}
.sx-row-q .sx-tt { font-weight: 400; }

/* Empty and error states teach the syntax / name the recovery. */
.sx-none { padding: 16px var(--sx-pad) 12px; }
.sx-none-t { color: var(--sx-ink); font: 600 13px/1.35 var(--sx-font); }
.sx-none-s { margin-top: 4px !important; max-width: 60ch; color: var(--sx-dim); font: 400 12px/1.45 var(--sx-font); }
.sx-none.is-error .sx-none-t::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 8px 1px 0;
  border-radius: 1px;
  background: var(--sx-bad);
}

/* Loading: skeleton rows while nothing has arrived yet (no spinner). */
.sx-skel { padding-top: 8px; }
.sx-skel .sx-row { cursor: default; }
.sx-skel .sx-row:hover { background: none; }
.sx-skel-lead, .sx-skel-b {
  display: block;
  flex: none;
  border-radius: var(--sx-r);
  background: var(--sx-raised);
  animation: sx-skel 1s ease-in-out infinite alternate;
}
.sx-skel-lead { width: var(--sx-g); height: var(--sx-g); margin-inline: calc((var(--sx-lead) - var(--sx-g)) / 2); }
.sx-skel-b { height: 10px; }
.sx-skel .sx-main { gap: 6px; }
.sx[data-form="desktop"] .sx-skel .sx-main { align-items: center; }
@keyframes sx-skel { from { opacity: .45; } to { opacity: 1; } }

.sx-syntax { padding: 12px var(--sx-pad); }
.sx-syntax .sx-gh-l { display: block; padding: 0 0 8px; font: 600 12px/1.2 var(--sx-font); color: var(--sx-dim); }
.sx-toks { display: flex; flex-wrap: wrap; gap: 4px; }
.sx-tok {
  height: min(var(--sx-ctl), 28px);
  padding: 0 8px;
  background: var(--sx-raised);
  border-radius: var(--sx-r);
  color: var(--sx-dim);
  font: 400 12px/1 var(--sx-mono);
}
:root:is([data-input="touch"], [data-input="pen"]) .sx-tok,
.sx[data-mode="sheet"]:not([data-form="desktop"]) .sx-tok { height: 44px; padding: 0 12px; }
@media (hover: hover) { .sx-tok:hover { background: var(--sx-hover); color: var(--sx-ink); } }
.sx-syn-note { margin: 8px 0 0; max-width: 72ch; color: var(--sx-mute); font: 400 12px/1.45 var(--sx-font); }

/* ———————————————————— footer ———————————————————— */
.sx-foot {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 28px;
  padding: 4px var(--sx-pad);
  border-top: 1px solid var(--sx-line);
  font: 400 12px/1.3 var(--sx-font);
  color: var(--sx-mute);
}
.sx-foot:has(.sx-foot-s:empty):has(.sx-foot-h:empty) { display: none; }
.sx-foot-s { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-foot-h { flex: none; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.sx-foot-h kbd {
  display: inline-block;
  min-width: 16px;
  padding: 0 3px;
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-r);
  font: 400 11px/14px var(--sx-mono);
  text-align: center;
  color: var(--sx-mute);
}
.sx-foot-h kbd + span { margin: 0 6px 0 2px; }
.sx-foot-h span:last-child { margin-right: 0; }
@media not all and (pointer: fine) { .sx-foot-h { display: none; } }
.sx[data-mode="sheet"]:not([data-form="desktop"]) .sx-foot { padding-bottom: max(4px, var(--safe-b, 0px)); }

/* ———————————————————— library card (detail view) ———————————————————— */
.sx-detail {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px var(--sx-pad) 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--sx-line-hi) transparent;
}
.sx-d-msg { padding: 12px 0; color: var(--sx-dim); }
.sx-d-skel { display: grid; gap: 8px; }
.sx-d-skel .sx-skel-b:first-child { height: 160px; }
.sx-d-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sx-d-facts { color: var(--sx-dim); font: 400 12px/1.4 var(--sx-font); }
.sx-d-photo {
  width: 100%;
  margin: 12px 0 0;
  max-height: 280px;
  background: var(--sx-raised) center / cover no-repeat;
  overflow: hidden;
}
.sx-d-photo img { display: block; width: 100%; height: 100%; max-height: 280px; object-fit: cover; opacity: 0; transition: opacity 150ms ease-out; }
.sx-d-photo img.is-ready { opacity: 1; }
.sx-d-credit { margin-top: 4px !important; font: 400 11px/1.45 var(--sx-font); color: var(--sx-mute); overflow-wrap: anywhere; }
.sx-d-sim {
  display: inline-block;
  margin-top: 12px !important;
  padding: 0 4px;
  border: 1px solid var(--sx-line-hi);
  border-radius: var(--sx-r);
  font: 600 11px/16px var(--sx-font);
  color: var(--sx-dim);
}
.sx-d-sum { margin-top: 12px !important; color: var(--sx-ink); line-height: 1.5; max-width: 68ch; }
.sx-d-sec { margin-top: 16px; }
.sx-d-h { margin: 0 0 8px; font: 600 12px/1.2 var(--sx-font); color: var(--sx-dim); }
.sx-d-list { list-style: none; padding: 0; }
.sx-d-list li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--sx-line); }
.sx-d-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sx-ink); font-weight: 500; }
.sx-d-meta { flex: none; color: var(--sx-dim); font: 400 12px var(--sx-font); }
.sx-d-track .sx-d-meta { font-family: var(--sx-mono); font-variant-numeric: tabular-nums slashed-zero; }
.sx-d-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: var(--sx-row);
  padding: 4px 0;
  border-top: 1px solid var(--sx-line);
  text-align: left;
}
.sx-d-track .sx-d-name { flex: 1; }
.sx-d-track .sx-aff { color: var(--uk, #ffff80); }
.sx-d-track[data-a="f"] .sx-aff { color: var(--fr, #80e0ff); }
.sx-d-track[data-a="h"] .sx-aff { color: var(--ho, #ff3031); }
.sx-d-track[data-a="n"] .sx-aff { color: var(--ne, #aaffaa); }
@media (hover: hover) { .sx-d-track:hover { background: var(--sx-hover); } }
.sx-d-open {
  margin: 16px 0 0 -8px;
  height: var(--sx-ctl);
  padding: 0 8px;
  color: var(--sx-ink);
  border-radius: var(--sx-r);
  font: 500 13px/1 var(--sx-font);
  text-decoration: underline;
  text-decoration-color: var(--sx-line-hi);
  text-underline-offset: 3px;
}
@media (hover: hover) { .sx-d-open:hover { text-decoration-color: currentColor; } }

/* ———————————————————— the strip's field (styled by console.css; search only adds its icon) ———————————————————— */
.sx-host { position: relative; }
.sx-host::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 8px;
  top: 50%;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  background: var(--cx-mute, #8f99a8);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6'/%3E%3Cpath d='M15 15l5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
  pointer-events: none;
}
.sx-host:focus-within::before { background: var(--cx-ink, #f6f7f9); }
#status input.sx-attached, input.sx-attached { padding-left: 28px !important; }

/* ———————————————————— locator on the map (a found place) ———————————————————— */
.sx-pulse { position: relative; width: 0; height: 0; pointer-events: none; }
.sx-pulse-r {
  position: absolute;
  left: -20px;
  top: -20px;
  width: 40px;
  height: 40px;
  border: 2px solid var(--sx-sel);
  border-radius: 50%;
  opacity: 0;
  animation: sx-pulse 1.5s cubic-bezier(.2, 0, 0, 1) 3 both;
}
.sx-pulse-r2 { animation-delay: .45s; }
.sx-pulse-l {
  position: absolute;
  left: 24px;
  top: -12px;
  padding: 2px 6px;
  white-space: nowrap;
  background: var(--sx-bg);
  border: 1px solid var(--sx-line);
  border-radius: var(--sx-r);
  color: var(--sx-ink);
  font: 500 12px/1.35 var(--sx-font);
  animation: sx-fade 6s linear both;
}
@keyframes sx-pulse { 0% { transform: scale(.35); opacity: 1; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes sx-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .sx-pulse-r { animation: none; opacity: 1; transform: none; }
  .sx-pulse-r2 { display: none; }
  .sx-skel-lead, .sx-skel-b { animation: none; opacity: .7; }
  .sx-sw-k, .sx-d-photo img { transition: none; }
}

/* ———————————————————— night (NVG) ———————————————————— */
body.nvg .sx img { filter: grayscale(1) brightness(.5) sepia(1) saturate(3) hue-rotate(-38deg); }
body.nvg.nvg-dim .sx img { filter: grayscale(1) brightness(.3) sepia(1) saturate(3) hue-rotate(-38deg); }
body.nvg .sx-d-photo { background-image: none !important; }
body.nvg .sx-field { background: transparent; }

/* Geocoder credit (ODbL), shown while OpenStreetMap rows are listed. */
.sx-foot-a { flex: none; font: 400 11px/1.3 var(--sx-font); color: var(--sx-mute); white-space: nowrap; }
.sx-foot-a[hidden] { display: none; }
