/* Fons Veritatis Search. Colours follow the theme (currentColor, inherit); override the
   --fvs-* variables in your theme to change them. */
:root {
  --fvs-accent: #1a5fd0;
  --fvs-muted: #6b6f76;
  --fvs-border: rgba(127, 127, 127, 0.28);
  --fvs-surface: #fff;
  --fvs-text: #1c1d1f;
  --fvs-hover: rgba(127, 127, 127, 0.12);
}
/* A dark theme sets e.g. --fvs-surface: #1f2023; --fvs-text: #ececee; (the dropdown follows the
   theme, not the visitor's system setting, which may not match the site). */

.fvs-main { padding: 2rem 1rem 3rem; }
.fvs { max-width: 46rem; margin: 0 auto; }
.fvs-form { display: flex; gap: 0.5rem; margin: 0 0 1.75rem; }
.fvs-input {
  flex: 1; min-width: 0; font: inherit; padding: 0.7rem 1rem;
  border: 1px solid var(--fvs-border); border-radius: 999px; background: transparent; color: inherit;
}
.fvs-input:focus { outline: 2px solid var(--fvs-accent); outline-offset: 1px; }
.fvs-button {
  font: inherit; font-weight: 600; padding: 0.7rem 1.3rem; border: 0; border-radius: 999px;
  background: var(--fvs-accent); color: #fff; cursor: pointer;
}
.fvs-title { font-size: 1.5rem; line-height: 1.3; margin: 0 0 1.25rem; }
.fvs-heading {
  font-family: inherit;
  font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--fvs-muted); margin: 0 0 0.75rem;
}
.fvs-own { margin: 0 0 2rem; padding: 0 0 1.5rem; border-bottom: 1px solid var(--fvs-border); }
.fvs-list { list-style: none; margin: 0; padding: 0; }
.fvs-item { margin: 0 0 1.6rem; padding: 0; }
.fvs-item--own { display: flex; gap: 1rem; align-items: flex-start; }
.fvs-thumb { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.fvs-body { min-width: 0; }
.fvs-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--fvs-muted); margin: 0 0 0.2rem; }
.fvs-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fvs-favicon { width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0; }
.fvs-link { font-size: 1.15rem; font-weight: 600; line-height: 1.35; color: var(--fvs-accent); text-decoration: none; overflow-wrap: anywhere; }
.fvs-link:hover { text-decoration: underline; }
.fvs-item--own .fvs-meta { margin: 0.15rem 0 0; }
.fvs-snippet { font-size: 0.95rem; line-height: 1.55; margin: 0.25rem 0 0; overflow-wrap: anywhere; }
.fvs-empty { padding: 1rem; border: 1px solid var(--fvs-border); border-radius: 8px; color: var(--fvs-muted); }
.fvs-admin-note { font-size: 0.85rem; padding: 0.6rem 0.8rem; border-left: 3px solid #d63638; background: rgba(214, 54, 56, 0.08); }
.fvs-pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 2.5rem 0 0; font-size: 0.95rem; }
.fvs-page { padding: 0.5rem 1rem; border: 1px solid var(--fvs-border); border-radius: 999px; text-decoration: none; color: inherit; font-weight: 500; }
.fvs-page:hover { border-color: var(--fvs-accent); color: var(--fvs-accent); }
.fvs-page-n { color: var(--fvs-muted); }
.fvs-trending ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fvs-trending a { display: inline-block; padding: 0.4rem 0.9rem; border: 1px solid var(--fvs-border); border-radius: 999px; text-decoration: none; color: inherit; }
.fvs-trending a:hover { border-color: var(--fvs-accent); color: var(--fvs-accent); }

/* The dropdown (on <body>, position: fixed). */
.fvs-dropdown {
  position: fixed; z-index: 100000; max-height: 24rem; overflow: auto; margin: 0; padding: 0.35rem;
  list-style: none; text-align: left; font-size: 0.95rem; line-height: 1.4;
  background: var(--fvs-surface); color: var(--fvs-text);
  border: 1px solid var(--fvs-border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.fvs-dropdown[hidden] { display: none; }
.fvs-dropdown-heading { padding: 0.4rem 0.75rem 0.25rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.65; }
.fvs-dropdown-sep { margin: 0.25rem 0.75rem; border-top: 1px solid var(--fvs-border); }
.fvs-dropdown-item { display: flex; align-items: center; gap: 0.6rem; padding: 0.5rem 0.75rem; border-radius: 6px; cursor: pointer; }
.fvs-dropdown-item[aria-selected="true"] { background: var(--fvs-hover); }
.fvs-dropdown-icon { display: inline-flex; flex-shrink: 0; width: 1rem; height: 1rem; opacity: 0.6; }
.fvs-dropdown-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fvs-dropdown-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fvs-article .fvs-dropdown-text { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.fvs-dropdown-text b { font-weight: 700; }

@media (max-width: 600px) {
  .fvs-form { flex-direction: column; }
  .fvs-thumb { width: 56px; height: 56px; }
}

.fvs-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
