/* Feature 4 — curriculum search.
   Uses only theme vars (var(--ink), var(--muted), var(--card), var(--line),
   var(--accent)) plus fixed light-on-dark values for the header widget,
   matching the existing dark header in both themes. */

/* --- Header search: inline in the desktop nav, top of the mobile menu --- */
.nav-search {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.nav-search input[type="search"] {
  width: 10.5rem;
  padding: .32rem .6rem;
  font: inherit;
  font-size: .9rem;
  color: #e8eef6;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: .45rem;
}
.nav-search input[type="search"]::placeholder {
  color: rgba(232, 238, 246, .55);
}
.nav-search input[type="search"]:focus {
  outline: 2px solid rgba(255, 255, 255, .45);
  outline-offset: 1px;
  background: rgba(255, 255, 255, .13);
}
.nav-search-btn {
  background: none;
  border: none;
  color: #dbe4f0;
  cursor: pointer;
  padding: .3rem;
  display: inline-flex;
  align-items: center;
}
.nav-search-btn:hover { color: #fff; }

/* --- Results page --- */
.search-form {
  display: flex;
  gap: .5rem;
  margin: 1rem 0 1.5rem;
}
.search-form input[type="search"] {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: .6rem .9rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .5rem;
}
.search-form input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.search-group-title {
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 1.75rem 0 .25rem;
}
.search-count {
  font-variant-numeric: tabular-nums;
}
.search-list {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.search-result {
  display: block;
  padding: .8rem .1rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.search-result:hover strong { text-decoration: underline; }
.search-result strong {
  display: block;
  font-weight: 600;
}
.search-result > span { display: block; }
.search-result > span:not(.search-meta) {
  font-size: .9rem;
  margin-top: .25rem;
}
.search-meta {
  font-size: .78rem;
  margin-top: .3rem;
}

@media (max-width: 760px) {
  /* First item in the hamburger panel, full width. */
  .nav-search { width: 100%; }
  .nav-search input[type="search"] { flex: 1; width: auto; }
}
