/* Universal books / audio / comics / manga search */
:root {
  --search-accent: #e5c95c;
  --search-accent-2: #fff1a6;
  --search-accent-rgb: 229, 201, 92;
  --search-panel: rgba(9, 7, 13, 0.88);
  --search-panel-strong: rgba(12, 9, 17, 0.97);
  --search-text: #f5f1ea;
  --search-muted: #a8a0ad;
  --search-line: rgba(229, 201, 92, 0.18);
}

body.theme-forge {
  --search-accent: #ffad45;
  --search-accent-2: #ffd38a;
  --search-accent-rgb: 255, 143, 46;
  --search-panel: rgba(11, 7, 4, 0.9);
  --search-panel-strong: rgba(14, 8, 4, 0.97);
  --search-line: rgba(255, 143, 46, 0.2);
}

[hidden] {
  display: none !important;
}

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

.site-header {
  gap: 18px;
}

.search-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.search-nav a {
  color: var(--search-muted);
  text-decoration: none;
  font-family: "Manrope", sans-serif;
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.search-nav a:hover,
.search-nav a:focus-visible {
  color: var(--search-accent-2);
  border-color: var(--search-line);
  background: rgba(var(--search-accent-rgb), 0.07);
}

.search-home,
.search-results-shell {
  width: min(1180px, 100%);
  margin-inline: auto;
  position: relative;
  z-index: 2;
}

.search-home {
  margin-top: clamp(22px, 4vw, 58px);
  margin-bottom: 54px;
  padding: clamp(44px, 7vw, 88px) clamp(18px, 5vw, 68px) clamp(34px, 5vw, 56px);
  text-align: center;
  border: 1px solid var(--search-line);
  border-radius: clamp(24px, 4vw, 42px);
  background:
    radial-gradient(circle at 50% -10%, rgba(var(--search-accent-rgb), 0.16), transparent 44%),
    linear-gradient(180deg, rgba(255,255,255,0.025), transparent 28%),
    var(--search-panel);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    0 34px 120px rgba(0,0,0,0.45),
    0 0 80px rgba(var(--search-accent-rgb), 0.035);
  overflow: hidden;
  isolation: isolate;
}

.search-home::before {
  content: "";
  position: absolute;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(var(--search-accent-rgb), 0.08);
  border-radius: 50%;
  left: 50%;
  top: -310px;
  transform: translateX(-50%);
  box-shadow:
    0 0 0 60px rgba(var(--search-accent-rgb), 0.018),
    0 0 0 130px rgba(var(--search-accent-rgb), 0.012);
  pointer-events: none;
  z-index: -1;
}

body.theme-forge .search-home::after {
  content: "";
  position: absolute;
  inset: auto 12% 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 143, 46, 0.5), transparent);
  box-shadow: 0 -12px 54px rgba(255, 92, 0, 0.24);
}

.search-home-kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  color: var(--search-accent);
  font-family: "Manrope", sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.search-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--search-accent);
  box-shadow: 0 0 16px rgba(var(--search-accent-rgb), 0.88);
  animation: searchPulse 2.4s ease-in-out infinite;
}

.search-kicker-sep {
  color: rgba(var(--search-accent-rgb), 0.38);
}

.search-home h1 {
  margin: 0;
  color: var(--search-text);
  font-family: "Cinzel", serif;
  font-size: clamp(2.75rem, 7.1vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-wrap: balance;
  text-transform: uppercase;
}

.search-home h1 em {
  display: block;
  margin-top: 10px;
  color: var(--search-accent);
  font-family: "Newsreader", serif;
  font-size: 0.78em;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: none;
  text-shadow: 0 0 34px rgba(var(--search-accent-rgb), 0.19);
}

.search-home-copy {
  max-width: 760px;
  margin: 26px auto 32px;
  color: var(--search-muted);
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.75;
  text-wrap: balance;
}

.universal-search-form {
  width: min(940px, 100%);
  margin: 0 auto;
}

.universal-search-box {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 72px;
  padding: 7px;
  border: 1px solid rgba(var(--search-accent-rgb), 0.45);
  border-radius: 22px;
  background: rgba(4, 4, 7, 0.9);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.045),
    0 16px 48px rgba(0,0,0,0.42),
    0 0 0 5px rgba(var(--search-accent-rgb), 0.035);
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.universal-search-box:focus-within {
  border-color: var(--search-accent);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 20px 58px rgba(0,0,0,0.5),
    0 0 0 5px rgba(var(--search-accent-rgb), 0.09),
    0 0 42px rgba(var(--search-accent-rgb), 0.08);
  transform: translateY(-1px);
}

.search-box-mark {
  color: var(--search-accent);
  font-family: "Newsreader", serif;
  font-size: 2.1rem;
  line-height: 1;
}

.universal-search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 14px 0 4px;
  color: #fff;
  background: transparent;
  font-family: "Manrope", sans-serif;
  font-size: clamp(1rem, 2vw, 1.16rem);
  font-weight: 550;
  caret-color: var(--search-accent);
}

