/*
 * SPDX-FileCopyrightText: 2026 PrivacySafe Foundation, Inc.
 * SPDX-License-Identifier: AGPL-3.0-or-later
 *
 * This file is free software: you can redistribute it and/or modify it under
 * the terms of the GNU Affero General Public License, version 3 or later — see
 * the LICENSE file or https://www.gnu.org/licenses/agpl-3.0.html
 *
 * SearXNG is free software developed by the SearXNG project and
 * licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
 * Source: https://github.com/searxng/searxng
 */

/* Shared base: theme, colors, type, components. Applies at all widths; the
   media blocks further down only override what differs. */

/* PrivacySafe Search — SearXNG overrides */

/* Font */
@font-face {
  font-family: "Stack Sans Text";
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url("/static/themes/simple/fonts/stack-sans-text-latin-vf.woff2") format("woff2");
}

/* Theme tokens */
:root,
:root.theme-simple,
:root.theme-dark,
:root.theme-macchiato,
html,
html.theme-simple,
html.theme-dark,
html.theme-macchiato {
  --color-base-font: #FAF9F5 !important;
  --color-base-font-rgb: 250, 249, 245 !important;
  --color-base-background: #20201D !important;
  --color-base-background-mobile: #20201D !important;

  --color-url-font: #FB521F !important;
  --color-url-visited-font: #FB521F !important;

  --color-header-background: #20201D !important;
  --color-header-border: transparent !important;

  --color-footer-background: #20201D !important;
  --color-footer-border: #4A4A45 !important;

  --color-sidebar-background: #20201D !important;
  --color-sidebar-border: transparent !important;

  --color-search-background: #30302E !important;
  --color-search-font: #FAF9F5 !important;
  --color-search-background-hover: #383734 !important;
  --color-search-border: transparent !important;

  --color-btn-background: #FB521F !important;
  --color-btn-font: #FAF9F5 !important;

  --color-result-background: #20201D !important;
  --color-result-border: transparent !important;
  --color-result-url-font: #C2C0B6 !important;

  --color-result-link-font: #FB521F !important;
  --color-result-link-font-highlight: #FB521F !important;
  --color-result-link-visited-font: #FB521F !important;

  --color-result-description-highlight-font: #FAF9F5 !important;
  --color-result-publishdate-font: #C2C0B6 !important;
  --color-result-engines-font: #C2C0B6 !important;

  --color-result-search-url-border: transparent !important;

  --color-result-detail-background: #20201D !important;
  --color-result-detail-hr: transparent !important;

  --color-result-vim-selected: #30302E !important;
  --color-result-vim-arrow: #45DA64 !important;

  --color-categories-item-selected-font: #45DA64 !important;
  --color-categories-item-border-selected: #45DA64 !important;

  --color-toolkit-checkbox-onoff-on-mark-background: #45DA64 !important;
  --color-toolkit-checkbox-input-border: #45DA64 !important;
}

/* Base surfaces */
html,
body,
body.index_endpoint,
#main_index,
.index,
footer {
  background: #20201D !important;
  color: #FAF9F5 !important;
  font-family: "Stack Sans Text", "Inter", "Liberation Sans", "Helvetica Neue", Helvetica, Arial, "DejaVu Sans", Roboto, "Segoe UI", system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji" !important;
}

/* Links */
a,
a:link,
a:visited,
.result h3 a,
.result a,
.result_header a,
.result__title a,
.result .url a,
.result_url a,
footer a {
  color: #FB521F !important;
}

a:hover,
a:focus,
.result h3 a:hover,
.result h3 a:focus,
.result a:hover,
.result a:focus,
.result_header a:hover,
.result_header a:focus,
.result__title a:hover,
.result__title a:focus,
.result .url a:hover,
.result .url a:focus,
.result_url a:hover,
.result_url a:focus {
  color: #45DA64 !important;
}

/* Result media toggles ("show/hide video", "show media") are orange buttons:
   keep their label + icon white in every state instead of going green on hover. */
.result a.btn-collapse,
.result a.btn-collapse:link,
.result a.btn-collapse:visited,
.result a.btn-collapse:hover,
.result a.btn-collapse:focus,
.result a.btn-collapse:active,
.result a.media-loader,
.result a.media-loader:hover,
.result a.media-loader:focus,
.result a.media-loader:active,
a.btn-collapse,
a.btn-collapse:hover,
a.btn-collapse:focus,
.altlink a:hover,
.altlink a:focus {
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  stroke: #FAF9F5 !important;
}

/* PrivacySafe Social hashtag infobox: brand favicon to the left of the (now
   linked) title; the title text links to the privacysafe.social tag page. */
aside.infobox[aria-label*="on PrivacySafe Social"] .title {
  display: flex !important;
  align-items: center !important;
  gap: 0.45rem !important;
}

aside.infobox[aria-label*="on PrivacySafe Social"] .title::before {
  content: "" !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 1.15em !important;
  height: 1.15em !important;
  background-image: url("/static/themes/simple/img/privacysafe-social.svg") !important;
  background-size: contain !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}

aside.infobox[aria-label*="on PrivacySafe Social"] .title a,
aside.infobox[aria-label*="on PrivacySafe Social"] .title a bdi {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  text-decoration: none !important;
}

aside.infobox[aria-label*="on PrivacySafe Social"] .title a:hover,
aside.infobox[aria-label*="on PrivacySafe Social"] .title a:focus {
  text-decoration: underline !important;
}

/* Top nav */
#links_on_top,
nav#links_on_top,
body #links_on_top {
  position: static !important;
  inset: auto !important;
  z-index: auto !important;
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.95rem !important;
  width: 100% !important;
  max-width: 100vw !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 1.25rem auto 1.5rem auto !important;
  padding: 0 1rem !important;
  box-sizing: border-box !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  text-align: center !important;
  overflow: visible !important;
}

#links_on_top a,
nav#links_on_top a,
body #links_on_top a {
  position: static !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.28rem !important;
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 1.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  font-family: inherit !important;
  font-size: 0.98rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  overflow: visible !important;
}

#links_on_top a span,
nav#links_on_top a span,
body #links_on_top a span {
  display: inline !important;
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  clip: auto !important;
  clip-path: none !important;
  overflow: visible !important;
  white-space: nowrap !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  font: inherit !important;
  border-radius: 0 !important;
}

#links_on_top a svg,
nav#links_on_top a svg,
body #links_on_top a svg {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 1rem !important;
  min-width: 1rem !important;
  max-width: 1rem !important;
  height: 1rem !important;
  min-height: 1rem !important;
  max-height: 1rem !important;
  margin: 0 !important;
  padding: 0 !important;
  color: inherit !important;
  stroke: currentColor !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Make Default: replace inline SVG with favicon image. */
#links_on_top .link_on_top_make_default svg,
nav#links_on_top .link_on_top_make_default svg,
body #links_on_top .link_on_top_make_default svg {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

#links_on_top .link_on_top_make_default::before,
nav#links_on_top .link_on_top_make_default::before,
body #links_on_top .link_on_top_make_default::before {
  content: "" !important;
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 1.55rem !important;
  min-width: 1.55rem !important;
  max-width: 1.55rem !important;
  height: 1.55rem !important;
  min-height: 1.55rem !important;
  max-height: 1.55rem !important;
  margin: -0.08rem 0.06rem 0 0 !important;
  padding: 0 !important;
  background-image: url("/static/themes/simple/img/favicon.ico?v=privacysafe-v31") !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: contain !important;
  vertical-align: -0.32em !important;
}

#links_on_top a:hover,
#links_on_top a:focus,
#links_on_top a:hover *,
#links_on_top a:focus *,
nav#links_on_top a:hover,
nav#links_on_top a:focus,
body #links_on_top a:hover,
body #links_on_top a:focus,
body #links_on_top a:hover *,
body #links_on_top a:focus * {
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  stroke: #45DA64 !important;
  outline: none !important;
}

#links_on_top a:hover svg path,
#links_on_top a:focus svg path,
nav#links_on_top a:hover svg path,
nav#links_on_top a:focus svg path,
body #links_on_top a:hover svg path,
body #links_on_top a:focus svg path {
  color: #45DA64 !important;
  stroke: #45DA64 !important;
}

