/* Site search (search.js). Cream / white / ink with a restrained caramel accent. */
.search-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; padding: 0;
  border: 1px solid var(--line); border-radius: 14px;
  background: rgba(252, 250, 245, 0.72); backdrop-filter: blur(6px);
  color: var(--ink); cursor: pointer;
  transition: background 200ms var(--ease), border-color 200ms var(--ease), color 200ms var(--ease);
}
.search-toggle svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.search-toggle:hover { background: var(--paper); border-color: var(--clay-soft); }
.search-toggle:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }
.site-header:not(.is-scrolled):not(.is-nav-open) .search-toggle { border-color: rgba(255, 255, 255, 0.5); background: rgba(255, 255, 255, 0.12); color: #fff; }

.bfs { position: fixed; inset: 0; z-index: 200; }
.bfs[hidden] { display: none; }
.bfs-scrim { position: absolute; inset: 0; background: rgba(27, 26, 23, 0.32); backdrop-filter: blur(3px); opacity: 0; transition: opacity 220ms var(--ease); }
.bfs-box {
  position: relative; margin: calc(var(--header-h) + 8px) auto 0; width: min(640px, calc(100% - 32px));
  max-height: calc(100dvh - var(--header-h) - 40px); display: flex; flex-direction: column;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-md);
  box-shadow: 0 30px 80px -30px rgba(27, 26, 23, 0.45);
  opacity: 0; transform: translateY(-6px); transition: opacity 220ms var(--ease), transform 220ms var(--ease);
}
.bfs.is-open .bfs-scrim, .bfs.is-open .bfs-box { opacity: 1; transform: none; }
.bfs-field { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.bfs-field svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--clay); stroke-width: 1.8; stroke-linecap: round; }
.bfs-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 400 17px/1.4 var(--font-body); color: var(--ink);
}
.bfs-field input::placeholder { color: var(--muted); }
.bfs-field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.bfs-close {
  flex: none; border: 1px solid var(--line); border-radius: 8px; background: transparent;
  font: 600 11px/1 var(--font-ui); letter-spacing: 0.08em; color: var(--muted); padding: 6px 8px; cursor: pointer;
}
.bfs-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; overscroll-behavior: contain; }
.bfs-list:empty { display: none; }
.bfs-list a {
  display: flex; gap: 14px; align-items: flex-start; padding: 11px 12px; border-radius: 12px;
  color: var(--ink); text-decoration: none;
}
.bfs-list li[aria-selected="true"] a, .bfs-list a:hover { background: var(--cream); }
.bfs-kind {
  flex: none; width: 92px; margin-top: 2px; font: 600 10.5px/1.6 var(--font-ui);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--clay);
}
.bfs-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bfs-title { font: 500 16px/1.35 var(--font-display); }
.bfs-desc { font: 400 13.5px/1.45 var(--font-body); color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bfs-status { margin: 0; padding: 10px 18px 14px; font: 400 13px/1.5 var(--font-body); color: var(--muted); }
html.bfs-open { overflow: hidden; }

/* Where a result lands: the card or answer is briefly marked. */
.bfs-target { animation: bfsMark 2.4s var(--ease) 1; border-radius: 14px; }
@keyframes bfsMark { 0%, 40% { box-shadow: 0 0 0 3px var(--clay-soft); } 100% { box-shadow: 0 0 0 3px transparent; } }

@media (max-width: 640px) {
  .bfs-box { margin: 10px auto 0; width: calc(100% - 20px); max-height: calc(100dvh - 20px); }
  .bfs-kind { width: 76px; }
  .bfs-list a { padding: 13px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .bfs-scrim, .bfs-box { transition: none; }
  .bfs-target { animation: none; box-shadow: 0 0 0 3px var(--clay-soft); }
}

/* ---------- shared: heading, quick links, safety notice ---------- */
.bfs-grab { display: none; }
.bfs-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 22px 22px 6px; }
.bfs-h { margin: 0; font: 400 26px/1.15 var(--font-display); letter-spacing: -0.005em; }
.bfs-h::after { content: ""; display: block; width: 28px; height: 1px; margin-top: 14px; background: var(--clay); }
.bfs-x { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: inherit; cursor: pointer; opacity: .7; }
.bfs-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
.bfs-x:hover { opacity: 1; }
.bfs-quick { display: flex; flex-direction: column; padding: 6px 14px 4px; }
.bfs-quick a { display: flex; align-items: center; gap: 14px; padding: 13px 8px; color: inherit; text-decoration: none; border-bottom: 1px solid var(--line); border-radius: 10px; }
.bfs-quick a:last-child { border-bottom: 0; }
.bfs-quick a:hover { background: var(--cream); }
.bfs-qi { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); }
.bfs-qi svg { width: 19px; height: 19px; fill: none; stroke: var(--clay); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.bfs-qt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bfs-qt b { font: 500 15.5px/1.3 var(--font-display); }
.bfs-qt small { font: 400 12.5px/1.4 var(--font-body); color: var(--muted); }
.bfs-qa { color: var(--clay); font-size: 22px; line-height: 1; }
.bfs.has-query .bfs-quick, .bfs.has-query .bfs-head { display: none; }
.bfs-in { display: block; width: fit-content; margin: -6px 12px 6px auto; font: 600 10.5px/1 var(--font-ui); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-decoration: none; padding: 4px 6px; border-radius: 6px; }
.bfs-in:hover { color: var(--clay); background: var(--paper); }
.bfs-safety { margin: 10px 14px 4px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--clay-soft); background: rgba(199, 154, 107, 0.1); font: 400 13.5px/1.55 var(--font-body); }
.bfs-safety p, .bfs-safety ul { margin: 0 0 8px; }
.bfs-safety ul { padding-left: 18px; }
.bfs-safety li { margin: 3px 0; }
.bfs-safety a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.bfs-safety-h { font: 600 15px/1.3 var(--font-display) !important; }
.bfs-safety-h2 { font-weight: 600; margin-bottom: 2px !important; }

