.search-results-bar { display: flex; gap: .5rem; margin: 1rem 0; }
.search-results-bar input { flex: 1; min-height: 44px; padding: .5rem .75rem; font-size: 1rem; border: 1px solid var(--color-control-border, #767676); border-radius: 6px; }
.search-results-bar button { min-height: 44px; padding: 0 1rem; flex-shrink: 0; min-width: 80px; }
.search-meta { color: var(--color-text-muted, #555); margin-bottom: 1rem; }
.search-grid { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; }
.search-grid.no-facets { grid-template-columns: 1fr; }
@media (max-width: 768px) { .search-grid { grid-template-columns: 1fr; } .search-facets { order: 2; } }
.search-facets { background: var(--color-surface, #f7f7f7); padding: 1rem; border-radius: 8px; }
.search-facets h3 { font-size: 0.875rem; text-transform: uppercase; margin: 0 0 .5rem; }
.search-facets label { display: block; padding: .25rem 0; cursor: pointer; }
.search-result-card { padding: 1rem; border-bottom: 1px solid var(--color-border, #e2e2e2); }
.search-result-card .badge { display: inline-block; padding: .125rem .5rem; border-radius: 4px; font-size: .75rem; margin-right: .5rem; }
.search-result-card .badge-page { background: #dde7ff; color: #1a3380; }
.search-result-card .badge-tool { background: #e0f7e0; color: #14532d; }
.search-result-card .badge-dc { background: #ffe7c7; color: #7a3e00; }
.search-result-card .badge-bva { background: #f3e0ff; color: #4a1a7a; }
.search-result-card h3 { margin: .25rem 0; font-size: 1.0625rem; }
.search-result-card mark { background: #fff3a8; padding: 0 .15em; border-radius: 2px; }
:root[data-theme="dark"] .search-facets { background: #1e1e1e; }
:root[data-theme="dark"] .search-result-card .badge-page { background: #1a2350; color: #cfd9ff; }
:root[data-theme="dark"] .search-result-card .badge-tool { background: #0f2a14; color: #b8e6c2; }
:root[data-theme="dark"] .search-result-card .badge-dc { background: #2a1d0b; color: #ffd9a8; }
:root[data-theme="dark"] .search-result-card .badge-bva { background: #2a0f3f; color: #e2c6ff; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .search-facets { background: #1e1e1e; }
}

.rmv-hero { padding: 4rem 1rem; text-align: center; background: var(--color-surface, #f7f7f7); }
.rmv-hero h1 { font-size: 2rem; margin: 0 0 .5rem; }
.rmv-hero-sub { margin: 0 0 1.5rem; color: var(--color-text-muted, #555); }
.rmv-hero-search { display: flex; gap: .5rem; max-width: 720px; margin: 0 auto; position: relative; }
.rmv-hero-search input { flex: 1; min-height: 60px; padding: 0 1rem; font-size: 1.0625rem; border: 1px solid var(--color-control-border, #767676); border-radius: 8px; }
.rmv-hero-search button { min-height: 60px; padding: 0 1.25rem; flex-shrink: 0; min-width: 88px; }
.search-suggest { position: absolute; top: calc(100% + .25rem); left: 0; right: 0; background: var(--color-surface, #fff); color: var(--color-text); border: 1px solid var(--color-border, #ccc); border-radius: 8px; list-style: none; padding: .25rem 0; margin: 0; z-index: 50; max-height: 360px; overflow-y: auto; text-align: left; }
.search-suggest li { padding: 0; }
.search-suggest a { display: block; padding: .5rem 1rem; color: inherit; text-decoration: none; min-height: 44px; line-height: 28px; }
.search-suggest a:hover, .search-suggest a:focus { background: var(--color-hover, #f0f0f0); }
:root[data-theme="dark"] .search-suggest a:hover, :root[data-theme="dark"] .search-suggest a:focus { background: var(--color-border, #2a3242); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .search-suggest a:hover,
  :root:not([data-theme="light"]) .search-suggest a:focus { background: var(--color-border, #2a3242); }
}
.suggest-view-all { border-top: 1px solid var(--color-border, #e2e2e2); font-weight: 600; }
/* Cap to ~3 visible rows so the list never runs past the fold; the rest
   scrolls (same pattern as nav/overlay suggest) or use "View all results". */
#hero-suggest { max-height: min(150px, 40vh); }
.rmv-hero-chips { margin-top: 1rem; }
.rmv-chip { display: inline-block; margin: .25rem; padding: .25rem .75rem; background: var(--color-surface-elev, #fff); border: 1px solid var(--color-border, #ccc); border-radius: 999px; text-decoration: none; color: inherit; min-height: 36px; line-height: 32px; }
:root[data-theme="dark"] .rmv-hero { background: #181818; }
:root[data-theme="dark"] .search-suggest { background: #1e1e1e; }

/* ===== Navbar compact search bar + mobile overlay ===== */
.rmv-nav-search { display: none; position: relative; margin-right: .75rem; }
.rmv-nav-search input { width: 240px; min-height: 40px; padding: 0 .75rem; border: 1px solid var(--color-control-border, #767676); border-radius: 6px; }
@media (min-width: 768px) { .rmv-nav-search { display: block; } }
.rmv-nav-search-mobile { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; background: transparent; border: 0; color: inherit; cursor: pointer; }
@media (min-width: 768px) { .rmv-nav-search-mobile { display: none; } }
.rmv-search-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 4rem 1rem 1rem; }
.rmv-search-overlay-form { background: var(--color-surface, #fff); padding: 1rem; border-radius: 12px; width: 100%; max-width: 560px; position: relative; }
.rmv-search-overlay-form input { width: 100%; min-height: 56px; padding: 0 3rem 0 1rem; font-size: 1.125rem; border: 1px solid var(--color-control-border, #767676); border-radius: 8px; }
.rmv-search-overlay-form button#overlay-close { position: absolute; top: 1.25rem; right: 1.5rem; background: transparent; border: 0; font-size: 1.75rem; cursor: pointer; min-width: 44px; min-height: 44px; }
:root[data-theme="dark"] .rmv-search-overlay-form { background: #1e1e1e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .rmv-search-overlay-form { background: #1e1e1e; }
}
:root[data-theme="dark"] .rmv-chip { background: #1e1e1e; }


.search-include-bva { display: inline-flex; align-items: center; gap: .4rem; margin: .5rem 0 1rem; font-size: .9rem; cursor: pointer; }
.search-include-bva input { margin: 0; }
.search-result-card .badge-bva { background: #f3e0ff; color: #4a1a7a; }


/* /search: two-modes instructions block */
.search-modes { margin: 0.25rem 0 1rem; }
.search-modes-lead { font-weight: 600; color: var(--color-text); margin: 0 0 0.4rem; }
.search-modes ul { margin: 0; padding-left: 1.1rem; }
.search-modes li { margin-bottom: 0.4rem; color: var(--color-text-muted); line-height: 1.6; }
.search-modes strong { color: var(--color-text); }
.search-index-h { font-size: 1.1rem; margin: 1.5rem 0 0.6rem; }

/* BVA result excerpts: clamp to two lines (citation + 2 lines) */
.excerpt-bva {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* /search: gold + bold headings for the Guide summary and the index heading */
#site-guide-mount #site-guide-h { color: var(--color-accent); font-weight: 700; }
.search-index-h { color: var(--color-accent); font-weight: 700; }

/* /search: make the Guide read as a featured tool, not a plain accordion */
#site-guide-mount .ask-guide { margin: .5rem 0 1.75rem; }
#site-guide-mount .ask-guide-details {
  border: 1px solid var(--color-border);
  border-top: 4px solid var(--color-accent);
  border-left: 1px solid var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(14,42,77,.12);
}
#site-guide-mount .ask-guide-summary {
  background: linear-gradient(180deg, rgba(176,122,31,.12), rgba(176,122,31,.02));
  padding: 1rem 1.2rem;
  font-size: 1.15rem;
}
#site-guide-mount .ask-guide-icon {
  font-size: 1.05rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  background: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(14,42,77,.25);
}
#site-guide-mount .ask-guide-explainer {
  font-size: .92rem;
  color: var(--color-text);
}
#site-guide-mount .ask-guide-btn {
  padding: .6rem 1.6rem;
  font-size: .95rem;
  box-shadow: 0 2px 8px rgba(14,42,77,.25);
}