/* Disabled categories */
body.preferences_endpoint input#category_map,
body.preferences_endpoint input[name="category_map"],
body.preferences_endpoint input[value="map"],
body.preferences_endpoint label[for="category_map"],
body.preferences_endpoint .category_map,
body.preferences_endpoint [class*="category_map"],
body.preferences_endpoint tr:has(input[name="category_map"]),
body.preferences_endpoint li:has(input[name="category_map"]),
body.preferences_endpoint fieldset:has(input[name="category_map"]),
#preferences input#category_map,
#preferences input[name="category_map"],
#preferences label[for="category_map"],
#preferences .category_map,
#preferences tr:has(input[name="category_map"]),
#preferences fieldset:has(input[name="category_map"]),
body.preferences_endpoint input#category_science,
body.preferences_endpoint input[name="category_science"],
body.preferences_endpoint input[value="science"],
body.preferences_endpoint label[for="category_science"],
body.preferences_endpoint .category_science,
body.preferences_endpoint [class*="category_science"],
body.preferences_endpoint tr:has(input[name="category_science"]),
body.preferences_endpoint li:has(input[name="category_science"]),
body.preferences_endpoint fieldset:has(input[name="category_science"]),
#preferences input#category_science,
#preferences input[name="category_science"],
#preferences label[for="category_science"],
#preferences .category_science,
#preferences tr:has(input[name="category_science"]),
#preferences fieldset:has(input[name="category_science"]),
body.preferences_endpoint input#category_files,
body.preferences_endpoint input[name="category_files"],
body.preferences_endpoint input[value="files"],
body.preferences_endpoint label[for="category_files"],
body.preferences_endpoint .category_files,
body.preferences_endpoint [class*="category_files"],
body.preferences_endpoint tr:has(input[name="category_files"]),
body.preferences_endpoint li:has(input[name="category_files"]),
body.preferences_endpoint fieldset:has(input[name="category_files"]),
#preferences input#category_files,
#preferences input[name="category_files"],
#preferences label[for="category_files"],
#preferences .category_files,
#preferences tr:has(input[name="category_files"]),
#preferences fieldset:has(input[name="category_files"]),
body.results_endpoint #categories input[name="category_map"],
body.results_endpoint #categories label[for="category_map"],
body.results_endpoint #categories [class*="category_map"],
body.search_endpoint:not(.index_endpoint) #categories input[name="category_map"],
body.search_endpoint:not(.index_endpoint) #categories label[for="category_map"],
body.search_endpoint:not(.index_endpoint) #categories [class*="category_map"],
body.results_endpoint #categories input[name="category_science"],
body.results_endpoint #categories label[for="category_science"],
body.results_endpoint #categories [class*="category_science"],
body.search_endpoint:not(.index_endpoint) #categories input[name="category_science"],
body.search_endpoint:not(.index_endpoint) #categories label[for="category_science"],
body.search_endpoint:not(.index_endpoint) #categories [class*="category_science"],
body.results_endpoint #categories input[name="category_files"],
body.results_endpoint #categories label[for="category_files"],
body.results_endpoint #categories [class*="category_files"],
body.search_endpoint:not(.index_endpoint) #categories input[name="category_files"],
body.search_endpoint:not(.index_endpoint) #categories label[for="category_files"],
body.search_endpoint:not(.index_endpoint) #categories [class*="category_files"] {
  display: none !important;
}

/* Social category re-enabled: only the PrivacySafe Social engines populate it,
   relabelled to "Social" by the category-label JS, all other social engines disabled. */

/* Category nav */
#categories,
.categories,
.search_categories {
  position: relative !important;
  z-index: 10 !important;
  background: transparent !important;
  padding-top: 3px !important;
  padding-bottom: 3px !important;
  box-sizing: border-box !important;
}

#categories a,
#categories a:link,
#categories a:visited,
#categories label,
#categories button,
#categories .category,
.categories a,
.categories a:link,
.categories a:visited,
.categories label,
.categories button,
.categories .category,
.search_categories a,
.search_categories a:link,
.search_categories a:visited,
.search_categories label,
.search_categories button,
.search_categories .category {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.35rem !important;
  color: #FAF9F5 !important;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  position: relative !important;
  z-index: 11 !important;
  pointer-events: auto !important;
  min-height: 2rem !important;
  height: 2rem !important;
  margin-top: 2px !important;
  margin-bottom: 2px !important;
  padding-top: 2px !important;
  padding-bottom: 4px !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

#categories svg,
#categories svg path,
.categories svg,
.categories svg path,
.search_categories svg,
.search_categories svg path {
  color: currentColor !important;
  stroke: currentColor !important;
}

#categories .category svg,
.categories .category svg,
.search_categories .category svg {
  display: inline-block !important;
  flex: 0 0 auto !important;
  width: 1.15rem !important;
  min-width: 1.15rem !important;
  max-width: 1.15rem !important;
  height: 1.15rem !important;
  min-height: 1.15rem !important;
  max-height: 1.15rem !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#categories a:hover,
#categories a:focus,
#categories label:hover,
#categories label:focus,
#categories button:hover,
#categories button:focus,
#categories .category.selected,
#categories .category.active,
#categories .category.current,
.categories a:hover,
.categories a:focus,
.categories label:hover,
.categories label:focus,
.categories button:hover,
.categories button:focus,
.search_categories a:hover,
.search_categories a:focus,
.search_categories label:hover,
.search_categories label:focus,
.search_categories button:hover,
.search_categories button:focus,
#categories .category input:checked + label,
#categories .category input:checked ~ label,
.categories .category input:checked + label,
.categories .category input:checked ~ label,
.search_categories .category input:checked + label,
.search_categories .category input:checked ~ label {
  color: #45DA64 !important;
  border-bottom-color: #45DA64 !important;
}

#categories a:hover svg,
#categories a:focus svg,
#categories a:hover svg path,
#categories a:focus svg path,
.categories a:hover svg,
.categories a:hover svg path,
.search_categories a:hover svg,
.search_categories a:hover svg path {
  color: #45DA64 !important;
  stroke: #45DA64 !important;
}

/* Results-page category text is owned by JS; suppress pseudo leftovers. */
#categories .category_name::before,
#categories .category_name::after,
.search_categories .category_name::before,
.search_categories .category_name::after {
  content: none !important;
  display: none !important;
}

#categories .category_name,
.search_categories .category_name {
  display: inline-block !important;
  width: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  opacity: 1 !important;
  visibility: visible !important;
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  font-family: inherit !important;
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
}

/* Preferences only: short IT / Social labels via ::after. */
body.preferences_endpoint #categories label[for="checkbox_it"] .category_name,
#main_preferences #categories label[for="checkbox_it"] .category_name,
#preferences #categories label[for="checkbox_it"] .category_name,
body.preferences_endpoint #categories label[for="checkbox_social_media"] .category_name,
body.preferences_endpoint #categories label[for="checkbox_socialmedia"] .category_name,
#main_preferences #categories label[for="checkbox_social_media"] .category_name,
#main_preferences #categories label[for="checkbox_socialmedia"] .category_name,
#preferences #categories label[for="checkbox_social_media"] .category_name,
#preferences #categories label[for="checkbox_socialmedia"] .category_name {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  -webkit-text-fill-color: transparent !important;
  margin-left: 0.25rem !important;
}

body.preferences_endpoint #categories label[for="checkbox_it"] .category_name::after,
#main_preferences #categories label[for="checkbox_it"] .category_name::after,
#preferences #categories label[for="checkbox_it"] .category_name::after {
  content: "Tech" !important;
  display: inline-block !important;
  font-family: inherit !important;
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  white-space: nowrap !important;
}

body.preferences_endpoint #categories label[for="checkbox_social_media"] .category_name::after,
body.preferences_endpoint #categories label[for="checkbox_socialmedia"] .category_name::after,
#main_preferences #categories label[for="checkbox_social_media"] .category_name::after,
#main_preferences #categories label[for="checkbox_socialmedia"] .category_name::after,
#preferences #categories label[for="checkbox_social_media"] .category_name::after,
#preferences #categories label[for="checkbox_socialmedia"] .category_name::after {
  content: "Social" !important;
  display: inline-block !important;
  font-family: inherit !important;
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: normal !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  white-space: nowrap !important;
}

.privacysafe-category-visible-label {
  display: none !important;
  visibility: hidden !important;
}

/* Infobox title */
.infobox h2.title,
.infobox .title h2,
aside.infobox h2.title {
  display: block !important;
  width: fit-content !important;
  max-width: calc(100% - 2rem) !important;
  min-width: 8rem !important;
  margin: 0.45rem auto 1rem auto !important;
  padding: 0.35rem 1rem !important;
  text-align: center !important;
  line-height: 1.2 !important;
  box-sizing: border-box !important;
}

.infobox h2.title bdi,
.infobox .title h2 bdi,
aside.infobox h2.title bdi {
  display: block !important;
  width: 100% !important;
  text-align: center !important;
}

