/* ============================================================
   QuickFind (.c-qf) — the site-wide AI searcher (Sofia, 2026-07-30):
   a small halo circle pinned bottom-right on every page except the home
   and /ask-anything/, opening a spotlight SEARCH BAR (one input, grouped
   results — answers from the ask-bank + page quick-links). A search bar,
   not a chatbot. Behavior: /js/behaviors/quickfind.js.
   ============================================================ */

/* ---------- the halo fab ---------- */
/* Sofia 2026-07-30, round 5 (her reference design, rebuilt from scratch):
   the fab is ONE clean vector asset — icons/quickfind-fab.svg, a dark disc
   carrying the halo as a white→blue-500 gradient ring with a contained
   glow. The button is just the placed art + a soft drop shadow for bright
   grounds; hover lifts and brightens a touch. (The earlier white-disc +
   pseudo-layer glow rounds are retired; incode-halo-bold.svg retired too.) */
/* --qf-sbw = scrollbar width, set by quickfind.js only while the dialog
   locks scroll — the reserved gap keeps the page and the fab from
   jumping right when the scrollbar disappears */
html {
  padding-right: var(--qf-sbw, 0px);
}
.c-qf-fab {
  position: fixed;
  right: calc(24px + var(--qf-sbw, 0px));
  bottom: 24px;
  z-index: 40; /* under the fixed header (50) and the dialog (95) */
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out-expo), filter 0.3s ease;
  filter: none;
}
.c-qf-fab:hover {
  transform: translateY(-3px);
  filter: brightness(1.12);
}
.c-qf-fab__art {
  display: block;
  width: 100%;
  height: 100%;
}

/* ---------- the spotlight dialog ---------- */
.c-qf {
  position: fixed;
  inset: 0;
  z-index: 95;
}
.c-qf__backdrop {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--color-black) 40%, transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.c-qf__dialog {
  position: relative;
  margin: 15vh auto 0;
  width: min(640px, calc(100% - 32px));
  border-radius: 20px;
  border: 1px solid var(--color-border-light);
  background: var(--color-background);
  box-shadow: none;
  overflow: hidden;
}
.c-qf__field {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 22px;
  color: var(--color-grey-300);
}
.c-qf__field-halo {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background-color: transparent;
  background-image: linear-gradient(to bottom right, var(--color-blue-500) 15%, var(--color-black) 95%);
}
.c-qf__field input {
  width: 100%;
  border: 0;
  background: none;
  font-family: var(--font-sans);
  font-size: var(--fs-xl);
  color: var(--color-black);
  outline: none;
}
.c-qf__field input::placeholder { color: var(--color-grey-300); }
.c-qf__field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.c-qf__esc {
  flex-shrink: 0;
  border: 1px solid var(--color-border-light);
  border-radius: 6px;
  background: none;
  padding: 3px 8px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  color: var(--color-grey-400);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.c-qf__esc:hover {
  border-color: var(--color-grey-200);
  color: var(--color-black);
}

/* ---------- results ---------- */
.c-qf__results {
  max-height: 48vh;
  overflow-y: auto;
}
.c-qf__results:not(:empty) { border-top: 1px solid var(--color-border-light); }
.c-qf__group {
  padding: 14px 22px 6px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-widest);
  color: var(--color-grey-on-white);
}
.c-qf__row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 22px 12px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
a.c-qf__row:hover { background: var(--color-grey-50); }
.c-qf__row-title {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: 500;
  color: var(--color-black);
}
a.c-qf__row:hover .c-qf__row-title { color: var(--color-blue); }
.c-qf__row-line {
  font-size: var(--fs-sm);
  line-height: var(--leading-snug);
  color: var(--color-grey-on-white);
}
/* the "Incode way" line of an answer — the payload reads a step stronger
   than the concept line above it (mirrors the ask-anything answer card) */
.c-qf__row-how {
  margin-top: 2px;
  font-size: var(--fs-sm);
  line-height: var(--leading-snug);
  color: var(--color-grey-500);
}
.c-qf__row-path {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  color: var(--color-grey-400);
}
.c-qf__row-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.c-qf__chip {
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  color: var(--color-grey-500);
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}
.c-qf__chip:hover {
  border-color: var(--color-blue);
  color: var(--color-blue);
}
.c-qf__none {
  padding: 18px 22px;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  color: var(--color-grey-on-white);
}
.c-qf__hint {
  border-top: 1px solid var(--color-border-light);
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: var(--track-wide);
  color: var(--color-grey-400);
}
.c-qf__hint a {
  color: var(--color-blue);
  text-decoration: underline;
  text-underline-offset: 3px;
}
