/* ===========================================================================
   FBA SITE SEARCH — overlay styles.
   Generated into dist/css/search.css by build_all.py.
   Scoped to .fs- so it cannot collide with site.css.

   WHITE AND CRISP, ON PURPOSE (Mark, 17 Aug 2026). The first version tinted
   every surface with the brand's paper and maroon and read heavy and warm — a
   search panel is a utility, and a utility should get out of the way. So:
   white surfaces, neutral hairlines, near-black text, and maroon kept for the
   few marks that need to say "this is FBA" — the icon, the focus ring, the
   links. Nothing tan anywhere.
   =========================================================================== */
:root {
  --fs-ink: #16181d;          /* headings and result titles */
  --fs-body: #45484f;         /* body copy */
  /* Was #767a83, which measured 4.3:1 on white — just under the 4.5 AA
     threshold, and it is the colour of the Search label in the header on
     every page of both sites. #62666e measures 5.6:1 at the same weight. */
  --fs-mute: #62666e;         /* labels, meta, footer */
  --fs-line: #e6e7ea;         /* hairlines */
  --fs-hover: #f5f6f7;        /* row hover */
  --fs-brand: #610C13;        /* used sparingly */
  --fs-key: #2563eb;          /* the matched word in a snippet */
}

.fs-lock { overflow: hidden; }

.fs { position: fixed; inset: 0; z-index: 900; }
.fs[hidden] { display: none; }
.fs-backdrop {
  position: absolute; inset: 0;
  background: rgba(22, 24, 29, .38);
  backdrop-filter: blur(2px);
  animation: fs-fade .14s ease-out;
}
@keyframes fs-fade { from { opacity: 0 } }
@keyframes fs-rise { from { opacity: 0; transform: translateY(-8px) } }

.fs-panel {
  position: relative;
  width: min(720px, calc(100vw - 2rem));
  margin: clamp(1rem, 8vh, 6rem) auto 0;
  background: #fff;
  border: 1px solid var(--fs-line);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, .06), 0 18px 44px rgba(22, 24, 29, .18);
  overflow: hidden;
  display: flex; flex-direction: column;
  max-height: min(76vh, 720px);
  animation: fs-rise .16s ease-out;
}

/* ---------- the bar ---------- */
.fs-bar {
  display: flex; align-items: center; gap: .7rem;
  padding: .9rem 1.05rem;
  border-bottom: 1px solid var(--fs-line);
}
.fs-ic {
  width: 19px; height: 19px; flex: none;
  fill: none; stroke: var(--fs-brand); stroke-width: 2; stroke-linecap: round;
}
.fs-input {
  flex: 1; border: 0; outline: 0; background: none;
  font: inherit; font-size: 1.05rem; color: var(--fs-ink);
  padding: .2rem 0;
}
.fs-input::placeholder { color: #a3a7ae; }
.fs-input::-webkit-search-cancel-button { display: none; }
.fs-esc {
  border: 1px solid var(--fs-line); background: #fff;
  border-radius: 6px; padding: .18rem .5rem;
  font: inherit; font-size: .72rem; letter-spacing: .06em;
  color: var(--fs-mute); cursor: pointer;
}
.fs-esc:hover { background: var(--fs-hover); color: var(--fs-ink); }

/* ---------- results ---------- */
.fs-body { overflow-y: auto; padding: .45rem; flex: 1; background: #fff; }
.fs-list { list-style: none; margin: 0; padding: 0; }

.fs-hit {
  display: grid; gap: .1rem;
  padding: .65rem .75rem; border-radius: 8px;
  text-decoration: none; color: inherit;
}
.fs-hit:hover, .fs-hit.is-on { background: var(--fs-hover); }
.fs-hit.is-on { box-shadow: inset 0 0 0 1.5px rgba(97, 12, 19, .45); }
.fs-area {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--fs-mute); font-weight: 700;
}
.fs-title { font-weight: 700; color: var(--fs-ink); font-size: 1rem; letter-spacing: -.005em; }
.fs-hit:hover .fs-title, .fs-hit.is-on .fs-title { color: var(--fs-brand); }
.fs-h { font-size: .8rem; color: var(--fs-mute); }
.fs-snip { font-size: .88rem; line-height: 1.5; color: var(--fs-body); }
/* Matched words. No highlight block behind them (Mark, 17 Aug 2026) — the
   emphasis is the type itself: heavier, a touch larger, cool blue. Reads as a
   word the eye lands on rather than a word someone drew a box around.
   #2563eb clears AA contrast on white at this weight and size. */
.fs-snip mark {
  background: none;
  color: var(--fs-key);
  font-weight: 700;
  font-size: 1.08em;
  letter-spacing: -.005em;
}

/* ---------- direct answers ---------- */
.fs-answer {
  margin: .25rem .25rem .6rem; padding: .8rem .95rem;
  background: #fff;
  border: 1px solid var(--fs-line);
  border-left: 2px solid var(--fs-brand);
  border-radius: 8px;
}
.fs-answer-h {
  margin: 0 0 .45rem; font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fs-mute); font-weight: 700;
}
.fs-games { list-style: none; margin: 0; padding: 0; font-size: .94rem; line-height: 1.85; color: var(--fs-body); }
.fs-games b { color: var(--fs-ink); font-weight: 700; }
.fs-more {
  display: inline-block; margin-top: .45rem;
  font-size: .85rem; color: var(--fs-brand); font-weight: 600;
}