.infobox h2.title + img,
aside.infobox h2.title + img {
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* About page */
.privacysafe-about-intro,
.privacysafe-help {
  margin: 0 0 2rem 0 !important;
  padding: 0 0 1rem 0 !important;
  color: #FAF9F5 !important;
}

.privacysafe-about-intro h1,
.privacysafe-help h1 {
  color: #FAF9F5 !important;
  font-weight: 700 !important;
}

.privacysafe-about-intro p,
.privacysafe-help p {
  color: #FAF9F5 !important;
  font-size: 1.05rem !important;
  line-height: 1.55 !important;
}

.privacysafe-about-intro a,
.privacysafe-help a {
  color: #FB521F !important;
}

.privacysafe-about-intro a:hover,
.privacysafe-about-intro a:focus,
.privacysafe-help a:hover,
.privacysafe-help a:focus {
  color: #45DA64 !important;
}

/* Info-page tabs (About Us / Search syntax). */
.tabs a,
.tabs a:link,
.tabs a:visited,
.info-page .tabs a,
.info-page .tabs a:link,
.info-page .tabs a:visited,
.info-page nav a,
.info-page nav a:link,
.info-page nav a:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.4rem !important;
  line-height: 1.2 !important;
  padding: 0.45rem 0.75rem 0.55rem 0.75rem !important;
  vertical-align: middle !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: #FB521F !important;
}

.tabs a:hover,
.tabs a:focus,
.tabs a.active,
.tabs a[aria-current="page"],
.info-page .tabs a:hover,
.info-page .tabs a:focus,
.info-page .tabs a.active,
.info-page .tabs a[aria-current="page"],
.info-page nav a:hover,
.info-page nav a:focus,
.info-page nav a.active {
  color: #45DA64 !important;
  border-bottom: 2px solid #45DA64 !important;
}

/* Highlights: title matches keep the link colour; snippet/infobox matches use
   cream so none read as the old bluish-gray. */
.result a .highlight,
.result a span.highlight,
.result h3 a .highlight,
.result h3 a span.highlight,
.result_header a .highlight,
.result__title a .highlight {
  color: inherit !important;
  background: transparent !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

.result .content .highlight,
.result-content .highlight,
.result .content mark,
.infobox .highlight,
.answer .highlight,
.highlight,
mark {
  color: #FAF9F5 !important;
  background: transparent !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

::selection {
  background: rgba(69, 218, 100, 0.30) !important;
  color: #FAF9F5 !important;
}

/* Dividers */
hr,
#urls::before,
#urls::after,
#urls > .result::before,
#urls > .result::after,
#results::before,
#results::after,
.results::before,
.results::after,
.result_separator,
.result-separator,
.search_filters::before,
.search_filters::after,
#categories::before,
#categories::after,
.categories::before,
.categories::after,
#pagination::before,
#pagination::after {
  display: none !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

header,
#search_header,
#categories,
.categories,
#search_filters,
.search_filters,
#results,
.results,
#urls,
#pagination,
.result,
.result-default,
.result-images,
.result-videos,
.result-torrent,
.result-map,
.result-code {
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
}

.search_box,
.dialog,
.modal,
.result-detail,
.result_detail,
.preferences,
.preferences_container,
#preferences,
.infobox,
.answer {
  border-color: #4A4A45 !important;
}

.result {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

/* Dotted separators between organic results in the main column (column 1 on
   desktop, the only column on mobile) instead of a large empty gap. Scoped to
   text results only: image results use a grid and must not get row rules. */
#urls > article.result:not(.result-images),
body.results_endpoint #urls > article.result:not(.result-images),
#main_results #urls > article.result:not(.result-images) {
  border-bottom: 1px dotted var(--ps-border, #4A4A45) !important;
  padding-bottom: 1.15rem !important;
  margin-bottom: 1.15rem !important;
}
#urls > article.result:not(.result-images):last-of-type,
body.results_endpoint #urls > article.result:not(.result-images):last-of-type {
  border-bottom: 0 !important;
  margin-bottom: 0.5rem !important;
}

/* Search box & inputs */
.search_box {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  background: #30302E !important;
  color: #FAF9F5 !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  overflow: visible !important;
  box-shadow: none !important;
}

#search,
#search_header,
#search_view,
.search_box {
  border-top: 0 !important;
  border-bottom: 0 !important;
}

#q,
input#q {
  color: #FAF9F5 !important;
  font-size: 1.1rem !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  min-height: 2.7rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  border-radius: 999px !important;
}

#q::placeholder {
  color: #C2C0B6 !important;
  opacity: 1 !important;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"] {
  border-radius: 999px !important;
  min-height: 2.7rem !important;
  font-size: 1.05rem !important;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
}

textarea {
  border-radius: 1.35rem !important;
  padding: 0.85rem 1rem !important;
}

button,
input[type="submit"],
input[type="button"],
input[type="reset"],
.btn,
.button,
/* The search button must never echo the active category ("Social", "Tech", ...)
   after the magnifying glass - hide any category label injected into it. */
#send_search .category_name,
#send_search [data-privacysafe-category-label],
.search_box #send_search .category_name {
  display: none !important;
}

a.btn,
form button,
form input[type="submit"],
#send_search,
#clear_search,
.search_box button,
.search_box input[type="submit"] {
  border-radius: 999px !important;
}

button:hover,
button:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
input[type="button"]:hover,
input[type="button"]:focus,
.btn:hover,
.btn:focus,
.button:hover,
.button:focus {
  color: #45DA64 !important;
  stroke: #45DA64 !important;
  border-color: #45DA64 !important;
}

/* Dropdowns: softly rounded, bluish surface. */
select,
select:focus,
.preferences select,
.preferences_container select,
#preferences select,
#main_preferences select,
body.preferences_endpoint select,
form[action*="preferences"] select,
.search_filters select,
#search_filters select,
#main_results select {
  border-radius: 0.65rem !important;
  background-color: #30302E !important;
  color: #FAF9F5 !important;
  min-height: 2.35rem !important;
  height: auto !important;
  padding-top: 0.35rem !important;
  padding-bottom: 0.35rem !important;
  padding-left: 0.85rem !important;
  padding-right: 2.2rem !important;
  text-indent: 0.15rem !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

select option {
  padding-left: 0.85rem !important;
}

/* Homepage stack */
body.index_endpoint #main_index .index,
body.index_endpoint .index {
  display: block !important;
  max-width: none !important;
  margin: 3.75rem auto 0 auto !important;
  padding: 0 !important;
  text-align: center !important;
  transform: none !important;
  overflow: visible !important;
}

body.index_endpoint #main_index .index > .title,
body.index_endpoint .index > .title,
body.index_endpoint #main_index .index > .title a,
body.index_endpoint .index > .title a,
body.search_endpoint #main_index .index > .title,
body.search_endpoint #main_index .index > .title a {
  width: min(583px, 73vw) !important;
  max-width: min(583px, 73vw) !important;
  margin: 0 auto 1.05rem auto !important;
  padding: 0 !important;
  text-align: center !important;
  line-height: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.index_endpoint #main_index .index > .title::before,
body.index_endpoint #main_index .index > .title::after,
body.search_endpoint #main_index .index > .title::before,
body.search_endpoint #main_index .index > .title::after {
  content: none !important;
  display: none !important;
  background: none !important;
}

body.index_endpoint #main_index .index > .title h1,
body.search_endpoint #main_index .index > .title h1 {
  display: none !important;
  visibility: hidden !important;
  background: none !important;
}

body.index_endpoint #main_index .index > .title img,
body.index_endpoint .index > .title img,
body.search_endpoint #main_index .index > .title img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 135px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  background: transparent !important;
  background-image: none !important;
}

body.index_endpoint #main_index .index > .title img:not(:first-of-type),
body.search_endpoint #main_index .index > .title img:not(:first-of-type) {
  display: none !important;
}

.privacysafe-search-subtitle {
  width: min(720px, calc(100vw - 32px)) !important;
  max-width: min(720px, calc(100vw - 32px)) !important;
  margin: 0 auto 1.7rem auto !important;
  padding: 0 0.75rem !important;
  color: #FAF9F5 !important;
  font-size: 1.35rem !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.privacysafe-search-subtitle a {
  color: #FB521F !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.privacysafe-search-subtitle a:hover,
.privacysafe-search-subtitle a:focus {
  color: #45DA64 !important;
  text-decoration: none !important;
}

.privacysafe-search-subtitle a[href*="privacysafe.foundation"] {
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
}

.privacysafe-search-subtitle a[href*="privacysafe.foundation"]:hover,
.privacysafe-search-subtitle a[href*="privacysafe.foundation"]:focus {
  color: #62F57E !important;
  -webkit-text-fill-color: #62F57E !important;
  filter: brightness(1.15) !important;
}

body.index_endpoint #search,
body.index_endpoint .search_box,
body.index_endpoint form#search,
body.index_endpoint #main_index #search,
#main_index #search,
#main_index .search_box {
  max-width: 720px !important;
}

body.index_endpoint form#search,
body.index_endpoint #search,
body.index_endpoint #main_index form#search,
body.index_endpoint #main_index #search {
  width: min(708px, calc(100vw - 2rem)) !important;
  max-width: calc(100vw - 2rem) !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

body.index_endpoint form#search .search_box,
body.index_endpoint #search .search_box,
body.index_endpoint #main_index .search_box {
  height: 2.55rem !important;
  min-height: 2.55rem !important;
  max-height: 2.55rem !important;
  border-radius: 999px !important;
}

