:root {
  --font-serif: "Cormorant Garamond", Georgia, Times New Roman, serif;
  --font-sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/uploads/fonts/cormorant-garamond/400-latin-0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/uploads/fonts/cormorant-garamond/600-latin-0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/uploads/fonts/inter/400-latin-0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/uploads/fonts/inter/600-latin-0.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.bw-search { position: relative; flex: 0 1 17rem; min-width: 9rem; }
.bw-search__label, .bw-search__status {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; margin: 0;
}
/* 1rem, not .875rem. iOS Safari zooms the whole page when a text field with a
   font-size under 16px takes focus, which on a phone throws the reader into a
   scaled-up viewport they then have to pinch back out of. */
.bw-search__input {
  width: 100%; min-height: 44px; padding: .5rem .9rem; font-size: 1rem; line-height: 1.4;
  font-family: var(--font-sans, system-ui); color: var(--bw-ink, #232323);
  border: 1px solid var(--bw-line-strong, #B9ADA2); border-radius: 999px;
  background: var(--bw-surface-sunk, #F2EEE9); outline: none; -webkit-appearance: none;
}
.bw-search__input:focus {
  border-color: var(--bw-accent-ui, #B0736F); background: var(--bw-surface, #fff);
}
/* Charcoal ring, matching the rest of the site — a gold ring is 2.17:1 and
   effectively invisible. */
.bw-search__input:focus-visible {
  outline: 2px solid var(--bw-focus, #232323); outline-offset: 2px;
}
.bw-search__results {
  position: absolute; top: calc(100% + .4rem); left: 0; right: 0;
  background: var(--bw-surface, #fff); border: 1px solid var(--bw-line, #E7DED5);
  border-radius: var(--bw-radius, 10px); box-shadow: 0 12px 32px rgba(35,35,35,.14);
  list-style: none; margin: 0; padding: .3rem; max-height: 21rem; overflow-y: auto;
  display: none; z-index: 60;
}
.bw-search[data-open="true"] .bw-search__results { display: block; }
.bw-search__link {
  display: flex; justify-content: space-between; gap: .75rem; align-items: baseline;
  padding: .5rem .65rem; border-radius: var(--bw-radius-sm, 7px); text-decoration: none;
  color: var(--bw-ink, #232323); font-size: .875rem;
}
.bw-search__link:hover, .bw-search__link[aria-selected="true"] {
  background: var(--brand-blush-wash, #F7EFEC);
}
.bw-search__text { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.bw-search__title { overflow-wrap: anywhere; }
/* The term the query actually hit, e.g. "also called vitamin c" under
   "L-Ascorbic Acid". Without it an alias hit reads as a wrong result. */
.bw-search__via {
  font-size: .72rem; color: var(--bw-muted, #4F4F4F); font-style: italic;
}
.bw-search__kind {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--bw-muted, #4F4F4F); flex-shrink: 0;
}
.bw-search__empty { padding: .7rem .65rem; font-size: .85rem; color: var(--bw-muted, #4F4F4F); }
/* On a phone the field takes a full-width row of its own, below the logo and
   the horizontally scrolling nav strip. */
@media (max-width: 640px) {
  .bw-search { flex: 1 1 100%; order: 3; margin: .35rem 0 .6rem; }
}


/* Header gains a shadow once scrolled past the hero */
.bw-header[data-scrolled="true"] {
  box-shadow: 0 1px 12px rgba(35,35,35,0.06);
}
/* Smooth scroll is applied via JS (scroll-behavior: smooth on html can
   conflict with reduced-motion users who haven't set the preference).
   The scroll-margin-top on sections is already in the site styles. */
