/* Site-wide lesson search: header magnifier, search panel and /search/ results page (js/site-search.js). */
.site-header .header-search {
  order: 2; flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 999px; color: var(--navy);
  border: 1px solid var(--line); background: var(--surface); text-decoration: none;
  transition: background .15s, border-color .15s;
}
.site-header .header-search:hover, .site-header .header-search:focus-visible { background: var(--paper); border-color: var(--navy); }
@media (max-width: 900px) {
  .site-header .header-search { order: 0; margin-left: auto; }
  .site-header .menu-toggle { order: 1; }
}

.ss-panel { position: fixed; inset: 0; z-index: 1000; }
.ss-panel[hidden] { display: none; }
html.ss-open { overflow: hidden; }
.ss-backdrop { position: absolute; inset: 0; background: rgba(16, 42, 60, .45); }
.ss-box {
  position: relative; margin: clamp(12px, 9vh, 90px) auto 0; width: min(680px, calc(100% - 2 * var(--gutter, 16px)));
  max-height: calc(100vh - clamp(24px, 14vh, 140px)); display: flex; flex-direction: column;
  background: var(--surface); border-radius: var(--radius, 14px); box-shadow: 0 24px 60px -18px rgba(16, 42, 60, .5); overflow: hidden;
}
.ss-form { display: flex; align-items: center; gap: 10px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); color: var(--muted); }
.ss-form input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 18px; color: var(--ink); padding: 8px 0;
}
.ss-form input::-webkit-search-cancel-button { display: none; }
.ss-x { border: 1px solid var(--line); background: var(--paper); color: var(--muted); border-radius: 6px; font: 600 12px/1 var(--sans); padding: 6px 8px; cursor: pointer; }
.ss-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; }
.ss-list:empty { display: none; }
.ss-list a {
  display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none;
}
.ss-list a:hover, .ss-list a.is-active { background: var(--paper); }
.ss-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; background: var(--c, var(--navy)); }
.ss-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ss-txt strong { color: var(--navy); font-weight: 600; }
.ss-txt small { color: var(--muted); font-size: 13.5px; }
.ss-empty { padding: 14px 12px; color: var(--muted); }
.ss-more { margin: 0; padding: 12px 18px; border-top: 1px solid var(--line); font-weight: 600; }
.ss-more[hidden] { display: none; }
.ss-list mark, .ssp-results mark { background: #fbe7a6; color: inherit; border-radius: 2px; padding: 0 1px; }

/* Results page */
.ssp { padding-block: clamp(28px, 5vw, 56px) clamp(40px, 6vw, 72px); max-width: 860px; }
.ssp h1 { margin-bottom: 8px; }
.ssp-lead { color: var(--muted); margin-bottom: 22px; }
.ssp-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; margin-bottom: 18px; }
.ssp-field { flex: 1 1 320px; display: flex; align-items: center; gap: 10px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.ssp-field:focus-within { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(22, 53, 75, .12); }
.ssp-field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; font-size: 17px; color: var(--ink); padding: 12px 0; }
.ssp-form select { flex: 0 1 220px; }
.ssp-status { color: var(--muted); margin-bottom: 14px; min-height: 1.5em; }
.ssp-status strong { color: var(--navy); }
.ssp-results { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ssp-card {
  display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; background: var(--surface);
  border: 1px solid var(--line); border-left: 4px solid var(--c, var(--navy)); border-radius: var(--radius-sm, 10px);
  color: var(--ink); text-decoration: none; box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s;
}
.ssp-card:hover { border-color: var(--c, var(--navy)); transform: translateY(-1px); }
.ssp-crumb { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13.5px; }
.ssp-crumb .ss-dot { margin-top: 0; width: 8px; height: 8px; }
.ssp-title { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--navy); line-height: 1.3; }
.ssp-snip { color: var(--muted); font-size: 15px; line-height: 1.5; }