/* Image results */
.result-images img,
.image_result img,
.images .result img,
#urls article.result-images img,
#urls .result-images img {
  background-color: rgba(238, 238, 238, 0.40) !important;
  background-image:
    linear-gradient(45deg, rgba(76, 76, 76, 0.40) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(76, 76, 76, 0.40) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(76, 76, 76, 0.40) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(76, 76, 76, 0.40) 75%) !important;
  background-size: 20px 20px !important;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0 !important;
}

.result-images img[src*="img_load_error.svg"],
.image_result img[src*="img_load_error.svg"],
img[src*="img_load_error.svg"] {
  object-fit: contain !important;
}

body.results_endpoint #urls article.result-images > a > img.image_thumbnail,
body.results_endpoint #urls .result-images > a > img.image_thumbnail,
body.results_endpoint aside.infobox > img:not([src*="empty_favicon.svg"]):not([src*="favicon"]),
body.results_endpoint aside.infobox dd img:not([src*="empty_favicon.svg"]):not([src*="favicon"]) {
  border-radius: 0.75rem !important;
  background-clip: padding-box !important;
}

.result img,
.result .favicon,
.result .image_thumbnail,
.result-images img,
.infobox img,
aside.infobox img,
#urls .result img {
  margin: max(4px, 0.25rem) !important;
  box-sizing: border-box !important;
}

/* ----- Image search result tiles ------------------------------------------
   The theme lays the image grid out as justified rows: it fixes the article
   height and sizes the thumbnail as a PERCENTAGE of that height, and paints
   .title/.source as absolute overlays on the image. That is what made the
   captions overlap on desktop and disappear on mobile. Rather than fight that
   layout piecemeal (which breaks the geometry), we replace it outright with a
   deterministic CSS grid: uniform tiles, the thumbnail sized by aspect-ratio,
   and the title (cream) + source (orange) in normal flow BELOW it. auto-fill +
   minmax reflows the columns as the window resizes, so nothing can ever
   overlap. Resolution stays as a small badge in the thumbnail's corner on
   desktop (hidden on mobile, below). High-specificity + !important so these
   beat the theme's own image rules. */
body.results_endpoint #urls:has(article.result-images),
#main_results #urls:has(article.result-images) {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
  gap: 16px !important;
  align-items: start !important;
  width: 100% !important;
  max-width: 100% !important;
}
/* Keep pagination, counts and notices full-width instead of trapped in a cell. */
body.results_endpoint #urls:has(article.result-images) > *:not(article.result-images),
#main_results #urls:has(article.result-images) > *:not(article.result-images) {
  grid-column: 1 / -1 !important;
}
#urls article.result-images,
body.results_endpoint #urls article.result-images {
  display: block !important;
  width: auto !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  border: 0 !important;
}
#urls article.result-images > a,
body.results_endpoint #urls article.result-images > a {
  display: flex !important;
  flex-direction: column !important;
  position: relative !important;
  width: 100% !important;
  height: auto !important;
  overflow: visible !important;
  text-decoration: none !important;
}
#urls article.result-images > a > img.image_thumbnail,
body.results_endpoint #urls article.result-images > a > img.image_thumbnail {
  order: 0 !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1 !important;
  object-fit: cover !important;
  margin: 0 !important;
  border-radius: 0.6rem !important;
}
#urls article.result-images > a > span.title,
body.results_endpoint #urls article.result-images > a > span.title {
  order: 2 !important;
  position: static !important;
  display: block !important;
  float: none !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #FAF9F5 !important;
  font-size: 0.9rem !important;
  line-height: 1.3 !important;
  margin: 0.4rem 0 0.02rem 0 !important;
  padding: 0 0.1rem !important;
  background: transparent !important;
}
#urls article.result-images > a > span.source,
body.results_endpoint #urls article.result-images > a > span.source {
  order: 3 !important;
  position: static !important;
  display: block !important;
  float: none !important;
  transform: none !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  color: #FB521F !important;
  font-size: 0.8rem !important;
  line-height: 1.3 !important;
  margin: 0 0 0.05rem 0 !important;
  padding: 0 0.1rem !important;
  background: transparent !important;
}
#urls article.result-images > a > span.image_resolution,
body.results_endpoint #urls article.result-images > a > span.image_resolution {
  order: 1 !important;
  position: absolute !important;
  top: 0 !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  width: auto !important;
  max-width: calc(100% - 0.6rem) !important;
  margin: 0.35rem !important;
  padding: 0.08rem 0.4rem !important;
  background: rgba(26, 25, 22, 0.82) !important;
  color: #FAF9F5 !important;
  font-size: 0.72rem !important;
  line-height: 1.4 !important;
  border-radius: 0.4rem !important;
  white-space: nowrap !important;
  pointer-events: none !important;
}

/* Results logo */
#search_logo,
#search_logo img,
#search_logo svg,
#main_results #search_logo,
#main_results #search_logo img,
#main_results #search_logo svg,
body.results_endpoint #search_logo,
body.results_endpoint #search_logo img,
body.results_endpoint #search_logo svg,
body.search_endpoint #main_results #search_logo,
body.search_endpoint #main_results #search_logo img,
body.search_endpoint #main_results #search_logo svg {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Autocomplete */
.autocomplete,
.autocomplete.open,
#autocomplete,
#autocomplete.open,
#search .autocomplete,
#search .autocomplete.open,
form#search .autocomplete,
form#search .autocomplete.open,
.search_box .autocomplete,
.search_box .autocomplete.open {
  position: absolute !important;
  top: calc(100% + 0.35rem) !important;
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
  z-index: 9999 !important;
}

.autocomplete ul,
#autocomplete ul,
#search .autocomplete ul,
form#search .autocomplete ul,
.search_box .autocomplete ul {
  display: block !important;
  position: relative !important;
  z-index: 10000 !important;
  width: 100% !important;
  max-height: min(16rem, 38vh) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  margin: 0 !important;
  padding: 0.35rem 0 !important;
  background: #30302E !important;
  border: 1px solid #4A4A45 !important;
  border-radius: 1rem !important;
  box-shadow: 0 18px 48px rgb(0 0 0 / 35%) !important;
}

.autocomplete li,
.autocomplete li *,
.autocomplete a,
.autocomplete span {
  background: transparent !important;
}

.autocomplete li:hover,
.autocomplete li:focus-within,
.autocomplete a:hover,
.autocomplete a:focus {
  background: #383734 !important;
  color: #45DA64 !important;
}

.autocomplete li,
.autocomplete a {
  padding: 0.6rem 1rem !important;
  font-size: 1rem !important;
  line-height: 1.3 !important;
}

/* Hide the category row while suggestions are open so a tab can't peek past it. */
form#search:has(.autocomplete li) #categories,
#search:has(.autocomplete li) #categories,
#search_view:has(.autocomplete li) #categories,
#search_header:has(.autocomplete li) #categories {
  visibility: hidden !important;
}

.autocomplete:empty,
.autocomplete ul:empty,
.autocomplete:not(:has(li)),
#autocomplete:empty,
#autocomplete ul:empty,
#autocomplete:not(:has(li)),
.search_box .autocomplete:empty,
.search_box .autocomplete ul:empty,
.search_box .autocomplete:not(:has(li)),
#search .autocomplete:empty,
#search .autocomplete ul:empty,
#search .autocomplete:not(:has(li)) {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
}

/* Make sure the field can anchor the absolute panel and float over filters. */
#search,
form#search,
#search_header,
#search_view {
  position: relative !important;
  overflow: visible !important;
}

#main_results #search_header,
body.results_endpoint #search_header,
body.search_endpoint #main_results #search_header {
  z-index: 50 !important;
}

#main_results .search_filters,
body.results_endpoint .search_filters,
body.search_endpoint #main_results .search_filters,
#main_results #categories,
body.results_endpoint #categories,
body.search_endpoint #main_results #categories {
  position: relative !important;
  z-index: 1 !important;
}

/* Copy / share controls */
.privacysafe-search-url-actions {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  margin-left: 0.5rem !important;
  vertical-align: middle !important;
}

