/* Suchseite und Live-Vorschläge: Tokens wie Mockup (Navy/Orange), inkl. Dunkelmodus. */
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:root {
  --suche-navy: #27335a;
  --suche-navy-deep: #00123f;
  --suche-blue: #4e66b5;
  --suche-orange: #fe9a5c;
  --suche-line: rgba(20, 20, 21, 0.1);
  --suche-line-2: rgba(20, 20, 21, 0.16);
  --suche-fg: #141415;
  --suche-fg-2: #3f424a;
  --suche-fg-3: #6b6d74;
  --suche-bg: #f6f5f2;
  --suche-bg-alt: #ebeae6;
  --suche-card: #ffffff;
  --suche-btn: #27335a;
  --suche-btn-hover: #34437a;
  --suche-radius: 16px;
  --suche-font: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --suche-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --suche-shadow: 0 1px 2px rgba(20, 20, 21, 0.04), 0 8px 24px -12px rgba(20, 20, 21, 0.12);
  --suche-glow:
    radial-gradient(1200px 480px at 12% -10%, rgba(254, 154, 92, 0.16), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(78, 102, 181, 0.12), transparent 55%),
    linear-gradient(180deg, #eef1f8 0%, var(--suche-bg) 42%, #ebeae6 100%);
}

[data-theme="dark"] {
  --suche-bg: #141415;
  --suche-bg-alt: #1a1a1b;
  --suche-card: #1c1c1e;
  --suche-fg: #f7f4ea;
  --suche-fg-2: #b9b7b0;
  --suche-fg-3: #8c8a84;
  --suche-line: rgba(255, 255, 255, 0.08);
  --suche-line-2: rgba(255, 255, 255, 0.14);
  --suche-navy-deep: #f7f4ea;
  --suche-btn: #2f3d6b;
  --suche-btn-hover: #3b4c85;
  --suche-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  --suche-glow:
    radial-gradient(1200px 480px at 12% -10%, rgba(254, 154, 92, 0.12), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(78, 102, 181, 0.1), transparent 55%),
    linear-gradient(180deg, #18181a 0%, #141415 45%, #121213 100%);
}

.suche-page {
  font-family: var(--suche-font);
  color: var(--suche-fg);
  background: var(--suche-glow);
  min-height: 70vh;
}

.suche-page .inner {
  width: min(800px, calc(100% - 48px));
  margin: 0 auto;
  padding: 40px 0 80px;
}

.suche-hero .crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--suche-blue);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

[data-theme="dark"] .suche-hero .crumbs {
  color: var(--suche-orange);
}

.suche-hero .crumbs a {
  color: inherit;
  text-decoration: none;
}

.suche-hero .crumbs .sep {
  opacity: 0.5;
  font-weight: 500;
}

.suche-hero h1 {
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.022em;
  margin: 0 0 8px;
  color: var(--suche-navy-deep);
  font-weight: 600;
}

.suche-hero .lead {
  margin: 0 0 24px;
  color: var(--suche-fg-2);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 46ch;
}

.suche-form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: stretch;
}

.suche-field {
  position: relative;
}

.suche-field svg.suche-ico {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  color: var(--suche-fg-3);
  pointer-events: none;
}

.suche-field .inp {
  width: 100%;
  height: 56px;
  border-radius: var(--suche-radius);
  border: 1px solid var(--suche-line-2);
  background: var(--suche-card);
  padding: 0 44px 0 48px;
  font: 400 17px/1.4 var(--suche-font);
  color: var(--suche-fg);
  box-shadow: var(--suche-shadow);
}

.suche-field .inp:focus {
  outline: 2px solid rgba(254, 154, 92, 0.55);
  outline-offset: 1px;
  border-color: rgba(254, 154, 92, 0.7);
}

.suche-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--suche-fg-3);
  display: none;
  place-items: center;
  cursor: pointer;
  border-radius: 8px;
  z-index: 2;
}

.suche-clear.is-on {
  display: grid;
}

.suche-clear svg {
  width: 16px;
  height: 16px;
}

.suche-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 56px;
  padding: 0 22px;
  border-radius: var(--suche-radius);
  border: 1px solid transparent;
  background: var(--suche-btn);
  color: #fff;
  font: 600 15px/1 var(--suche-font);
  cursor: pointer;
  text-decoration: none;
}

.suche-submit:hover {
  background: var(--suche-btn-hover);
}

.suche-submit svg {
  width: 18px;
  height: 18px;
}

.suche-didyou {
  margin: 20px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(254, 154, 92, 0.14);
  border: 1px solid rgba(254, 154, 92, 0.38);
  color: var(--suche-fg);
  font-size: 15px;
}

.suche-didyou a {
  color: var(--suche-navy);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--suche-orange);
}

[data-theme="dark"] .suche-didyou a {
  color: var(--suche-orange);
  border-bottom-color: var(--suche-orange);
}

.suche-meta {
  margin: 16px 0 0;
  color: var(--suche-fg-3);
  font-size: 14px;
}

.suche-empty-note {
  margin: 20px 0 0;
  color: var(--suche-fg-2);
  font-size: 1rem;
}

.suche-results {
  margin-top: 28px;
  display: grid;
  gap: 22px;
}

.suche-group {
  background: var(--suche-card);
  border: 1px solid var(--suche-line);
  border-radius: var(--suche-radius);
  box-shadow: var(--suche-shadow);
  overflow: hidden;
}

.suche-group-h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 16px 9px;
  border-bottom: 1px solid var(--suche-line);
  background: color-mix(in srgb, var(--suche-card) 70%, var(--suche-bg-alt));
}