.universal-search-box input::placeholder {
  color: #77717e;
}

.universal-search-box input[aria-invalid="true"]::placeholder {
  color: #e88a8a;
}

.universal-search-submit {
  min-width: 132px;
  height: 56px;
  border: 0;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #171006;
  background: linear-gradient(135deg, var(--search-accent-2), var(--search-accent));
  box-shadow: 0 10px 30px rgba(var(--search-accent-rgb), 0.19);
  font-family: "Manrope", sans-serif;
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.045em;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease, box-shadow 160ms ease;
}

.universal-search-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 40px rgba(var(--search-accent-rgb), 0.27);
}

.universal-search-submit:disabled {
  opacity: 0.75;
  cursor: wait;
}

.universal-search-submit.loading span:first-child {
  font-size: 0;
}

.universal-search-submit.loading span:first-child::after {
  content: "Searching";
  font-size: 0.9rem;
}

.search-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.search-filter-row + .search-filter-row {
  margin-top: 10px;
}

.search-filter-label {
  width: 48px;
  color: #736c78;
  font-family: "Manrope", sans-serif;
  font-size: 0.67rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-align: right;
  text-transform: uppercase;
  margin-right: 5px;
}

.search-chip,
.search-scope {
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  color: #a39ca8;
  background: rgba(255,255,255,0.025);
  font-family: "Manrope", sans-serif;
  font-size: 0.77rem;
  font-weight: 720;
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.search-chip:hover,
.search-scope:hover {
  color: #eee9f0;
  border-color: rgba(var(--search-accent-rgb), 0.28);
  transform: translateY(-1px);
}

.search-chip.active,
.search-scope.active {
  color: var(--search-accent-2);
  border-color: rgba(var(--search-accent-rgb), 0.5);
  background: rgba(var(--search-accent-rgb), 0.105);
  box-shadow: inset 0 0 18px rgba(var(--search-accent-rgb), 0.045);
}

.search-honesty-note {
  max-width: 760px;
  margin: 18px auto 0;
  color: #7f7885;
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  line-height: 1.55;
}

.search-examples {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 23px;
  color: #756e7a;
  font-family: "Manrope", sans-serif;
  font-size: 0.73rem;
}

.search-examples > span {
  margin-right: 2px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-examples button {
  border: 0;
  border-bottom: 1px dashed rgba(var(--search-accent-rgb), 0.34);
  padding: 3px 2px;
  color: #a9a1ae;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.search-examples button:hover {
  color: var(--search-accent-2);
  border-bottom-style: solid;
}

.builder-jump {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 28px;
  color: var(--search-accent);
  font-family: "Manrope", sans-serif;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
}

.builder-jump:hover {
  color: var(--search-accent-2);
}

.search-results-shell {
  scroll-margin-top: 26px;
  margin-bottom: 72px;
  padding: clamp(20px, 3.5vw, 38px);
  border: 1px solid var(--search-line);
  border-radius: 28px;
  background: var(--search-panel-strong);
  box-shadow: 0 28px 88px rgba(0,0,0,0.4);
}

.search-results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}

.search-results-eyebrow {
  margin: 0 0 7px;
  color: var(--search-accent);
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.search-results-header h2 {
  margin: 0;
  color: #f5f1eb;
  font-family: "Newsreader", serif;
  font-size: clamp(1.7rem, 4vw, 2.65rem);
  font-weight: 500;
  line-height: 1.08;
}

.search-results-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.search-results-actions label {
  color: #817987;
  font-family: "Manrope", sans-serif;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.search-results-actions select {
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.11);
  border-radius: 11px;
  padding: 0 34px 0 12px;
  color: #d9d3dc;
  background: #0e0b12;
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
}

.search-source-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 1px;
  padding: 14px 0 4px;
}

.search-source-summary span {
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 999px;
  padding: 5px 9px;
  color: #827b88;
  background: rgba(255,255,255,0.018);
  font-family: "Manrope", sans-serif;
  font-size: 0.67rem;
}

.search-source-summary strong {
  color: #bdb6c0;
  font-weight: 750;
}

.search-results-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.universal-result {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  background:
    linear-gradient(100deg, rgba(var(--search-accent-rgb), 0.035), transparent 25%),
    rgba(255,255,255,0.018);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.universal-result:hover {
  border-color: rgba(var(--search-accent-rgb), 0.25);
  background:
    linear-gradient(100deg, rgba(var(--search-accent-rgb), 0.07), transparent 34%),
    rgba(255,255,255,0.025);
  transform: translateY(-1px);
}

.search-result-kind {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(var(--search-accent-rgb), 0.24);
  border-radius: 13px;
  color: var(--search-accent-2);
  background: rgba(var(--search-accent-rgb), 0.07);
  font-family: "Cinzel", serif;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: inset 0 0 18px rgba(var(--search-accent-rgb), 0.05);
}

.search-result-kind.kind-audiobook {
  color: #b8d7ff;
  border-color: rgba(128, 177, 240, 0.25);
  background: rgba(80, 130, 205, 0.08);
}

.search-result-kind.kind-comic,
.search-result-kind.kind-manga {
  color: #ffb7d3;
  border-color: rgba(232, 113, 162, 0.25);
  background: rgba(218, 80, 137, 0.08);
}

.search-result-main {
  min-width: 0;
}

.search-result-badges,
.search-result-meta,
.search-result-quality {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.search-result-badges {
  margin-bottom: 7px;
}

.search-result-badges span,
.search-result-quality span {
  border-radius: 999px;
  padding: 4px 7px;
  font-family: "Manrope", sans-serif;
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.result-kind-label {
  color: #9e96a2;
  background: rgba(255,255,255,0.05);
}

.result-access {
  border: 1px solid rgba(255,255,255,0.08);
}

.access-sample {
  color: #f4cf78;
  border-color: rgba(244, 207, 120, 0.26);
  background: rgba(244, 207, 120, 0.07);
}

.access-catalog {
  color: #a9a2ad;
  background: rgba(255,255,255,0.035);
}

.access-open {
  color: #8eddb4;
  border-color: rgba(94, 210, 148, 0.24);
  background: rgba(70, 190, 127, 0.07);
}

.access-torrent {
  color: #d4bdff;
  border-color: rgba(161, 120, 238, 0.24);
  background: rgba(137, 89, 225, 0.08);
}

.search-result-main h3 {
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  color: #f3eff4;
  font-family: "Manrope", sans-serif;
  font-size: clamp(0.96rem, 1.8vw, 1.08rem);
  font-weight: 750;
  line-height: 1.38;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-author {
  margin: 4px 0 0;
  color: #aaa2ae;
  font-family: "Newsreader", serif;
  font-size: 0.94rem;
  font-style: italic;
}

.search-result-meta {
  margin-top: 8px;
  color: #77707c;
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
}

.search-result-meta strong {
  color: var(--search-accent);
  font-weight: 750;
}

.search-result-meta span::before {
  content: "•";
  margin-right: 7px;
  color: #49434e;
}

.search-result-quality {
  margin-top: 7px;
}

.search-result-quality span {
  padding: 0;
  color: #706a75;
  font-size: 0.58rem;
}

.search-result-quality span + span::before {
  content: "•";
  margin-right: 7px;
}

.search-result-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  min-width: 118px;
}

.search-result-action {
  min-height: 36px;
  border: 1px solid rgba(var(--search-accent-rgb), 0.25);
  border-radius: 10px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--search-accent-2);
  background: rgba(var(--search-accent-rgb), 0.055);
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.search-result-action:hover {
  border-color: rgba(var(--search-accent-rgb), 0.5);
  background: rgba(var(--search-accent-rgb), 0.1);
}

.search-result-action.primary {
  color: #161006;
  border-color: transparent;
  background: linear-gradient(135deg, var(--search-accent-2), var(--search-accent));
}

.search-result-no-link {
  color: #68616d;
  font-family: "Manrope", sans-serif;
  font-size: 0.67rem;
  text-align: center;
}

.search-result-skeleton {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 18px;
  animation: resultFadeIn 380ms ease both;
  animation-delay: var(--delay);
}

.search-result-skeleton > span {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  background: rgba(255,255,255,0.055);
}

.search-result-skeleton div {
  display: grid;
  gap: 8px;
}

.search-result-skeleton i {
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.035), rgba(var(--search-accent-rgb),0.1), rgba(255,255,255,0.035));
  background-size: 220% 100%;
  animation: searchShimmer 1.3s linear infinite;
}

.search-result-skeleton i:nth-child(1) { width: 62%; }
.search-result-skeleton i:nth-child(2) { width: 38%; }
.search-result-skeleton i:nth-child(3) { width: 78%; }

.search-empty {
  padding: 70px 24px;
  text-align: center;
  border: 1px dashed rgba(255,255,255,0.09);
  border-radius: 20px;
}

.search-empty > span {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--search-line);
  border-radius: 50%;
  color: var(--search-accent);
  font-family: "Newsreader", serif;
  font-size: 1.8rem;
}

.search-empty h3 {
  margin: 0;
  color: #eee9ef;
  font-family: "Newsreader", serif;
  font-size: 1.55rem;
}

.search-empty p {
  margin: 9px auto 0;
  max-width: 520px;
  color: #857e8a;
  font-family: "Manrope", sans-serif;
  font-size: 0.84rem;
  line-height: 1.55;
}

.search-empty button {
  margin-top: 18px;
  border: 1px solid var(--search-line);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--search-accent-2);
  background: rgba(var(--search-accent-rgb), 0.07);
  font-family: "Manrope", sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.builder-hero {
  scroll-margin-top: 24px;
  margin-top: clamp(84px, 12vw, 150px) !important;
  padding-top: clamp(40px, 7vw, 74px);
  border-top: 1px solid rgba(var(--search-accent-rgb), 0.12);
}

@keyframes searchPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1.08); }
}

