/* Handbuch-Experte, Suche (docs/etappe3/suche-entwurf.md 9.1; Farben nach docs/design/gestaltung-c.md über die Variablen
   aus haupt.css; Mindestschrift 14 px). Ergebnisse im eigenen Reiter „Suche“ (#panel-suche, SPEC § 16.10 Nr. 3); ohne
   aktive Suche (.ohne-suche) nur „Letzte Suchen“. */
#suche_bereich { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#suche_bereich.ohne-suche #suchfilter, #suche_bereich.ohne-suche #suche_titel, #suche_bereich.ohne-suche #suche_text { display: none; }
#reiter-suche-zahl { font-variant-numeric: tabular-nums; }
/* fünf Reiter in einer Zeile (360–400 px), bei schmaler Spalte umbrechen statt abschneiden */
#ihv-reiter { flex-wrap: wrap; }
#ihv-reiter .reiter { flex: 1 1 auto; padding: 0 0.3rem; white-space: nowrap; font-size: max(14px, 0.9333rem); }

/* Letzte Suchen im Reiter (Nr. 4): Begriff + Zeit, darunter geöffnete Dokumente mit Seite */
#suche_verlauf { margin-top: 0.6rem; border-top: 1px solid var(--rand-hell); }
#suche_bereich.ohne-suche #suche_verlauf { margin-top: 0; border-top: 0; }
.sverlauf-kopf { display: flex; align-items: baseline; gap: 0.5rem; }
#suche_verlauf .sverlauf-kopf .szeile { flex: 1 1 auto; min-width: 0; }
.sverlauf-zeit { flex: 0 0 auto; padding-right: 0.8rem; font-size: max(14px, 0.8rem); color: var(--text2); font-variant-numeric: tabular-nums; }
.sverlauf-dok { list-style: none; margin: 0 0 0.3rem; padding: 0 0 0 1.2rem; }
#suche_verlauf .sverlauf-oeffnen { display: flex; gap: 0.5rem; }
.sverlauf-titel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sverlauf-seite { flex: 0 0 auto; color: var(--text2); font-variant-numeric: tabular-nums; }
.sverlauf-weg { display: block; padding: 0.2rem 0.8rem; color: var(--text2); font-style: italic; }
#suche_verlauf_leeren { margin: 0.3rem 0.8rem; }
#suche-lupe { flex: 0 0 auto; cursor: text; }

/* Letzte Suchen unter dem Feld */
#suche_letzte {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 60vh;
  overflow: auto;
  padding: 0.3rem 0;
  background: var(--hg);
  color: var(--text);
  border: 1px solid var(--rand2);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
#suche_letzte .skopf { margin: 0.1rem 0.8rem 0.3rem; }
#suche_letzte .sleer { margin: 0.2rem 0.8rem 0.4rem; }
#suche_letzte .knopf-link { margin: 0.3rem 0.8rem 0.2rem; }

