/* /search. Loaded after concepts.css and pages.css, which own .cgroup, .gmeta,
 * .mlink/.mt, .mdepth and the pill. Same min-width: 0 discipline throughout -
 * a result is an arbitrary sentence of transcript and there is no upper bound
 * on the length of a word in it. */

.searchform {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 1.4rem;
}
.searchform > * { min-width: 0; }
.searchform input[type="search"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: .6rem .9rem;
  font: inherit;
  font-size: 1rem;
  color: var(--alt-text);
  background: var(--surface);
  border: 1px solid rgb(var(--alt-text-rgb) / .15);
  border-radius: var(--radius-btn);
}
.searchform input[type="search"]:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.searchform button {
  padding: .6rem 1.4rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius-btn);
  cursor: pointer;
}
.searchform button:hover { filter: brightness(1.15); }

.topichits { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0 0 1.4rem; }
.topichits > * { min-width: 0; }
.topichits .kbpill span { opacity: .7; font-weight: 400; }

.hitlist { list-style: none; margin: 0; padding: 0; }
.hit {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "time  depth"
    "text  text"
    "topic topic";
  column-gap: .6rem;
  row-gap: .3rem;
  align-items: baseline;
  padding: .7rem .8rem;
  margin-bottom: .5rem;
  background: rgb(var(--alt-text-rgb) / .03);
  border-left: 2px solid rgb(var(--alt-text-rgb) / .12);
  border-radius: 0 10px 10px 0;
}
.hit > * { min-width: 0; }
.hit:hover { border-left-color: var(--accent); }
.hit.is-section { border-left-color: var(--alt-accent); }

.hit .mlink { grid-area: time; }
.hit .mdepth { grid-area: depth; justify-self: start; }
.htext {
  grid-area: text;
  font-size: .92rem;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.htext em { opacity: .6; font-style: normal; font-weight: 600; }
.hkind {
  font-size: .65rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .6;
  margin-right: .4rem;
}
.htext mark {
  background: rgb(var(--alt-text-rgb) / .16);
  color: var(--alt-accent);
  border-radius: 3px;
  padding: 0 .12em;
}
.htopic {
  grid-area: topic;
  justify-self: start;
  font-size: .72rem;
  opacity: .7;
  text-decoration: none;
  padding: .1rem .55rem;
  border-radius: 30px;
  background: rgb(var(--alt-text-rgb) / .07);
  overflow-wrap: anywhere;
}
.htopic:hover { opacity: 1; text-decoration: underline; }

.more { font-size: .8rem; margin: -.2rem 0 1.4rem; }

@media (min-width: 720px) {
  .hit {
    grid-template-areas:
      "time text"
      "depth text"
      "depth topic";
    align-items: start;
  }
  .hit .mlink, .hit .mdepth { align-self: start; }
}