@keyframes searchShimmer {
  to { background-position: -220% 0; }
}

@keyframes resultFadeIn {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-proof-grid {
  width: min(820px, 100%);
  margin: 28px auto 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  overflow: hidden;
  background: rgba(255,255,255,0.018);
}

.search-proof-grid div {
  min-width: 0;
  padding: 15px 10px;
}

.search-proof-grid div + div {
  border-left: 1px solid rgba(255,255,255,0.07);
}

.search-proof-grid strong,
.search-proof-grid span {
  display: block;
  font-family: "Manrope", sans-serif;
}

.search-proof-grid strong {
  color: var(--search-accent-2);
  font-size: 1.05rem;
  font-weight: 900;
}

.search-proof-grid span {
  margin-top: 3px;
  color: #817a86;
  font-size: 0.61rem;
  font-weight: 750;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.search-results-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.search-share-button,
.search-clear-button,
.search-load-more {
  min-height: 40px;
  border: 1px solid rgba(var(--search-accent-rgb), 0.24);
  border-radius: 11px;
  padding: 8px 13px;
  color: var(--search-accent-2);
  background: rgba(var(--search-accent-rgb), 0.06);
  font-family: "Manrope", sans-serif;
  font-size: 0.69rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.search-share-button:hover,
.search-clear-button:hover,
.search-load-more:hover {
  border-color: rgba(var(--search-accent-rgb), 0.48);
  background: rgba(var(--search-accent-rgb), 0.11);
  transform: translateY(-1px);
}

.search-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 0 8px;
}

.search-metric {
  min-width: 0;
  padding: 13px 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: rgba(255,255,255,0.018);
}

.search-metric strong,
.search-metric span {
  display: block;
  font-family: "Manrope", sans-serif;
}

.search-metric strong {
  color: var(--search-accent-2);
  font-size: 1.25rem;
  font-weight: 900;
}

.search-metric span {
  margin-top: 3px;
  overflow: hidden;
  color: #77707c;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.055em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.search-powerbar {
  display: grid;
  grid-template-columns: minmax(180px, 1.6fr) repeat(3, minmax(120px, 0.8fr)) auto;
  align-items: end;
  gap: 8px;
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(0,0,0,0.17);
}

.search-control {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.search-control > span {
  padding-left: 2px;
  color: #716a76;
  font-family: "Manrope", sans-serif;
  font-size: 0.57rem;
  font-weight: 850;
  letter-spacing: 0.075em;
  text-transform: uppercase;
}

.search-control input,
.search-control select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,0.095);
  border-radius: 10px;
  padding: 0 11px;
  outline: 0;
  color: #dcd6df;
  background: #0d0a10;
  font-family: "Manrope", sans-serif;
  font-size: 0.72rem;
}

.search-control input:focus,
.search-control select:focus {
  border-color: rgba(var(--search-accent-rgb), 0.52);
  box-shadow: 0 0 0 3px rgba(var(--search-accent-rgb), 0.07);
}

.search-clear-button {
  white-space: nowrap;
}

.search-source-summary button {
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 999px;
  padding: 6px 10px;
  color: #827b88;
  background: rgba(255,255,255,0.018);
  font-family: "Manrope", sans-serif;
  font-size: 0.67rem;
  cursor: pointer;
}

.search-source-summary button:hover,
.search-source-summary button.active {
  color: var(--search-accent-2);
  border-color: rgba(var(--search-accent-rgb), 0.34);
  background: rgba(var(--search-accent-rgb), 0.075);
}

.search-source-summary button strong {
  color: inherit;
}

.result-match {
  border: 1px solid rgba(255,255,255,0.08);
}

.match-excellent {
  color: #92e4b8;
  border-color: rgba(105, 222, 158, 0.25);
  background: rgba(70, 190, 127, 0.08);
}

.match-strong {
  color: #a8d6ff;
  border-color: rgba(115, 179, 236, 0.24);
  background: rgba(80, 142, 205, 0.08);
}

.match-good {
  color: #e4c88a;
  border-color: rgba(228, 200, 138, 0.2);
  background: rgba(228, 200, 138, 0.06);
}

.match-basic {
  color: #a39ca8;
  background: rgba(255,255,255,0.035);
}

.search-result-action.secondary {
  color: #bcb5c0;
  border-color: rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.028);
}

