:root {
  --bg:     #0e1116;
  --text:   #d5dae3;
  --muted:  #8b95a5;
  --syntax: #e5c07b;
  --hl:     #6ee7a1;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem 5rem;
}

h1 {
  text-align: center;
  font: 400 0.85rem ui-monospace, monospace;
  color: var(--muted);
  letter-spacing: 0.05em;
  margin: 0;
}

.spacer {
  height: 28vh;
}

.search-row {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin: 0 0 0.6rem;
}

.prompt {
  color: var(--hl);
  font-size: 2rem;
  line-height: 1;
}

#q {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font: 2rem ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1.3;
  padding: 0;
  caret-color: var(--hl);
}

#q::placeholder {
  color: var(--muted);
}

#q::-webkit-search-cancel-button,
#q::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}
#q::-ms-clear { display: none; width: 0; height: 0; }

#meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 2.4rem 2.4rem;
}

#results {
  list-style: none;
  padding: 0;
  margin: 0;
}

.card {
  margin: 0 0 1.8rem;
}

.card.featured {
  margin: 0 0 2.6rem;
}
.card.featured .name   { font-size: 1.7rem; }
.card.featured .syntax { font-size: 1.25rem; margin-bottom: 0.4rem; }
.card.featured .desc   { font-size: 1rem; margin-bottom: 0.5rem; }
.card.featured .ex     { font-size: 1.05rem; }
.card.featured .cat    { font-size: 0.85rem; }

.head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 0.25rem;
}

.name {
  font: 600 0.95rem ui-monospace, monospace;
  color: var(--text);
}

.cat {
  color: var(--muted);
  font-size: 0.75rem;
}

.syntax {
  color: var(--syntax);
  font: 0.9rem ui-monospace, monospace;
  display: block;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0 0 0.25rem;
}

.desc {
  color: var(--muted);
  margin: 0 0 0.3rem;
}

.ex {
  margin: 0;
  font: 0.85rem ui-monospace, monospace;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
}
.ex::before {
  content: "$ ";
  color: var(--muted);
}

#empty {
  color: var(--muted);
  text-align: center;
  padding: 2rem 0;
}

mark {
  background: transparent;
  color: var(--hl);
  font-weight: 600;
}