/* ---------- the AI answer ---------- */
.fs-ai {
  margin: .25rem .25rem .6rem; padding: .9rem 1rem;
  background: #fff;
  border: 1px solid var(--fs-line);
  border-left: 2px solid var(--fs-brand);
  border-radius: 8px;
}
.fs-ai-h {
  margin: 0 0 .4rem; font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fs-mute); font-weight: 700;
  display: flex; align-items: center; gap: .4rem;
}
.fs-ai-body { font-size: .96rem; line-height: 1.6; color: var(--fs-ink); }
.fs-src {
  margin-top: .65rem; padding-top: .55rem; font-size: .82rem;
  border-top: 1px solid var(--fs-line);
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: baseline;
}
.fs-src span { color: var(--fs-mute); }
.fs-src a { color: var(--fs-brand); font-weight: 600; }
.fs-dots i {
  display: inline-block; width: 4px; height: 4px; margin-left: 3px;
  border-radius: 50%; background: var(--fs-mute); animation: fs-blink 1s infinite;
}
.fs-dots i:nth-child(2) { animation-delay: .18s }
.fs-dots i:nth-child(3) { animation-delay: .36s }
@keyframes fs-blink { 0%, 60%, 100% { opacity: .25 } 30% { opacity: 1 } }

.fs-ask {
  display: block; width: calc(100% - .5rem); margin: .35rem .25rem .25rem;
  padding: .65rem .85rem; text-align: left;
  border: 1px solid var(--fs-line); border-radius: 8px;
  background: #fff; font: inherit; font-size: .92rem; color: var(--fs-body);
  cursor: pointer;
}
.fs-ask:hover { background: var(--fs-hover); color: var(--fs-ink); border-color: #d7d9dd; }

/* ---------- empty and hint ---------- */
.fs-hint { padding: .85rem .75rem 1.1rem; }
.fs-hint-t {
  margin: 0 0 .55rem; font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--fs-mute); font-weight: 700;
}
.fs-chip {
  display: inline-block; margin: 0 .35rem .45rem 0;
  padding: .36rem .72rem; border-radius: 999px;
  border: 1px solid var(--fs-line); background: #fff;
  font: inherit; font-size: .87rem; color: var(--fs-body); cursor: pointer;
}
.fs-chip:hover { background: var(--fs-hover); color: var(--fs-ink); border-color: #d7d9dd; }
.fs-empty { padding: 1.4rem 1rem; text-align: center; color: var(--fs-ink); }
.fs-empty p { margin: 0 0 .4rem; }
.fs-empty a { color: var(--fs-brand); font-weight: 600; }
.fs-dim { color: var(--fs-mute); font-size: .9rem; }

/* ---------- footer ---------- */
.fs-foot {
  display: flex; gap: 1rem; align-items: center;
  padding: .5rem 1.05rem;
  border-top: 1px solid var(--fs-line);
  background: #fff;
  font-size: .72rem; color: var(--fs-mute);
}
.fs-grow { flex: 1 }
.fs-foot kbd, .fs-empty kbd, .fs-ask kbd {
  display: inline-block; padding: .05rem .3rem; margin-right: .15rem;
  border: 1px solid var(--fs-line); border-bottom-width: 2px;
  border-radius: 4px; background: #fff;
  font-family: inherit; font-size: .72rem; color: var(--fs-body);
}
@media (max-width: 620px) {
  .fs-panel { margin-top: 0; border: 0; border-radius: 0; max-height: 100vh; height: 100vh; }
  .fs-foot { display: none; }
}

/* ---------- the button in the header ---------- */
.nav-search {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--fs-line); border-radius: 999px;
  background: #fff; cursor: pointer;
  padding: .38rem .7rem .38rem .6rem;
  font: inherit; font-size: .84rem; color: var(--fs-mute);
}
.nav-search:hover { border-color: #d7d9dd; background: var(--fs-hover); color: var(--fs-ink); }
.nav-search svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-search kbd {
  border: 0; background: #f0f1f3; border-radius: 4px;
  padding: .05rem .3rem; font-family: inherit; font-size: .72rem; color: var(--fs-mute);
}
@media (max-width: 1100px) { .nav-search kbd { display: none } .nav-search { padding: .38rem .5rem } }
@media (prefers-reduced-motion: reduce) {
  .fs-backdrop, .fs-panel { animation: none }
  .fs-dots i { animation: none; opacity: .6 }
}