.privacysafe-search-url-copy,
.privacysafe-search-url-share,
button.privacysafe-search-url-copy,
button.privacysafe-search-url-share {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: 4.25rem !important;
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.42rem 1rem !important;
  margin: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: #FB521F !important;
  background-color: #FB521F !important;
  background-image: none !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

.privacysafe-search-url-copy:hover,
.privacysafe-search-url-copy:focus,
.privacysafe-search-url-share:hover,
.privacysafe-search-url-share:focus,
button.privacysafe-search-url-copy:hover,
button.privacysafe-search-url-copy:focus,
button.privacysafe-search-url-share:hover,
button.privacysafe-search-url-share:focus {
  border-color: #45DA64 !important;
  background: #45DA64 !important;
  background-color: #45DA64 !important;
  color: #20201D !important;
  -webkit-text-fill-color: #20201D !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

#search_url button:not(.privacysafe-search-url-copy):not(.privacysafe-search-url-share),
#search_url input[type="button"],
#search_url input[type="submit"],
.privacysafe-search-url-compact-root button:not(.privacysafe-search-url-copy):not(.privacysafe-search-url-share),
.privacysafe-search-url-compact-root input[type="button"],
.privacysafe-search-url-compact-root input[type="submit"] {
  display: none !important;
  visibility: hidden !important;
}

/* Preferences buttons */
input[type="submit"][value="Save"],
#preferences input[type="submit"][value="Save"],
.preferences input[type="submit"][value="Save"],
.preferences_container input[type="submit"][value="Save"],
body.preferences_endpoint input[type="submit"][value="Save"],
form[action*="preferences"] input[type="submit"][value="Save"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: 4.25rem !important;
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.42rem 1rem !important;
  margin: 0.25rem !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: #FB521F !important;
  background-color: #FB521F !important;
  background-image: none !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

input[type="submit"][value="Save"]:hover,
input[type="submit"][value="Save"]:focus,
#preferences input[type="submit"][value="Save"]:hover,
#preferences input[type="submit"][value="Save"]:focus,
.preferences input[type="submit"][value="Save"]:hover,
.preferences input[type="submit"][value="Save"]:focus,
.preferences_container input[type="submit"][value="Save"]:hover,
.preferences_container input[type="submit"][value="Save"]:focus,
body.preferences_endpoint input[type="submit"][value="Save"]:hover,
body.preferences_endpoint input[type="submit"][value="Save"]:focus,
form[action*="preferences"] input[type="submit"][value="Save"]:hover,
form[action*="preferences"] input[type="submit"][value="Save"]:focus {
  border-color: #45DA64 !important;
  background: transparent !important;
  background-color: transparent !important;
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.right.preferences_back > a[href="/clear_cookies"],
.right.preferences_back > a[href="/"],
.preferences_back > a[href="/clear_cookies"],
.preferences_back > a[href="/"],
#preferences .preferences_back > a[href="/clear_cookies"],
#preferences .preferences_back > a[href="/"],
.preferences .preferences_back > a[href="/clear_cookies"],
.preferences .preferences_back > a[href="/"],
.preferences_container .preferences_back > a[href="/clear_cookies"],
.preferences_container .preferences_back > a[href="/"],
body.preferences_endpoint .preferences_back > a[href="/clear_cookies"],
body.preferences_endpoint .preferences_back > a[href="/"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  min-width: 4.25rem !important;
  min-height: 2.25rem !important;
  height: 2.25rem !important;
  padding: 0.42rem 1rem !important;
  margin: 0.25rem !important;
  border: 1px solid #4A4A45 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  font-family: inherit !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: nowrap !important;
  overflow: visible !important;
  opacity: 1 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}

.right.preferences_back > a[href="/clear_cookies"]:hover,
.right.preferences_back > a[href="/clear_cookies"]:focus,
.right.preferences_back > a[href="/"]:hover,
.right.preferences_back > a[href="/"]:focus,
.preferences_back > a[href="/clear_cookies"]:hover,
.preferences_back > a[href="/clear_cookies"]:focus,
.preferences_back > a[href="/"]:hover,
.preferences_back > a[href="/"]:focus,
#preferences .preferences_back > a[href="/clear_cookies"]:hover,
#preferences .preferences_back > a[href="/"]:hover,
body.preferences_endpoint .preferences_back > a[href="/clear_cookies"]:hover,
body.preferences_endpoint .preferences_back > a[href="/"]:hover {
  border-color: #45DA64 !important;
  background: transparent !important;
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.right.preferences_back,
#preferences .right.preferences_back,
.preferences .right.preferences_back,
.preferences_container .right.preferences_back,
body.preferences_endpoint .right.preferences_back {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  float: none !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  vertical-align: middle !important;
}

.right.preferences_back a *,
.preferences_back a *,
input[type="submit"][value="Save"] * {
  color: inherit !important;
  -webkit-text-fill-color: inherit !important;
  fill: currentColor !important;
  stroke: currentColor !important;
  opacity: 1 !important;
}

/* Hide theme-choice controls in Preferences. */
body.preferences_endpoint select[name="theme"],
body.preferences_endpoint select[name="simple_style"],
body.preferences_endpoint input[name="theme"],
body.preferences_endpoint input[name="simple_style"],
body.preferences_endpoint label[for*="theme" i],
body.preferences_endpoint label[for*="simple_style" i],
body.preferences_endpoint tr:has(select[name="theme"]),
body.preferences_endpoint tr:has(select[name="simple_style"]),
body.preferences_endpoint fieldset:has(select[name="theme"]),
body.preferences_endpoint fieldset:has(select[name="simple_style"]),
#main_preferences select[name="theme"],
#main_preferences select[name="simple_style"],
#main_preferences label[for*="theme" i],
#main_preferences label[for*="simple_style" i],
#main_preferences tr:has(select[name="theme"]),
#main_preferences tr:has(select[name="simple_style"]),
#main_preferences fieldset:has(select[name="theme"]),
#main_preferences fieldset:has(select[name="simple_style"]) {
  display: none !important;
}

/* Pagination */
#pagination a,
#pagination button,
#pagination .button,
.pagination a,
.pagination button,
.pagination .button,
a[href*="pageno="] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.2rem !important;
  padding: 0.48rem 1rem !important;
  border: 1px solid transparent !important;
  border-radius: 999px !important;
  background: #FB521F !important;
  color: #FAF9F5 !important;
  -webkit-text-fill-color: #FAF9F5 !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

#pagination a:hover,
#pagination a:focus,
#pagination button:hover,
#pagination button:focus,
.pagination a:hover,
.pagination a:focus,
a[href*="pageno="]:hover,
a[href*="pageno="]:focus {
  background: transparent !important;
  border-color: #45DA64 !important;
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  box-shadow: none !important;
}

/* Back to top */
#back_to_top,
.back_to_top,
.back-to-top,
button.back_to_top,
a.back_to_top,
a[href="#top"] {
  border: 1px solid #45DA64 !important;
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  background: rgba(69, 218, 100, 0.08) !important;
  box-shadow: none !important;
}

#back_to_top *,
.back_to_top *,
.back-to-top *,
a[href="#top"] * {
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  stroke: #45DA64 !important;
  fill: #45DA64 !important;
}

/* Results layout */
#main_results,
body.results_endpoint #main_results,
body.search_endpoint #main_results {
  max-width: none !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box !important;
}

#main_results #search_header,
body.results_endpoint #search_header,
body.search_endpoint #main_results #search_header {
  display: block !important;
  width: min(640px, calc(100vw - 2rem)) !important;
  max-width: calc(100vw - 2rem) !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
}

#main_results #search_view,
body.results_endpoint #search_view,
body.search_endpoint #main_results #search_view {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

#main_results .search_box,
body.results_endpoint .search_box,
body.search_endpoint #main_results .search_box {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  height: 2.65rem !important;
  min-height: 2.65rem !important;
  max-height: 2.65rem !important;
  margin: 0 auto !important;
  border-radius: 999px !important;
}

#main_results #categories,
body.results_endpoint #categories,
body.search_endpoint #main_results #categories,
#main_results .search_categories,
body.results_endpoint .search_categories,
body.search_endpoint #main_results .search_categories {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.85rem 1.35rem !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 1rem auto 0 auto !important;
  padding: 0 0 0.78rem 0 !important;
  box-sizing: border-box !important;
  border-bottom: 1px solid #4A4A45 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

#main_results .search_filters,
body.results_endpoint .search_filters,
body.search_endpoint #main_results .search_filters {
  display: grid !important;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) minmax(0, 1.1fr) !important;
  gap: 0.65rem !important;
  align-items: center !important;
  width: min(640px, calc(100vw - 2rem)) !important;
  max-width: calc(100vw - 2rem) !important;
  margin: 0.9rem auto 0 auto !important;
  padding: 0 !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  overflow: visible !important;
}

#main_results .search_filters select,
body.results_endpoint .search_filters select,
body.search_endpoint #main_results .search_filters select {
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Single divider above the result list; the category bar already draws one. */
#urls,
#results {
  border-top: 0 !important;
  padding-top: 1rem !important;
}

/* Info / answer panels stay outlined. */
#main_results .answer,
#main_results .infobox,
#main_results aside.infobox,
#main_results article.infobox,
body.results_endpoint .answer,
body.results_endpoint .infobox,
body.search_endpoint .answer,
body.search_endpoint .infobox {
  border: 1px solid #4A4A45 !important;
  border-radius: 0.65rem !important;
  background: transparent !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  margin: 1rem 0 !important;
  padding: 1rem !important;
}