.search-result-action.magnet-open::before {
  content: "↗";
  margin-right: 6px;
  font-size: 0.8rem;
}

.search-load-more {
  width: min(360px, 100%);
  margin: 18px auto 0;
  display: block;
}

@media (max-width: 860px) {
  .search-nav {
    gap: 1px;
  }

  .search-nav a {
    padding-inline: 8px;
    font-size: 0.66rem;
  }

  .search-result-main h3 {
    white-space: normal;
  }

  .universal-result {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .search-result-actions {
    grid-column: 2;
    flex-direction: row;
    min-width: 0;
  }

  .search-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .search-powerbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-control-wide {
    grid-column: 1 / -1;
  }
}

@media (max-width: 660px) {
  .site-header {
    flex-wrap: wrap;
  }

  .site-header .logo-sub {
    display: none;
  }

  .search-nav {
    width: 100%;
    order: 3;
    justify-content: center;
    margin: 0;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.055);
  }

  .search-nav a {
    font-size: 0.62rem;
  }

  .search-home {
    margin-top: 14px;
    padding: 40px 14px 34px;
    border-radius: 24px;
  }

  .search-home-kicker {
    font-size: 0.62rem;
    line-height: 1.6;
  }

  .search-kicker-sep {
    display: none;
  }

  .search-home h1 {
    font-size: clamp(2.3rem, 14vw, 3.7rem);
  }

  .search-home-copy {
    margin-top: 20px;
    font-size: 0.9rem;
  }

  .universal-search-box {
    grid-template-columns: 35px minmax(0, 1fr);
    padding: 8px;
    border-radius: 18px;
  }

  .universal-search-submit {
    grid-column: 1 / -1;
    width: 100%;
    height: 48px;
    margin-top: 6px;
    border-radius: 13px;
  }

  .search-filter-row {
    justify-content: flex-start;
  }

  .search-filter-label {
    width: 100%;
    margin: 4px 0 0;
    text-align: left;
  }

  .search-chip,
  .search-scope {
    flex: 1 1 auto;
    padding-inline: 10px;
  }

  .search-proof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-proof-grid div:nth-child(3) {
    border-left: 0;
  }

  .search-proof-grid div:nth-child(n+3) {
    border-top: 1px solid rgba(255,255,255,0.07);
  }

  .search-results-shell {
    padding: 16px;
    border-radius: 20px;
  }

  .search-results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .search-results-actions {
    width: 100%;
  }

  .search-results-actions select {
    flex: 1;
  }

  .search-share-button {
    flex: 1 1 100%;
  }

  .search-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-metric:last-child {
    grid-column: 1 / -1;
  }

  .search-powerbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .search-control-wide {
    grid-column: auto;
  }

  .search-clear-button {
    width: 100%;
  }

  .universal-result {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .search-result-kind {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .search-result-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .search-result-action:only-child {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .search-live-dot,
  .search-result-skeleton,
  .search-result-skeleton i {
    animation: none !important;
  }

  .universal-search-box,
  .universal-result,
  .universal-search-submit,
  .search-chip,
  .search-scope {
    transition: none !important;
  }
}
