/* =============================================================================
   Grow Your Soul - the search button in the menu and its panel (20 Oct 2026).
   The panel is made by assets/js/search.js; the index by src/search_index.py.
   ============================================================================= */
.hs-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: 0 0 44px; padding: 0; cursor: pointer;
  background: none; color: var(--bar-ink, #fff);
  border: 1.5px solid var(--bar-line, rgba(255,255,255,.18)); border-radius: 50%;
  transition: background .15s ease, border-color .15s ease;
}
.hs-btn:hover { background: var(--bar-hover, rgba(255,255,255,.11)); border-color: rgba(255,255,255,.4); }
.hs-btn:focus-visible { outline: 2px solid var(--gold, #C9A24A); outline-offset: 2px; }
.hs-btn svg { width: 19px; height: 19px; }
/* The menu row was already full at the narrow end of the computer widths
   (19 Oct 2026, eight sections), so the button takes its room from the gaps. */
@media (min-width: 1061px) and (max-width: 1180px) {
  .hs-btn { width: 38px; height: 38px; flex-basis: 38px; }
  .header-inner { gap: .65rem; }
  .header-actions { gap: .4rem; margin-left: .25rem; }
  .nav-link { padding-left: .42rem; }
  .nav-more { padding-right: .34rem; }
}

html.hs-on { overflow: hidden; }
.hs-backdrop { position: fixed; inset: 0; z-index: 300; background: rgba(8,16,10,.55); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); }
.hs-backdrop[hidden], .hs-panel[hidden] { display: none; }
.hs-panel {
  position: fixed; z-index: 301; left: 50%; top: 6vh; width: min(760px, calc(100vw - 2rem));
  max-height: 86vh; display: flex; flex-direction: column;
  transform: translate(-50%, -8px); opacity: 0; transition: transform .16s ease, opacity .16s ease;
  background: var(--paper, #FBFAF6); color: var(--ink, #17202B);
  border-radius: 16px; box-shadow: 0 24px 70px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.12);
  font-family: var(--font-ui, system-ui, sans-serif); overflow: hidden;
}
.hs-panel.is-open { transform: translate(-50%, 0); opacity: 1; }
.hs-form { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem .7rem 1.1rem; border-bottom: 1px solid var(--line, #DDDCD3); }
.hs-glass { flex: 0 0 auto; color: var(--ink-faint, #646F7B); }
.hs-input {
  flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: inherit;
  font: 500 1.12rem/1.4 var(--font-ui, system-ui, sans-serif); padding: .55rem 0;
}
.hs-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hs-x {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(0,0,0,.05); color: var(--ink-soft, #4B5666); font-size: 1rem;
}
.hs-x:hover { background: rgba(0,0,0,.1); }
.hs-out { overflow-y: auto; overscroll-behavior: contain; padding: .4rem 0 .8rem; flex: 1 1 auto; }
.hs-foot {
  display: flex; justify-content: space-between; gap: 1rem; margin: 0; padding: .55rem 1.1rem;
  border-top: 1px solid var(--line, #DDDCD3); font-size: .78rem; color: var(--ink-faint, #646F7B);
}
.hs-foot kbd { font: inherit; border: 1px solid var(--line, #DDDCD3); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3em; background: #fff; }
.hs-group { padding: .5rem .6rem .2rem; }
.hs-group + .hs-group { border-top: 1px solid rgba(0,0,0,.06); }
.hs-gh {
  margin: .35rem .5rem .3rem; font: 700 .72rem/1.2 var(--font-ui, system-ui, sans-serif);
  letter-spacing: .09em; text-transform: uppercase; color: var(--ink-faint, #646F7B);
}
.hs-count { font-weight: 600; letter-spacing: 0; color: var(--ink-faint, #646F7B); opacity: .8; }
.hs-group ul { list-style: none; margin: 0; padding: 0; }
.hs-item {
  display: flex; gap: .75rem; align-items: flex-start; padding: .6rem .6rem; border-radius: 10px;
  color: inherit; text-decoration: none;
}
.hs-item:hover, .hs-item:focus-visible { background: var(--green-soft, #E4EDF7); outline: none; }
.hs-ico { flex: 0 0 auto; margin-top: .18rem; color: var(--green, #0B3460); }
.hs-body { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.hs-title { font-weight: 600; font-size: 1rem; line-height: 1.35; color: var(--green-deep, #04203F); }
.hs-meta { font-size: .76rem; color: var(--ink-faint, #646F7B); }
.hs-snip {
  font-family: var(--font-body, Georgia, serif); font-size: .92rem; line-height: 1.45; color: var(--ink-soft, #4B5666);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hs-item mark { background: var(--gold-soft, #F7EFDC); color: inherit; border-radius: 3px; padding: 0 .08em; box-shadow: inset 0 -2px 0 rgba(201,162,74,.45); }
.hs-more {
  display: inline-block; margin: .15rem .6rem .45rem; padding: .35rem .2rem; font-size: .88rem; font-weight: 600;
  color: var(--green, #0B3460); text-decoration: none; background: none; border: 0; cursor: pointer; font-family: inherit;
}
.hs-more:hover, .hs-more:focus-visible { text-decoration: underline; outline: none; }
.hs-more-btn { color: var(--ink-soft, #4B5666); }
.hs-none, .hs-wait, .hs-none-all { margin: .8rem 1.1rem; color: var(--ink-soft, #4B5666); font-size: .95rem; }
.hs-start { padding: .9rem 1.1rem 0; color: var(--ink-soft, #4B5666); font-size: .92rem; }
.hs-start p { margin: 0 0 .6rem; }
.hs-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.hs-chip {
  font: 500 .88rem/1 var(--font-ui, system-ui, sans-serif); padding: .55rem .8rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line, #DDDCD3); background: #fff; color: var(--green-deep, #04203F);
}
.hs-chip:hover { border-color: var(--green, #0B3460); }

.hs-part { color: var(--green, #0B3460); font-weight: 600; }

/* On the page a result opened: the words looked for, marked where they are */
mark.hs-hit {
  background: #F6E2A4; color: inherit; border-radius: 3px; padding: 0 .1em;
  box-shadow: 0 0 0 2px rgba(201,162,74,.45); scroll-margin-top: calc(var(--header-h, 70px) + 1.5rem);
  transition: background-color 2s ease, box-shadow 2s ease;
}
mark.hs-hit.is-fading { background: rgba(246,226,164,.4); box-shadow: none; }
main [id] { scroll-margin-top: calc(var(--header-h, 70px) + 1rem); }

@media (max-width: 700px) {
  .hs-panel { top: 0; left: 0; width: 100%; max-height: none; height: 100%; height: 100dvh; border-radius: 0; transform: translateY(8px); }
  .hs-panel.is-open { transform: none; }
  .hs-foot { display: none; }
  .hs-input { font-size: 1.05rem; }       /* 16px or more, so phones do not zoom in */
}
/* With the search button beside it, "Ask the Knowledge Base" needs about 60px
   more than before, so it says "Ask" until there is room (was up to 1300px). */
@media (min-width: 1301px) and (max-width: 1440px) { .header-actions .btn-label-long { display: none; } }

/* Phones: the name, the menu, the search and Ask all on one row */
@media (max-width: 420px) {
  .hs-btn { width: 38px; height: 38px; flex-basis: 38px; }
  .header-inner { gap: .42rem; }
  .header-actions { gap: .35rem; margin-left: .1rem; }
  .header-actions .btn { padding: .5em .72em; }
}
@media (prefers-reduced-motion: reduce) { .hs-panel { transition: none; } }