/* Wolfram-style info boxes only on default Web searches. */
body.privacysafe-not-web-category aside.infobox,
body.privacysafe-not-web-category .infobox {
  display: none !important;
  visibility: hidden !important;
}

/* Search-icon buttons: no gray circle. */
#clear_search,
#send_search,
.search_box #clear_search,
.search_box #send_search,
.search_box button[type="reset"],
.search_box button[type="submit"] {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  filter: none !important;
}

#clear_search svg path,
#send_search svg path,
.search_box button svg path {
  background: transparent !important;
  box-shadow: none !important;
}

/* Footer */
footer {
  position: static !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0 auto !important;
  padding: 1.45rem 1rem 1.15rem 1rem !important;
  box-sizing: border-box !important;
  border-top: 1px solid #4A4A45 !important;
  background: #1A1916 !important;
  color: #FAF9F5 !important;
  text-align: center !important;
  font-size: 0.98rem !important;
  line-height: 1.4 !important;
}

footer p {
  margin: 0 auto !important;
  padding: 0 !important;
  max-width: calc(100vw - 2rem) !important;
  color: #FAF9F5 !important;
}

footer a {
  color: #C6613F !important;
  -webkit-text-fill-color: #C6613F !important;
  text-decoration: none !important;
}

footer a:hover,
footer a:focus {
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  text-decoration: none !important;
}

/* Homepage add-search & donation */
.privacysafe-add-search {
  display: none !important;
}

body.index_endpoint .privacysafe-add-search {
  display: block !important;
  width: min(720px, calc(100vw - 32px)) !important;
  max-width: min(720px, calc(100vw - 32px)) !important;
  margin: 0 auto 0 auto !important;
  padding: 0.65rem 0.75rem 0.45rem 0.75rem !important;
  color: #FAF9F5 !important;
  font-size: clamp(1rem, 2vw, 1.15rem) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

body.index_endpoint .privacysafe-add-search p {
  margin: 0 0 0.45rem 0 !important;
  padding: 0 !important;
  color: #FAF9F5 !important;
}

body.index_endpoint .privacysafe-add-search button {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 2.6rem !important;
  padding: 0.55rem 1.1rem !important;
  border: 1px solid #45DA64 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #FAF9F5 !important;
  font: inherit !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

body.index_endpoint .privacysafe-add-search button:hover,
body.index_endpoint .privacysafe-add-search button:focus {
  background: #45DA64 !important;
  color: #20201D !important;
  border-color: #45DA64 !important;
}

body.index_endpoint .privacysafe-add-search code {
  color: #FAF9F5 !important;
  background: #30302E !important;
  border-radius: 0.35rem !important;
  padding: 0.1rem 0.3rem !important;
}

body.index_endpoint .privacysafe-add-search-manual {
  font-size: 0.92rem !important;
  color: #C2C0B6 !important;
}

body:not(.index_endpoint) .privacysafe-add-search {
  display: none !important;
}

.privacysafe-home-donation {
  display: none !important;
}

body.index_endpoint .privacysafe-home-donation,
body.search_endpoint #main_index ~ .privacysafe-home-donation {
  display: block !important;
  width: min(720px, calc(100vw - 32px)) !important;
  max-width: min(720px, calc(100vw - 32px)) !important;
  margin: 0 auto 0 auto !important;
  padding: 0.65rem 0.75rem 1rem 0.75rem !important;
  color: #FAF9F5 !important;
  font-size: clamp(1rem, 2vw, 1.15rem) !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

body.index_endpoint .privacysafe-home-donation p,
body.search_endpoint #main_index ~ .privacysafe-home-donation p {
  margin: 0 !important;
  padding: 0 !important;
  color: #FAF9F5 !important;
}

.privacysafe-home-donation a,
.privacysafe-home-donation a[href*="psafe.ly/donate"] {
  color: #FB521F !important;
  -webkit-text-fill-color: #FB521F !important;
  text-decoration: none !important;
  font-weight: 700 !important;
}

.privacysafe-home-donation a:hover,
.privacysafe-home-donation a:focus,
.privacysafe-home-donation a[href*="psafe.ly/donate"]:hover,
.privacysafe-home-donation a[href*="psafe.ly/donate"]:focus {
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
  filter: none !important;
  text-decoration: none !important;
}

body:not(.index_endpoint):not(.search_endpoint) .privacysafe-home-donation {
  display: none !important;
}

/* Generic /search page that uses #main_index: keep results visible. */
body.results_endpoint #results,
body.search_endpoint #results,
#main_results #results,
body.results_endpoint .result,
body.search_endpoint .result,
#main_results .result {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Result list: legible typography and clear spacing. */
#urls .result,
#results .result {
  margin-bottom: 1.5rem !important;
}

.result h3,
.result h3 a,
.result__title,
.result__title a {
  font-size: 1.18rem !important;
  line-height: 1.35 !important;
  letter-spacing: -0.005em !important;
}

.result .content,
.result-content,
.result p.content {
  font-size: 0.97rem !important;
  line-height: 1.6 !important;
  color: #E8E6DD !important;
}

.result .url_wrapper,
.result .url_header,
.result a.url_header,
.result .url,
.result_url {
  font-size: 0.86rem !important;
  line-height: 1.35 !important;
  color: #ADABA1 !important;
}

.result .favicon,
.result img.favicon {
  margin-right: 0.5rem !important;
  vertical-align: middle !important;
}

/* Search field stays a pill in every state: focus, active, hover, and while the
   autocomplete is open (the upstream theme squares the bottom otherwise). The
   id-anchored selectors and explicit corner longhands outrank that. */
form#search .search_box,
form#search .search_box:hover,
form#search .search_box:focus,
form#search .search_box:focus-within,
form#search .search_box:has(.autocomplete li),
#search_header .search_box,
#search_header .search_box:focus-within,
body.index_endpoint form#search .search_box,
body.index_endpoint form#search .search_box:focus-within,
body.results_endpoint form#search .search_box,
body.results_endpoint form#search .search_box:focus-within,
.search_box,
.search_box:focus-within,
form#search #q,
form#search #q:focus,
form#search #q:active,
form#search #q:hover,
#q,
#q:focus,
#q:active {
  border-radius: 999px !important;
  border-top-left-radius: 999px !important;
  border-top-right-radius: 999px !important;
  border-bottom-left-radius: 999px !important;
  border-bottom-right-radius: 999px !important;
}
form#search #q:focus,
form#search #q:active {
  background: transparent !important;
}

/* Desktop / large screens. */
@media (min-width: 768px) {
  /* Search URL: keep it open and actually show the URL, not just the label. */
  #search_url details,
  #search_url details[open],
  #search_url details.privacysafe-search-url-details,
  #search_url details.sidebar-collapsible {
    display: block !important;
  }
  #search_url details > summary,
  #search_url .privacysafe-search-url-summary {
    cursor: pointer !important;
  }
  /* Collapsible on desktop: reveal the URL only while the details is open. */
  #search_url details[open] > .selectable_url,
  #search_url details[open] > :not(summary):not(#copy_url):not(button),
  #search_url details[open] .selectable_url,
  #search_url details[open] .selectable_url pre,
  #search_url details[open] pre {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    color: #C2C0B6 !important;
  }
  #search_url #copy_url,
  #search_url button#copy_url {
    display: none !important;
    visibility: hidden !important;
  }
  #search_url .privacysafe-search-url-actions {
    display: inline-flex !important;
  }

  /* Two columns only when an infobox is present to sit beside the results. */
  body.results_endpoint #results:has(#infoboxes),
  body.search_endpoint #results:has(#infoboxes),
  #main_results #results:has(#infoboxes) {
    display: grid !important;
    grid-template-columns: minmax(0, 640px) minmax(240px, 320px) !important;
    grid-template-areas:
      "main side"
      "pag  side" !important;
    justify-content: center !important;
    align-items: start !important;
    column-gap: 1.75rem !important;
    row-gap: 1rem !important;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  /* When an answer is also present, give it a full-width row on top. */
  body.results_endpoint #results:has(#infoboxes):has(#answers),
  body.search_endpoint #results:has(#infoboxes):has(#answers),
  #main_results #results:has(#infoboxes):has(#answers) {
    grid-template-areas:
      "ans  ans"
      "main side"
      "pag  side" !important;
  }
  body.results_endpoint #results:has(#infoboxes) #answers,
  #main_results #results:has(#infoboxes) #answers {
    grid-area: ans !important;
    min-width: 0 !important;
  }
  body.results_endpoint #results:has(#infoboxes) #urls,
  body.search_endpoint #results:has(#infoboxes) #urls,
  #main_results #results:has(#infoboxes) #urls {
    grid-area: main !important;
    min-width: 0 !important;
  }
  body.results_endpoint #results:has(#infoboxes) #sidebar,
  body.search_endpoint #results:has(#infoboxes) #sidebar,
  #main_results #results:has(#infoboxes) #sidebar {
    grid-area: side !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: static !important;
    box-sizing: border-box !important;
  }
  body.results_endpoint #results:has(#infoboxes) #pagination,
  body.search_endpoint #results:has(#infoboxes) #pagination,
  #main_results #results:has(#infoboxes) #pagination {
    grid-area: pag !important;
    min-width: 0 !important;
  }
  #main_results #sidebar img {
    max-width: 100% !important;
    height: auto !important;
  }
  #main_results #sidebar pre,
  #main_results #sidebar .selectable_url {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    max-width: 100% !important;
  }

  /* No infobox: one wide centred column. Search URL + Copy/Share on top, then
     any answer, then results and pagination, with response time at the bottom.
     #sidebar is dissolved so its children order independently. */
  body.results_endpoint #results:not(:has(#infoboxes)),
  body.search_endpoint #results:not(:has(#infoboxes)),
  #main_results #results:not(:has(#infoboxes)) {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: min(820px, calc(100vw - 2rem)) !important;
    margin: 0 auto !important;
  }
  #results:not(:has(#infoboxes)) #sidebar {
    display: contents !important;
  }
  #results:not(:has(#infoboxes)) #search_url {
    order: 1 !important;
    width: 100% !important;
    margin: 0 0 1.1rem 0 !important;
  }
  #results:not(:has(#infoboxes)) #answers {
    order: 2 !important;
    width: 100% !important;
  }
  #results:not(:has(#infoboxes)) #urls {
    order: 3 !important;
    width: 100% !important;
    min-width: 0 !important;
  }
  #results:not(:has(#infoboxes)) #pagination {
    order: 4 !important;
    width: 100% !important;
  }
  #results:not(:has(#infoboxes)) #engines_msg {
    order: 5 !important;
    width: 100% !important;
    margin: 1.25rem 0 0 0 !important;
  }
  #results:not(:has(#infoboxes)) #sidebar-end-collapsible {
    display: none !important;
  }
  #results:not(:has(#infoboxes)) #search_url pre,
  #results:not(:has(#infoboxes)) #search_url .selectable_url {
    white-space: pre-wrap !important;
    word-break: break-all !important;
    max-width: 100% !important;
  }
}

