/* The header's search icon and its popover (layouts/_lookup), on every public page.
   Self-contained so it reads the same on the landing page (home.css) and the other pages (application.css). */
.lookup-toggle, .lookup-pop {
  --lk-surface: #fff; --lk-soft: #f4f5f8; --lk-text: #14161c; --lk-muted: #5d6474;
  --lk-line: rgba(20, 22, 28, .14); --lk-accent: #2563eb; --lk-button: #111113; --lk-button-text: #fff;
  --lk-shadow: 0 1px 2px rgba(20, 22, 28, .06), 0 18px 40px -18px rgba(20, 22, 28, .4);
}
@media (prefers-color-scheme: dark) {
  .lookup-toggle, .lookup-pop {
    --lk-surface: #1c1c1f; --lk-soft: #242428; --lk-text: #f2f2f3; --lk-muted: #a3a3aa;
    --lk-line: rgba(255, 255, 255, .16); --lk-accent: #6ea2ff; --lk-button: #f2f2f3; --lk-button-text: #111113;
    --lk-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -18px rgba(0, 0, 0, .85);
  }
}

.header-actions { display: flex; align-items: center; gap: .5rem; }

.lookup-toggle { anchor-name: --lookup; display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--lk-muted); cursor: pointer; flex: none; }
.lookup-toggle:hover { color: var(--lk-text); background: color-mix(in srgb, var(--lk-soft) 80%, transparent); }
.lookup-toggle:focus-visible { outline: 3px solid var(--lk-accent); outline-offset: 2px; }

.lookup-pop { position: fixed; inset: auto; top: 4.25rem; right: 1rem; margin: 0; width: min(24rem, calc(100vw - 1.5rem));
  padding: 1rem; border: 1px solid var(--lk-line); border-radius: 16px; background: var(--lk-surface); color: var(--lk-text);
  box-shadow: var(--lk-shadow); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif; }
@supports (position-anchor: --lookup) {
  /* Under the icon, right edges lined up, pushed right if that would run off the left of the screen. */
  .lookup-pop { position-anchor: --lookup; top: calc(anchor(bottom) + .5rem); right: auto;
                left: max(.75rem, calc(anchor(right) - min(24rem, 100vw - 1.5rem))); }
}
/* Phones: the full width of the screen, just under the header. */
@media (max-width: 34rem) {
  .lookup-pop, .lookup-pop:popover-open { left: .75rem; right: .75rem; width: auto; }
}
.lookup-pop::backdrop { background: transparent; }

.lookup-form { display: grid; gap: .55rem; margin: 0; }
.lookup-form label { font-weight: 600; font-size: .9rem; }
.lookup-field { display: flex; align-items: center; gap: .4rem; padding: .25rem .25rem .25rem .8rem;
  border: 1px solid var(--lk-line); border-radius: 12px; background: var(--lk-surface); }
.lookup-field:focus-within { border-color: var(--lk-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--lk-accent) 22%, transparent); }
.lookup-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--lk-text);
  font: 16px/1.3 ui-monospace, "SF Mono", Menlo, monospace; padding: .45rem 0; }
.lookup-field input::placeholder { color: var(--lk-muted); font-family: inherit; }
.lookup-field button { border: 0; border-radius: 9px; padding: .55rem .9rem; background: var(--lk-button); color: var(--lk-button-text);
  font: 600 .875rem/1 inherit; font-family: inherit; cursor: pointer; }
.lookup-form p { margin: 0; color: var(--lk-muted); font-size: .8rem; }