/* ---------- final look (Karen, 10 Oct): the light layout, in black ---------- */
.bfs-head { display: none; }
.bfs-field { order: -1; }
.search-toggle,
.site-header:not(.is-scrolled):not(.is-nav-open) .search-toggle { background: #121110; border-color: #121110; color: #fff; }
.search-toggle:hover { background: #2a2825; border-color: #2a2825; }
.bfs-scrim { background: rgba(10, 10, 9, 0.38); }
.bfs-box {
  --line: rgba(255, 255, 255, 0.11); --muted: rgba(245, 241, 233, 0.64);
  background: #141312; color: #f5f1e9; border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 34px 80px -24px rgba(0, 0, 0, 0.6);
}
.bfs-field input { color: #f5f1e9; }
.bfs-field svg { stroke: var(--clay-soft); }
.bfs-close { color: var(--muted); border-color: var(--line); }
.bfs-list a { color: #f5f1e9; }
.bfs-quick a:hover, .bfs-list li[aria-selected="true"] > a, .bfs-list a:hover { background: rgba(255, 255, 255, 0.06); }
.bfs-qi { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.08); }
.bfs-qi svg, .bfs-qa { stroke: var(--clay-soft); color: var(--clay-soft); }
.bfs-kind { color: var(--clay-soft); }
.bfs-in:hover { background: rgba(255, 255, 255, 0.08); color: var(--clay-soft); }
.bfs-safety { background: rgba(199, 154, 107, 0.12); border-color: rgba(199, 154, 107, 0.45); }
.bfs-status { color: var(--muted); }

/* Phones: the type label sits above the title, so long labels never touch it (Karen, 10 Oct). */
@media (max-width: 640px) {
  .bfs-list a { flex-direction: column; gap: 4px; }
  .bfs-kind { width: auto; margin-top: 0; }
}