/* Mobile / small screens. */
@media (max-width: 767px) {
  html,
  body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    min-height: 100% !important;
  }

  /* Infoboxes relocated into the results column (see privacysafe-ui-fixes.js)
     must read as part of the results flow, not as bordered sidebar cards. Drop
     the rounded border / background box; use a dotted rule to match the result
     rhythm instead. */
  aside.infobox.privacysafe-relocated-infobox,
  .infobox.privacysafe-relocated-infobox {
    border: 0 !important;
    border-top: 1px dotted var(--ps-border, #4A4A45) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 1.15rem !important;
    margin: 1.15rem 0 !important;
  }

  /* Top nav: centered, inside viewport. */
  #links_on_top,
  nav#links_on_top,
  body #links_on_top {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0.85rem auto 0.85rem auto !important;
    padding: 0 0.65rem !important;
    gap: 0.65rem 0.85rem !important;
    overflow: hidden !important;
  }

  #links_on_top a,
  nav#links_on_top a,
  body #links_on_top a {
    font-size: 0.92rem !important;
    max-width: 45vw !important;
    overflow: hidden !important;
    text-overflow: clip !important;
  }

  #links_on_top .link_on_top_make_default::before,
  nav#links_on_top .link_on_top_make_default::before,
  body #links_on_top .link_on_top_make_default::before {
    width: 1.4rem !important;
    min-width: 1.4rem !important;
    max-width: 1.4rem !important;
    height: 1.4rem !important;
    min-height: 1.4rem !important;
    max-height: 1.4rem !important;
    margin-top: -0.05rem !important;
  }

  /* Homepage stack. */
  body.index_endpoint #main_index .index,
  body.index_endpoint .index {
    margin-top: 2.25rem !important;
    transform: none !important;
    padding-top: 0.25rem !important;
  }

  body.index_endpoint #main_index .index > .title,
  body.index_endpoint .index > .title {
    width: min(583px, 82vw) !important;
    max-width: min(583px, 82vw) !important;
    margin: 0.35rem auto 0.75rem auto !important;
  }

  body.index_endpoint #main_index .index > .title img,
  body.index_endpoint .index > .title img {
    max-height: 95px !important;
  }

  .privacysafe-search-subtitle {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    margin-top: 0.35rem !important;
    margin-bottom: 1rem !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
  }

  /* Homepage search field — fixed pill, no shift on focus. */
  body.index_endpoint form#search,
  body.index_endpoint #search,
  body.index_endpoint #main_index form#search,
  body.index_endpoint #main_index #search,
  body.index_endpoint form#search:focus-within,
  body.index_endpoint #search:focus-within {
    display: block !important;
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  body.index_endpoint .search_box,
  body.index_endpoint .search_box:focus-within,
  body.index_endpoint form#search .search_box,
  body.index_endpoint #main_index .search_box {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 2.55rem !important;
    min-height: 2.55rem !important;
    max-height: 2.55rem !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    border-radius: 999px !important;
    background: #30302E !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
  }

  body.index_endpoint #q,
  body.index_endpoint #q:focus {
    flex: 1 1 auto !important;
    width: auto !important;
    min-width: 0 !important;
    height: 2.55rem !important;
    min-height: 2.55rem !important;
    max-height: 2.55rem !important;
    line-height: 2.55rem !important;
    padding: 0 0.35rem 0 1rem !important;
    margin: 0 !important;
    overflow: hidden !important;
    background: transparent !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    transform: none !important;
  }

  body.index_endpoint #clear_search,
  body.index_endpoint #send_search {
    flex: 0 0 2.55rem !important;
    width: 2.55rem !important;
    min-width: 2.55rem !important;
    max-width: 2.55rem !important;
    height: 2.55rem !important;
    min-height: 2.55rem !important;
    max-height: 2.55rem !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* Results header: favicon hidden, full-width field. */
  #main_results #search_header,
  body.results_endpoint #search_header,
  body.search_endpoint #main_results #search_header {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    padding: 0.45rem 1rem 0 1rem !important;
    margin: 0 !important;
    overflow-x: hidden !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #main_results #search_view,
  body.results_endpoint #search_view,
  body.search_endpoint #main_results #search_view {
    display: block !important;
    width: calc(100vw - 2rem) !important;
    max-width: calc(100vw - 2rem) !important;
    min-width: 0 !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  /* Results search box — fixed 3-column grid so buttons never clip. */
  body.results_endpoint .search_box,
  body.search_endpoint:not(.index_endpoint) .search_box,
  #main_results .search_box {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 2.65rem 2.65rem !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 2.65rem !important;
    min-height: 2.65rem !important;
    max-height: 2.65rem !important;
    margin: 0 auto !important;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 999px !important;
    background: #30302E !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
  }

  body.results_endpoint #q,
  body.search_endpoint:not(.index_endpoint) #q,
  #main_results #q {
    grid-column: 1 !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 2.65rem !important;
    min-height: 2.65rem !important;
    max-height: 2.65rem !important;
    padding-left: 0.95rem !important;
    padding-right: 0.25rem !important;
    box-sizing: border-box !important;
  }

  body.results_endpoint #clear_search,
  body.search_endpoint:not(.index_endpoint) #clear_search,
  #main_results #clear_search {
    grid-column: 2 !important;
  }

  body.results_endpoint #send_search,
  body.search_endpoint:not(.index_endpoint) #send_search,
  #main_results #send_search {
    grid-column: 3 !important;
  }

  body.results_endpoint #clear_search,
  body.results_endpoint #send_search,
  body.search_endpoint:not(.index_endpoint) #clear_search,
  body.search_endpoint:not(.index_endpoint) #send_search,
  #main_results #clear_search,
  #main_results #send_search {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: static !important;
    width: 2.65rem !important;
    min-width: 2.65rem !important;
    max-width: 2.65rem !important;
    height: 2.65rem !important;
    min-height: 2.65rem !important;
    max-height: 2.65rem !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  /* Categories scroll start-aligned. */
  #main_results #categories,
  body.results_endpoint #categories,
  body.search_endpoint #main_results #categories,
  #main_results .search_categories,
  body.results_endpoint .search_categories,
  body.search_endpoint #main_results .search_categories {
    justify-content: flex-start !important;
    gap: 0.75rem 1.1rem !important;
    padding-bottom: 0.7rem !important;
    overflow-x: hidden !important;
  }

  #categories .category_name,
  .search_categories .category_name,
  body.preferences_endpoint #categories label[for="checkbox_it"] .category_name::after,
  body.preferences_endpoint #categories label[for="checkbox_social_media"] .category_name::after {
    font-size: 0.92rem !important;
  }

  /* Filters: one row, three columns. */
  #main_results .search_filters,
  body.results_endpoint .search_filters,
  body.search_endpoint #main_results .search_filters {
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.85fr) minmax(0, 1.05fr) !important;
    gap: 0.45rem !important;
    width: calc(100vw - 1rem) !important;
    max-width: calc(100vw - 1rem) !important;
    margin-left: 0.5rem !important;
    margin-right: 0.5rem !important;
    overflow: hidden !important;
  }

  #main_results .search_filters select,
  body.results_endpoint .search_filters select,
  body.search_endpoint #main_results .search_filters select {
    width: 100% !important;
    max-width: 100% !important;
    height: 2.25rem !important;
    min-height: 2.25rem !important;
    max-height: 2.25rem !important;
    padding-left: 0.55rem !important;
    padding-right: 1.45rem !important;
    font-size: 0.82rem !important;
    line-height: 1.1 !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  /* Autocomplete: only the list is gray; shell transparent; empty hidden. */
  .autocomplete,
  .autocomplete.open,
  #autocomplete,
  #autocomplete.open,
  .search_box .autocomplete,
  #search .autocomplete,
  form#search .autocomplete {
    position: absolute !important;
    top: calc(100% + 0.35rem) !important;
    left: 0 !important;
    right: 0 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: 90 !important;
  }

  .autocomplete ul,
  #autocomplete ul,
  .search_box .autocomplete ul,
  #search .autocomplete ul,
  form#search .autocomplete ul {
    width: 100% !important;
    max-height: min(12rem, 34vh) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #30302E !important;
    border: 1px solid #4A4A45 !important;
    border-radius: 1rem !important;
    box-shadow: 0 18px 48px rgb(0 0 0 / 35%) !important;
  }

  /* Footer: visible on homepage only. */
  body.index_endpoint footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  body:not(.index_endpoint) footer {
    display: none !important;
    visibility: hidden !important;
  }

  /* Hide response time / engine stats on mobile. */
  #engines_msg,
  #engines_msg *,
  #response_time,
  .response_time,
  .result_response_time,
  .engine_time,
  .engine-stats,
  [class*="response_time"],
  [class*="response-time"],
  [class*="engine_time"],
  [class*="engine-time"] {
    display: none !important;
    visibility: hidden !important;
  }

  /* Search URL: compact (label + Copy/Share only). */
  .privacysafe-search-url-label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.35rem !important;
    white-space: nowrap !important;
  }

  details.privacysafe-search-url-compact-root > :not(summary),
  .privacysafe-search-url-compact-root input,
  .privacysafe-search-url-compact-root textarea,
  .privacysafe-search-url-compact-root code,
  .privacysafe-search-url-compact-root pre,
  .privacysafe-search-url-compact-root .url,
  .privacysafe-search-url-compact-root select,
  #search_url details > :not(summary),
  #search_url code,
  #search_url pre,
  #search_url input,
  #search_url textarea,
  #search_url .url {
    display: none !important;
    visibility: hidden !important;
  }

  details.privacysafe-search-url-compact-root > summary {
    list-style: none !important;
    cursor: default !important;
  }

  details.privacysafe-search-url-compact-root > summary::-webkit-details-marker {
    display: none !important;
  }

  .privacysafe-search-url-copy,
  .privacysafe-search-url-share,
  button.privacysafe-search-url-copy,
  button.privacysafe-search-url-share {
    min-width: 3.75rem !important;
    min-height: 2.1rem !important;
    height: 2.1rem !important;
    padding: 0.34rem 0.8rem !important;
    font-size: 0.9rem !important;
  }

  /* Homepage donation/add-search compact widths. */
  body.index_endpoint .privacysafe-add-search,
  body.index_endpoint .privacysafe-home-donation {
    width: calc(100vw - 32px) !important;
    max-width: calc(100vw - 32px) !important;
    font-size: 0.98rem !important;
  }
}
/* Answer box: theme colours instead of the default bluish text. */
#answers .answer,
.answer,
#main_results .answer {
  color: #FAF9F5 !important;
  background: transparent !important;
  border: 1px solid #4A4A45 !important;
  border-radius: 0.65rem !important;
  line-height: 1.62 !important;
  padding: 1rem !important;
}
#answers .answer span,
#answers .answer bdi,
#answers .answer p,
.answer span,
.answer bdi,
.answer p {
  color: #FAF9F5 !important;
}
#answers .answer a,
.answer a,
.answer .answer-url {
  color: #FB521F !important;
  -webkit-text-fill-color: #FB521F !important;
}
#answers .answer a:hover,
#answers .answer a:focus,
.answer a:hover,
.answer a:focus,
.answer .answer-url:hover {
  color: #45DA64 !important;
  -webkit-text-fill-color: #45DA64 !important;
}