/* Filterzeile */
#suchfilter { flex: 0 0 auto; padding: 6px 8px; border-bottom: 1px solid var(--rand-hell); }
.sfilter-kopf { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 4px; }
.sfilter-titel { font-weight: 600; color: var(--kapitel); }
#suche_schliessen { padding: 0 0.6rem; font-size: 1.1rem; line-height: 1.6; }
.sfilter-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.sfilter { position: relative; }
.sfilter > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--rand2);
  border-radius: 5px;
  background: var(--hg);
  color: var(--text);
  font-size: max(14px, 0.8667rem);
}
.sfilter > summary::-webkit-details-marker { display: none; }
.sfilter > summary::after { content: " ▾"; color: var(--text2); }
.sfilter-liste {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  left: 0;
  min-width: 16rem;
  max-height: 50vh;
  overflow: auto;
  padding: 0.3rem 0;
  background: var(--hg);
  border: 1px solid var(--rand2);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.sfilter-wahl { display: flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.7rem; cursor: pointer; white-space: nowrap; }
.sfilter-wahl:hover { background: var(--markiert); }
.sfilter-wahl .symbol { display: inline-flex; color: var(--text2); }
.sfilter-nur { display: inline-flex; align-items: center; gap: 0.3rem; font-size: max(14px, 0.8667rem); }
.knopf-link { padding: 0; background: none; border: 0; color: var(--fokus); text-decoration: underline; cursor: pointer; font: inherit; }

/* Listen */
#suche_liste { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 0 0 1rem; }
.skopf { margin: 0.6rem 12px 0.2rem; font-size: max(14px, 0.8667rem); font-weight: 600; color: var(--kapitel); }
.sleer { margin: 0.2rem 12px; color: var(--text2); }
.sliste, .sseiten { list-style: none; margin: 0; padding: 0; }
.szeile {
  display: block;
  width: 100%;
  padding: 4px 12px;
  text-align: left;
  background: none;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.szeile:hover, .szeile:focus-visible { background: var(--markiert); }
.stitel, .sdokkopf {
  display: grid;
  grid-template-columns: auto 52px minmax(0, 1fr) auto;
  column-gap: 6px;
  align-items: baseline;
}
.stitel .symbol, .sdokkopf .symbol { align-self: center; display: inline-flex; color: var(--text2); }
.stitel .kennung, .sdokkopf .kennung { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stitel .kennung:empty, .sdokkopf .kennung:empty { display: none; }
.stitel .kennung:empty + .stitel-text, .sdokkopf .kennung:empty + .stitel-text { grid-column: 2 / 4; }
.stitel-text { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; hyphens: none; }
.stitel .rev { grid-column: 4; font-size: max(14px, 0.8rem); color: var(--text2); white-space: nowrap; text-align: right; }
.szusatz { grid-column: 3 / -1; font-size: max(14px, 0.8rem); color: var(--text2); overflow-wrap: anywhere; }
.sdokkopf .szusatz { grid-column: 2 / -1; }
.sdok { border-top: 1px solid var(--rand-hell); padding: 2px 0; }
.sseite { display: flex; gap: 0.5rem; padding-left: 32px; font-size: max(14px, 0.9333rem); }
.snr { flex: 0 0 auto; min-width: 3.2em; color: var(--text2); white-space: nowrap; }
.sausschnitt { min-width: 0; overflow-wrap: anywhere; }
.smehr { margin: 2px 12px 4px 44px; padding: 0.1rem 0.6rem; font-size: max(14px, 0.8667rem); }
#suche_weitere { margin-left: 12px; }
#suche_liste mark, #suche_letzte mark { background: var(--markiert); color: inherit; font-weight: 600; box-shadow: inset 0 -2px 0 var(--akzent); }

/* Hinweise (9.2): gelb Tippfehler-Ersatz/Warnung, rot nicht verfügbar */
#suche_hinweis:empty { display: none; }
.shinweis-zeile { margin: 0.4rem 8px; padding: 0.3rem 0.5rem; border-radius: 4px; overflow-wrap: anywhere; }
.shinweis-zeile.info, .shinweis-zeile.leer { color: var(--text2); }
.shinweis-zeile.warn { background: var(--warn-hg); color: var(--warn-text); }
.shinweis-zeile.fehler { background: var(--fehler-hg); color: var(--fehler-text); }
#suche_ohne_text { margin: 0.8rem 8px 0; padding-top: 0.4rem; border-top: 1px solid var(--rand-hell); color: var(--text2); }
.sfuss { margin: 0 4px 0.3rem; font-size: max(14px, 0.8667rem); }

/* Reiter Stichwörter (5.3) */
#panel-stichwoerter { padding: 0.4rem 0.5rem 1rem; }
.sw-leiste { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 0 0.4rem; }
.sw-buchstabe { min-width: 1.6rem; padding: 0.1rem 0.2rem; background: none; border: 1px solid var(--rand-hell); border-radius: 3px; color: var(--text); cursor: pointer; }
.sw-buchstabe:disabled { color: var(--text2); opacity: 0.5; cursor: default; }
.sw-begriff { font-weight: 600; }
.sw-seiten { color: var(--text2); }