.suche-group-h h2 {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--suche-navy);
}

[data-theme="dark"] .suche-group-h h2 {
  color: #b8c5ea;
}

.suche-group-h .cnt {
  font-size: 12px;
  color: var(--suche-fg-3);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.suche-row {
  display: grid;
  gap: 2px;
  padding: 12px 16px 13px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--suche-line);
}

.suche-row:first-of-type,
.suche-group-h + .suche-row {
  border-top: 0;
}

.suche-row:hover {
  background: rgba(254, 154, 92, 0.08);
}

.suche-row .t {
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--suche-navy-deep);
  line-height: 1.35;
}

.suche-row .d {
  margin: 0;
  color: var(--suche-fg-2);
  font-size: 0.92rem;
  line-height: 1.45;
}

.suche-row .p {
  color: var(--suche-fg-3);
  font-family: var(--suche-mono);
  font-size: 12px;
  margin-top: 2px;
}

.suche-page mark {
  background: rgba(254, 154, 92, 0.3);
  color: inherit;
  padding: 0;
  border-radius: 2px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.suche-block {
  margin-top: 32px;
}

.suche-block h2 {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--suche-navy-deep);
  margin: 0 0 12px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--suche-line-2);
  background: var(--suche-card);
  color: var(--suche-fg);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 550;
  cursor: pointer;
}

.chip:hover {
  border-color: rgba(254, 154, 92, 0.7);
  color: var(--suche-navy-deep);
}

.chip svg {
  width: 14px;
  height: 14px;
  color: var(--suche-orange);
}

.entry-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--suche-card);
  border: 1px solid var(--suche-line);
  border-radius: var(--suche-radius);
  overflow: hidden;
  box-shadow: var(--suche-shadow);
}

.entry-list a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--suche-line);
}

.entry-list a:nth-child(odd) {
  border-right: 1px solid var(--suche-line);
}

.entry-list a:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.entry-list a:hover {
  background: rgba(254, 154, 92, 0.08);
}

.entry-list .ic {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(78, 102, 181, 0.12);
  color: var(--suche-orange);
}

[data-theme="dark"] .entry-list .ic {
  background: rgba(154, 172, 220, 0.14);
}

.entry-list .ic svg {
  width: 16px;
  height: 16px;
}

.entry-list b {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--suche-navy-deep);
}

.entry-list small {
  display: block;
  color: var(--suche-fg-3);
  font-size: 12.5px;
  font-weight: 400;
}

/* Live-Vorschläge (404 + Suchseite) */
.suche-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  margin: 0;
  padding: 6px;
  list-style: none;
  border-radius: 14px;
  background: var(--suche-card);
  border: 1px solid var(--suche-line-2);
  box-shadow: 0 12px 32px -16px rgba(20, 20, 21, 0.35);
  text-align: left;
}

.suche-suggest [role="option"] {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--suche-fg);
  text-decoration: none;
  cursor: pointer;
}

.suche-suggest [role="option"][aria-selected="true"],
.suche-suggest [role="option"]:hover {
  background: rgba(254, 154, 92, 0.12);
}

.suche-suggest [role="option"] b {
  font-size: 14px;
  color: var(--suche-navy-deep);
}

.suche-suggest [role="option"] small {
  color: var(--suche-fg-3);
  font-size: 12px;
  font-family: var(--suche-mono);
}

/* 404-Formular: Submit und Vorschläge auf dunklem Hero */
.nf-s {
  position: relative;
}

.nf-s .nf-s-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.nf-s .nf-s-field {
  position: relative;
  min-width: 0;
}

.nf-s .nf-s-field > svg {
  position: absolute;
  left: 16px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #a09e97;
  pointer-events: none;
}

.nf-s .nf-s-field .inp {
  width: 100%;
  padding-left: 44px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.nf-s .nf-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  min-width: 48px;
  padding: 0 14px;
  border-radius: var(--radius, 16px);
  border: 1px solid rgba(254, 154, 92, 0.45);
  background: rgba(254, 154, 92, 0.18);
  color: #fe9a5c;
  cursor: pointer;
}

.nf-s .nf-go:hover {
  background: rgba(254, 154, 92, 0.28);
}

.nf-s .nf-go svg {
  position: static;
  transform: none;
  width: 18px;
  height: 18px;
  color: currentColor;
}

.nf-s .suche-suggest {
  background: #1c1c1e;
  border-color: rgba(255, 255, 255, 0.12);
}

.nf-s .suche-suggest [role="option"] b {
  color: #f1efe8;
}

.nf-s .suche-suggest [role="option"] small {
  color: #a09e97;
}

.nf-s .suche-suggest [role="option"][aria-selected="true"],
.nf-s .suche-suggest [role="option"]:hover {
  background: rgba(254, 154, 92, 0.16);
}

@media (max-width: 900px) {
  .entry-list {
    grid-template-columns: 1fr;
  }

  .entry-list a {
    border-right: 0 !important;
  }

  .entry-list a:last-child {
    border-bottom: 0;
  }

  .entry-list a:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--suche-line);
  }

  .entry-list a:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 640px) {
  .suche-page .inner {
    width: min(100% - 32px, 800px);
    padding: 28px 0 64px;
  }

  .suche-form {
    grid-template-columns: 1fr auto;
  }

  .suche-submit span {
    display: none;
  }

  .suche-submit {
    min-width: 56px;
    padding: 0;
  }

  .nf-s .nf-s-row {
    grid-template-columns: 1fr auto;
  }
}