/* Engine response-time bars: brand green, not blue. */
.bar-chart-bar,
.engine-stats .bar-chart-bar,
#engines_msg .bar-chart-bar,
#engines_msg-table .bar-chart-bar,
[class*="bar-chart-bar"] {
  background: #45DA64 !important;
  background-color: #45DA64 !important;
  border-radius: 2px !important;
}
.bar-chart-value,
#engines_msg .bar-chart-value {
  color: #C2C0B6 !important;
}

/* Infobox text and thumbnails: relaxed wrap, more room beside the image. */
aside.infobox,
.infobox {
  line-height: 1.62 !important;
}
aside.infobox p,
.infobox p {
  line-height: 1.62 !important;
  margin-bottom: 0.8rem !important;
}
aside.infobox img,
.infobox img,
aside.infobox > img,
.infobox > img,
aside.infobox dd img {
  margin: 0.2rem 1.5rem 0.9rem 0 !important;
  border-radius: 0.6rem !important;
}

/* Mobile fixes. */
@media (max-width: 767px) {
  /* Image search (mobile): the base grid already stacks captions under each
     thumbnail; here we just pin it to two columns and drop the pixel-size
     badge. Nothing is absolutely positioned over the image, so resizing only
     changes column fit - captions can never overlap the thumbnail. */
  body.results_endpoint #urls:has(article.result-images),
  #main_results #urls:has(article.result-images) {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px 10px !important;
  }
  #urls article.result-images > a > span.image_resolution,
  body.results_endpoint #urls article.result-images > a > span.image_resolution {
    display: none !important;
  }

  /* Video results: stack the thumbnail above the text so it isn't squeezed. */
  .result-videos .thumbnail_link,
  article.result-videos .thumbnail_link {
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 0.6rem 0 !important;
  }
  .result-videos .thumbnail_link img.thumbnail,
  article.result-videos .thumbnail_link img.thumbnail {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    border-radius: 0.5rem !important;
  }
  .result-videos h3,
  .result-videos .content,
  .result-videos .result_author {
    width: 100% !important;
    clear: both !important;
  }

  /* Infobox hero/thumbnail on narrow screens. The theme floats this image but
     its centering rule sets margin-right:auto, which collapses to 0 on a float
     and crams the body text against the thumbnail. Restore a clear gutter (and
     a little room below), and cap the width so the text column stays readable.
     High specificity (h2.title + img.image) is needed to beat the centering
     rule's margin-right:auto. */
  aside.infobox > img,
  .infobox > img,
  aside.infobox h2.title + img,
  aside.infobox h2.title + img.image,
  aside.infobox > img.image,
  .infobox h2.title + img,
  .infobox > img.image {
    float: left !important;
    max-width: 42% !important;
    height: auto !important;
    margin-top: 0.25rem !important;
    margin-right: 1.15rem !important;
    margin-bottom: 0.95rem !important;
    margin-left: 0 !important;
  }

  /* Let the paragraph and attribute/url blocks reclaim the full width once they
     clear the floated thumbnail, so short text doesn't sit in a cramped column. */
  aside.infobox > .attributes,
  aside.infobox > .urls,
  .infobox > .attributes,
  .infobox > .urls {
    clear: left !important;
  }
}

/* "No results" / error notices and engine-error text: theme them, no red. */
.dialog-error-block,
.dialog-error,
#urls .dialog-error-block,
.result .dialog-error-block {
  background: #30302E !important;
  border: 1px solid #4A4A45 !important;
  border-radius: 0.65rem !important;
  color: #FAF9F5 !important;
  padding: 1rem 1.15rem !important;
}
.dialog-error-block p,
.dialog-error-block li {
  color: #FAF9F5 !important;
}
.dialog-error-block strong {
  color: #FB521F !important;
}
.dialog-error-block a {
  color: #FB521F !important;
}
.dialog-error-block a:hover,
.dialog-error-block a:focus {
  color: #45DA64 !important;
}
.response-error,
td.response-error,
.engine-stats .response-error,
#engines_msg .response-error {
  color: #C2C0B6 !important;
  background: transparent !important;
}

