/* nosco.css — Nosco Sintesi premium theme override for SearXNG Simple */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@800&family=Outfit:wght@400;500;600&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

:root {
  --shore-0: #FDFBF7;
  --shore-1: #F8F6F2;
  --shore-2: #F0EBE5;
  --shore-3: #E0D8D0;
  --shore-border: #E8E3DA;

  --boreal-0: #0F1A22;
  --boreal-1: #1A2832;
  --boreal-2: #243440;
  --boreal-3: #2E4050;

  --atlantic-0: #1A3548;
  --atlantic-1: #2B577D;
  --atlantic-2: #4A7A9C;
  --atlantic-3: #6A9ABC;
  --atlantic-4: #8FB6D4;

  --warmth-0: #C97B4A;
  --warmth-1: #D4885C;
  --warmth-2: #E49A6E;
  --warmth-3: #EAA853;
  --warmth-deep: #9C5228;

  --granite-0: #2A3640;
  --granite-1: #3C4A56;
  --granite-2: #4E5C68;
  --granite-3: #5C6A76;
  --granite-4: #9AA8B5;

  --ink-black: #1A1A1A;
  --ink-pencil: #5C6B8F;
  --ink-alert: #A64E4E;
  --ink-sage: #547068;
  --ink-highlight: #E8D880;

  --font-display: 'Nunito', sans-serif;
  --font-ui: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

html, body {
  background: var(--shore-1);
  color: var(--atlantic-0);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
html { overflow-x: hidden; }

a {
  color: var(--atlantic-1);
  text-decoration: none;
}
a:hover { color: var(--warmth-deep); }
a:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--atlantic-1);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: rgba(232,216,128,.5); }

html { scrollbar-color: #C9BFAF var(--shore-1); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--shore-1); }
::-webkit-scrollbar-thumb { background: #C9BFAF; border-radius: 4px; border: 2px solid var(--shore-1); }

/* Top nav */
#links_on_top {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  padding: 10px 14px;
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}
#links_on_top a {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--granite-1);
  padding: 3px 6px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#links_on_top a:hover { background: var(--shore-2); color: var(--atlantic-0); }
#links_on_top a svg { stroke-width: 1.7; width: 12px; height: 12px; }
#links_on_top a span { line-height: 1; }

/* Main wrapper */
main {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
main#main_results { max-width: 1280px; }
main#simple_search_endpoint .index { padding-top: 0; }

/* Homepage hero */
body.index_endpoint { overflow: hidden; }
.index {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  height: 100vh;
  height: 100dvh;
  text-align: center;
  /* Anchored from the top: centring the hero in the top 26vh clipped the logo
     on short windows (2026-10-11). */
  justify-content: flex-start;
  padding: clamp(40px, 20vh, 240px) 24px 0;
  overflow: hidden;
}
/* Stock SearXNG also pushes main#main_index down by 26vh; the hero offset
   above is the only one. */
main#main_index { margin-top: 0 !important; }
.index .title { display: none; }
.index #search {
  width: 100%;
  max-width: 720px;
}
.index .autocomplete.open { max-height: 45vh; }

@keyframes nosco-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@keyframes nosco-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.nosco-hero {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: nosco-fade-up .5s ease-out backwards;
}
.nosco-hero__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.nosco-hero__logo img {
  width: 100%;
  max-width: 340px;
  height: auto;
  display: block;
}

/* Bottom-right home illustration */
.nosco-home {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  max-width: 1100px;
  line-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  animation: nosco-fade-in .7s ease-out backwards;
}
.nosco-home picture,
.nosco-footer-illustration picture { display: block; width: 100%; }
main > :not(.nosco-footer-illustration) { position: relative; z-index: 1; }
.nosco-home img {
  width: 100%;
  height: auto;
  display: block;
  mask-image: linear-gradient(to top left, black 55%, transparent 95%);
  -webkit-mask-image: linear-gradient(to top left, black 55%, transparent 95%);
}
html.theme-dark .nosco-home,
html.theme-black .nosco-home { opacity: 0.85; }
/* Search bar */
#search {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
}
#search_header,
#main_results #search_header {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 14px;
  padding: 0;
  background: transparent;
  border: none;
}
#search_logo { display: none; }
#search_view { width: 100%; }
.search_box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--shore-0);
  border: 1.5px solid var(--shore-3);
  border-radius: 14px;
  padding: 6px 8px 6px 18px;
  box-shadow: 0 4px 16px rgba(26,53,72,.06);
  transition: border-color .15s, box-shadow .15s;
}
.search_box:focus-within {
  border-color: var(--atlantic-1);
  box-shadow: 0 4px 24px rgba(43,87,125,.12);
}
.search_box input#q {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 10px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--atlantic-0);
  outline: none;
}
.search_box input#q::placeholder { color: var(--granite-4); }
#clear_search, #send_search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  color: var(--granite-2);
  transition: background .15s, color .15s, box-shadow .15s, transform .1s;
}
#clear_search:hover, #send_search:hover { background: var(--shore-2); color: var(--atlantic-0); }
#send_search {
  background: var(--atlantic-1);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-left: 4px;
  box-shadow: 0 2px 8px rgba(43,87,125,.25);
}
#send_search:hover { background: var(--atlantic-0); box-shadow: 0 4px 14px rgba(26,53,72,.3); }
#send_search:active { transform: scale(.94); }
#send_search svg, #clear_search svg { stroke-width: 1.8; }

/* Autocomplete */
.autocomplete {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
}
.autocomplete.open { margin-top: 0; }
.autocomplete ul {
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(26,53,72,.1);
  padding: 6px 0;
  display: none;
  margin: 0;
  list-style: none;
}
.autocomplete.open ul:empty {
  display: none;
}
.autocomplete.open ul:not(:empty),
.search_box:focus-within .autocomplete.open ul:not(:empty) {
  display: block;
}
.autocomplete li {
  padding: 8px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--granite-0);
  cursor: pointer;
  transition: background .12s, color .12s, padding-left .12s;
}
.autocomplete li:hover, .autocomplete li.selected, .autocomplete li.active {
  background: var(--shore-2);
  color: var(--atlantic-0);
  padding-left: 18px;
}

/* Categories */
#categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}
#main_results #categories {
  flex-wrap: nowrap;
  justify-content: flex-start;
}
#main_results #categories_container {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  width: 100%;
}
#main_results #categories label,
#main_results .category label {
  padding: 5px 10px;
  font-size: 10px;
  letter-spacing: 0.4px;
  white-space: nowrap;
  flex-shrink: 0;
}
#main_results #categories svg,
#main_results .category svg {
  width: 12px;
  height: 12px;
}
#categories label, .category label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--granite-1);
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 99px;
  padding: 7px 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, border-color .15s, color .15s;
}
#categories label:hover, .category label:hover { border-color: var(--atlantic-2); color: var(--atlantic-0); }
#categories input:focus-visible + label, .category input:focus-visible + label {
  outline: 2px solid var(--atlantic-1);
  outline-offset: 2px;
}
#categories input:checked + label, .category input:checked + label {
  background: var(--atlantic-1);
  border-color: var(--atlantic-1);
  color: var(--shore-0);
}
#categories svg, .category svg { width: 15px; height: 15px; stroke-width: 1.7; }

/* Search filters */
.search_filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: nowrap;
  align-items: center;
}
#main_results .search_filters select {
  font-size: 11px;
  padding: 5px 22px 5px 10px;
  flex-shrink: 0;
}
#main_results .search_filters select.language {
  max-width: 320px;
  flex: 1;
  min-width: 180px;
}
.search_filters label {
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--granite-1);
}
.search_filters select {
  appearance: none;
  background: var(--shore-0) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%233C4A56" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>') no-repeat right 10px center;
  border: 1px solid var(--shore-border);
  border-radius: 8px;
  padding: 5px 24px 5px 10px;
  font-family: var(--font-body);
  font-size: 11px;
  color: var(--granite-0);
  cursor: pointer;
}
/* Results page layout */
#results,
#main_results #results {
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: none !important;
  grid-template-areas: none !important;
  gap: 28px;
  align-items: start;
  width: 75% !important;
  margin-top: 18px;
  margin-left: auto !important;
  margin-right: 0 !important;
  position: relative;
  z-index: 1;
}
#results > *,
#main_results #results > * {
  grid-area: auto !important;
  grid-column: 1 !important;
  min-width: 0 !important;
}
#results.only_template_images,
#results.only_template_videos { grid-template-columns: 1fr !important; }
#sidebar { display: none; }
#sidebar::-webkit-scrollbar { width: 6px; }
#sidebar::-webkit-scrollbar-thumb { background: var(--shore-3); border-radius: 3px; }

/* Result cards */
.result {
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 16px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(26,53,72,.04), 0 6px 18px rgba(26,53,72,.04);
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.result:hover {
  box-shadow: 0 4px 12px rgba(26,53,72,.08), 0 12px 28px rgba(26,53,72,.06);
  border-color: var(--atlantic-2);
  transform: translateY(-2px);
}
.result .url_header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--granite-2);
}
.result .url_wrapper { display: flex; flex-wrap: wrap; gap: 2px; overflow-wrap: anywhere; }
.result .url_wrapper span {
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--granite-2);
  white-space: normal !important;
  overflow-wrap: anywhere;
}
.nosco-result__body { min-width: 0; overflow-wrap: anywhere; }
.nosco-result__body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.3;
  margin: 0 0 8px;
}
.nosco-result__body h3 a {
  color: var(--atlantic-0);
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size .2s ease, color .15s ease;
}
.nosco-result__body h3 a:hover { color: var(--atlantic-1); background-size: 100% 1.5px; }
.nosco-result__body .content {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--granite-1);
  line-height: 1.6;
  margin: 0 0 10px;
}
.nosco-result__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--granite-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.nosco-result__image {
  margin: 0 0 10px 16px;
  max-width: 180px;
}
.result:has(.nosco-result__image) {
  grid-template-columns: minmax(0, 1fr) 180px;
}
.result:has(.nosco-result__image) .nosco-result__image {
  grid-column: 2;
  grid-row: 1 / span 3;
  align-self: start;
  justify-self: end;
  margin: 0;
}
.nosco-result__image img.thumbnail {
  border-radius: 10px;
  width: 100%;
  height: auto;
  display: block;
}
.result .nosco-result__image .thumbnail_link {
  float: none;
  display: block;
  position: relative;
  margin: 0;
}
.result .nosco-result__image .thumbnail_link img.thumbnail {
  width: 100%;
  height: auto;
}
.result .engines {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--granite-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  grid-column: 1 / -1;
}
.result .engines span {
  background: var(--shore-2);
  color: var(--granite-1);
  border-radius: 99px;
  padding: 3px 9px;
}

/* Image / video grid results */
.template_group_images {
  display: flex;
  flex-wrap: wrap;
}
.result.result-images {
  display: block;
  background: transparent;
  border: none;
  border-radius: 10px;
  box-shadow: none;
  padding: .5rem .5rem 3rem;
  margin: .25rem;
  overflow: hidden;
}
.result.result-images:hover {
  transform: none;
  box-shadow: none;
}
.template_group_videos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.template_group_videos .result {
  padding: 12px;
  margin-bottom: 0;
  overflow: hidden;
}
.template_group_videos .result img { transition: transform .25s ease; }
.template_group_videos .result:hover img { transform: scale(1.03); }
.template_group_videos .result:has(.nosco-result__image) { grid-template-columns: 1fr; }
.template_group_videos .result:has(.nosco-result__image) .nosco-result__image {
  grid-column: 1;
  grid-row: auto;
  justify-self: stretch;
  max-width: none;
}
.template_group_videos .nosco-result__body h3 { font-size: 15px; }
.template_group_videos .nosco-result__body .content {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Sidebar */
#sidebar {
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 14px;
  padding: 20px;
}
#sidebar .sidebar-collapsible {
  border: none;
  padding: 0;
}
#sidebar .title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--atlantic-0);
  margin-bottom: 12px;
}
#sidebar details summary { cursor: pointer; list-style: none; }
#sidebar details summary::-webkit-details-marker { display: none; }
html.theme-dark #sidebar,
html.theme-black #sidebar { background: var(--boreal-1); border-color: var(--boreal-3); }

/* Nosco trust card (inserted into sidebar via template) */
.nosco-trust-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0 0 18px;
  margin-bottom: 18px;
  text-align: left;
  border-bottom: 1px dashed var(--shore-3);
}
.nosco-trust-card__icon {
  width: 28px;
  height: 28px;
  margin: 0 0 10px;
  color: var(--atlantic-1);
}
.nosco-trust-card h4 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--atlantic-0);
  margin: 0 0 12px;
  line-height: 1.25;
}
.nosco-trust-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.nosco-trust-card li {
  position: relative;
  padding-left: 18px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--granite-1);
  margin-bottom: 8px;
  line-height: 1.5;
}
.nosco-trust-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ink-sage);
}
html.theme-dark .nosco-trust-card,
html.theme-black .nosco-trust-card {
  background: transparent;
  border-color: var(--boreal-3);
}
html.theme-dark .nosco-trust-card h4,
html.theme-black .nosco-trust-card h4 { color: #D9E6F0; }
html.theme-dark .nosco-trust-card li,
html.theme-black .nosco-trust-card li { color: #9FB0D6; }
html.theme-dark .nosco-trust-card li::before,
html.theme-black .nosco-trust-card li::before { background: #8FB6D4; }

/* Suggestions / answers */
#suggestions, #answers, #corrections { margin-bottom: 18px; }
#suggestions .title, #answers .title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  color: var(--atlantic-0);
  margin-bottom: 10px;
}
#suggestions a, #corrections a {
  display: inline-block;
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 99px;
  padding: 6px 14px;
  margin: 0 6px 8px 0;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--atlantic-1);
  transition: background .15s, border-color .15s, color .15s;
}
#suggestions a:hover, #corrections a:hover { border-color: var(--atlantic-2); color: var(--atlantic-0); }

/* Pagination */
#pagination {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 32px 0;
  flex-wrap: wrap;
}
#pagination form { display: inline-flex; }
#main_results #pagination button, #main_results #pagination .page_number input {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  background: transparent !important;
  border: 1.5px solid var(--shore-3);
  border-radius: 99px;
  padding: 8px 16px;
  color: var(--atlantic-0) !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
#main_results #pagination button:hover, #main_results #pagination .page_number input:hover {
  border-color: var(--atlantic-1);
  color: var(--atlantic-1) !important;
}
#main_results #pagination input.page_number_current,
#main_results #pagination .page_number input.page_number_current {
  background: var(--atlantic-1) !important;
  border-color: var(--atlantic-1);
  color: var(--shore-1) !important;
}
#main_results #pagination input.page_number_current:hover {
  background: var(--atlantic-0) !important;
  border-color: var(--atlantic-0);
  color: var(--shore-1) !important;
}
html.theme-dark #main_results #pagination button,
html.theme-dark #main_results #pagination .page_number input,
html.theme-black #main_results #pagination button,
html.theme-black #main_results #pagination .page_number input {
  border-color: var(--boreal-3) !important;
  color: #D9E6F0 !important;
}
html.theme-dark #main_results #pagination button:hover,
html.theme-dark #main_results #pagination .page_number input:hover,
html.theme-black #main_results #pagination button:hover,
html.theme-black #main_results #pagination .page_number input:hover {
  border-color: #8FB6D4 !important;
  color: #8FB6D4 !important;
}
html.theme-dark #main_results #pagination input.page_number_current,
html.theme-black #main_results #pagination input.page_number_current {
  background: #8FB6D4 !important;
  border-color: #8FB6D4 !important;
  color: var(--boreal-0) !important;
}

/* Results page search bar */
#search_header,
#main_results #search_header {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: 14px !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  max-width: 880px !important;
  margin: 0 !important;
  padding: 16px 0 10px !important;
}
#search_header #search_logo,
#main_results #search_header #search_logo { padding-top: 12px !important; }
#search_logo {
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
  margin: 0 !important;
  padding: 0 !important;
  grid-area: auto !important;
}
.page_with_header #search_header {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 14px !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 0 10px !important;
}
.page_with_header #search_logo { display: flex !important; align-items: center; }
#search_view {
  flex: 1;
  min-width: 0;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px;
  align-items: stretch;
  grid-area: auto !important;
  padding: 0 !important;
}
.search_box { border-radius: 12px; }
#main_results #search,
#main_results form#search {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
#main_results #search_header {
  position: relative !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  grid-template-columns: none !important;
  grid-template-areas: none !important;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px 0 10px !important;
  gap: 0 !important;
}
#main_results #search_header #search_logo {
  position: absolute;
  right: 100%;
  top: 22px;
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
  margin: 0 14px 0 0 !important;
  padding: 0 !important;
  grid-area: auto !important;
}
#main_results #search_view {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  align-items: stretch !important;
  margin: 0 !important;
  padding: 0 !important;
}
#main_results .search_box {
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 6px 8px 6px 18px !important;
}
#main_results .search_box input#q { min-width: 0 !important; }
#main_results #categories {
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  text-align: left !important;
  clear: none !important;
  font-size: inherit !important;
  overflow: visible !important;
  padding-left: 0 !important;
}
#main_results #categories_container {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  position: static !important;
}
#main_results .search_filters {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 10px !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  max-width: 100% !important;
  align-self: stretch !important;
  box-sizing: border-box !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}
@media (max-width: 1400px) {
  #main_results #search_header #search_logo {
    position: static;
    margin: 6px 14px 0 0 !important;
  }
}
@media (max-width: 900px) {
  #main_results #results { width: 100% !important; }
  #main_results #categories,
  #main_results #categories_container,
  #main_results .search_filters { justify-content: flex-start !important; }
  #main_results #categories_container,
  #main_results .search_filters { flex-wrap: wrap !important; }
  #main_results .search_filters select.language { min-width: 0 !important; max-width: 100% !important; flex: 1 1 100% !important; }
}

/* Hide Preferences link on results page */
#links_on_top.nosco-topnav--results { display: none; }

/* Preferences page softening */
.preferences {
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 14px;
  padding: 24px;
  margin-top: 24px;
}
#main_preferences { padding-left: 420px; }
#main_preferences {
  --color-btn-background: var(--atlantic-1);
  --color-btn-font: var(--shore-1);
  --color-toolkit-checkbox-onoff-on-mark-background: var(--atlantic-1);
  --color-toolkit-checkbox-onoff-on-mark-color: var(--shore-1);
  --color-toolkit-checkbox-onoff-off-mark-background: var(--granite-4);
  --color-toolkit-checkbox-input-border: var(--atlantic-1);
}
#main_preferences input[type=submit] {
  background: var(--atlantic-1);
  color: var(--shore-1);
}
#main_preferences input[type=submit]:hover { background: var(--atlantic-0); color: var(--shore-1); }
#main_preferences .preferences_back a { color: var(--shore-1); }
#main_preferences .preferences_back:hover { background: var(--atlantic-0); }
html.theme-dark #main_preferences,
html.theme-black #main_preferences {
  --color-btn-background: var(--atlantic-4);
  --color-btn-font: var(--boreal-0);
  --color-toolkit-checkbox-onoff-on-mark-background: var(--atlantic-4);
  --color-toolkit-checkbox-onoff-on-mark-color: var(--boreal-0);
}
html.theme-dark #main_preferences input[type=submit],
html.theme-black #main_preferences input[type=submit] {
  background: var(--atlantic-4);
  color: var(--boreal-0);
}
html.theme-dark #main_preferences .preferences_back a,
html.theme-black #main_preferences .preferences_back a { color: var(--boreal-0); }
.preferences h1, .preferences h2, .preferences h3 {
  font-family: var(--font-display);
  color: var(--atlantic-0);
}
.preferences table {
  width: 100%;
  border-collapse: collapse;
}
.preferences th, .preferences td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--shore-border);
  font-family: var(--font-body);
  font-size: 14px;
}

/* Info / about / 404 / stats */
.info, .stats, .page_with_header .content, .error-page {
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 14px;
  padding: 28px;
  margin-top: 24px;
}
.info h1, .info h2, .stats h1 {
  font-family: var(--font-display);
  color: var(--atlantic-0);
}

/* Dialog error */
.dialog-error {
  background: rgba(166,78,78,.08);
  border: 1px solid rgba(166,78,78,.25);
  border-radius: 12px;
  color: var(--ink-alert);
  padding: 14px 18px;
  margin-bottom: 18px;
}
.dialog-error a.close { color: var(--ink-alert); }


/* Page header logo (preferences, results) */
.nosco-page-logo {
  display: inline-flex;
  padding: 8px 0 12px;
}
.nosco-page-logo__img {
  height: 36px;
  width: auto;
  display: block;
}

/* Search results header logo */
.nosco-search-logo {
  height: 44px;
  width: 44px;
  display: block;
}

/* Footer illustration (preferences) */
.nosco-footer-illustration {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  max-width: 420px;
  line-height: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  opacity: 0.7;
}
.nosco-footer-illustration img {
  width: 100%;
  height: auto;
  display: block;
  mask-image: linear-gradient(to right, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, black 70%, transparent 100%);
}
/* Results page bottom-left illustration */
.nosco-results-illustration {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 0;
  pointer-events: none;
  width: 100%;
  max-width: 1240px;
  line-height: 0;
  opacity: 1;
}
.nosco-results-illustration img {
  width: 100%;
  height: auto;
  display: block;
  mask-image: linear-gradient(to top right, black 80%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top right, black 80%, transparent 100%);
}
html.theme-dark .nosco-results-illustration,
html.theme-black .nosco-results-illustration { opacity: 0.55; }
@media (max-width: 900px) {
  .nosco-results-illustration { max-width: 380px; }
}
@media (max-width: 600px) {
  .nosco-results-illustration { display: none; }
}
html.theme-dark .nosco-footer-illustration,
html.theme-black .nosco-footer-illustration { opacity: 0.45; }
@media (max-width: 900px) {
  .nosco-footer-illustration { max-width: 320px; }
}
@media (max-width: 900px) {
  #main_preferences { padding-left: 24px; }
}
@media (max-width: 600px) {
  .nosco-footer-illustration { display: none; }
}

/* Appearance toggle on preferences page */
.nosco-theme-toggle {
  background: var(--shore-0);
  border: 1px solid var(--shore-border);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.nosco-theme-toggle .value {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.nosco-theme-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  color: var(--granite-1);
  background: var(--shore-1);
  border: 1px solid var(--shore-border);
  border-radius: 99px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.nosco-theme-option input {
  appearance: none;
  width: 16px;
  height: 16px;
  margin: 0;
  border: 2px solid var(--granite-4);
  border-radius: 50%;
  background: var(--shore-0);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.nosco-theme-option input:focus-visible {
  outline: 2px solid var(--atlantic-1);
  outline-offset: 2px;
}
.nosco-theme-option input:checked {
  border-color: var(--atlantic-1);
  background: var(--atlantic-1);
  box-shadow: inset 0 0 0 3px var(--shore-0);
}
.nosco-theme-option:has(input:checked) {
  background: var(--shore-2);
  color: var(--atlantic-0);
  border-color: var(--atlantic-1);
}
html.theme-dark .nosco-theme-toggle,
html.theme-black .nosco-theme-toggle {
  background: var(--boreal-1);
  border-color: var(--boreal-3);
}
html.theme-dark .nosco-theme-option,
html.theme-black .nosco-theme-option {
  background: var(--boreal-2);
  border-color: var(--boreal-3);
  color: #9FB0D6;
}
html.theme-dark .nosco-theme-option:has(input:checked),
html.theme-black .nosco-theme-option:has(input:checked) {
  background: var(--boreal-3);
  color: #D9E6F0;
  border-color: #8FB6D4;
}
html.theme-dark .nosco-theme-option input:checked,
html.theme-black .nosco-theme-option input:checked {
  border-color: #8FB6D4;
  background: #8FB6D4;
  box-shadow: inset 0 0 0 3px var(--boreal-2);
}
/* Back to top */
#backToTop {
  position: fixed;
  left: auto !important;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  background: transparent !important;
  border: none !important;
  border-radius: 0;
}
#backToTop a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0 !important;
  background: var(--atlantic-1);
  border: none;
  border-radius: 50%;
  box-shadow: 0 4px 14px rgba(26,53,72,.15);
  color: var(--shore-1);
  transition: background .15s, transform .15s, box-shadow .15s;
}
#backToTop a:hover { background: var(--atlantic-0); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(26,53,72,.2); }
#backToTop a, #backToTop a:visited, #backToTop a:hover, #backToTop a:active { color: var(--shore-1); }
#backToTop a svg { stroke-width: 2; }
html.theme-dark #backToTop a,
html.theme-black #backToTop a {
  background: var(--atlantic-4);
  color: var(--boreal-0);
}
html.theme-dark #backToTop a:hover,
html.theme-black #backToTop a:hover { background: var(--warmth-3); color: var(--boreal-0); }

/* Motion & color-scheme protections */
@media (prefers-reduced-motion: reduce) {
  .result, .search_box, #pagination button, #pagination .page_number input,
  #suggestions a, #corrections a, #categories label, .category label,
  #send_search, #backToTop a, .autocomplete li, .nosco-result__body h3 a,
  .template_group_videos .result img,
  .nosco-hero, .nosco-home, .nosco-theme-option, .nosco-theme-option input {
    transition: none !important;
    animation: none !important;
  }
  .result:hover, #backToTop a:hover,
  .template_group_videos .result:hover img { transform: none; }
  .nosco-home, .nosco-footer-illustration { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
:root { color-scheme: light; }
html.theme-dark, html.theme-black { color-scheme: dark; }

/* Mobile */
@media (max-width: 900px) {
  main { box-sizing: border-box; }
  #results { grid-template-columns: 1fr; }
  #sidebar { position: static; order: 2; }
  .result:has(.nosco-result__image) { grid-template-columns: 1fr; }
  .result:has(.nosco-result__image) .nosco-result__image {
    grid-column: 1;
    grid-row: auto;
    justify-self: start;
  }
  .index { padding-top: 10vh; }
  .nosco-hero__logo img { max-width: 280px; }
  .nosco-home { max-width: 580px; }
}
@media (max-width: 600px) {
  #links_on_top { padding: 8px 10px; }
  #links_on_top a { font-size: 9px; gap: 3px; }
  #links_on_top a svg { width: 11px; height: 11px; }
  .search_box { padding: 4px 6px 4px 12px; }
  .search_box input#q { font-size: 15px; padding: 10px 8px; }
  #send_search { width: 40px; height: 40px; }
  .nosco-home { max-width: 100%; }
}

/* Dark mode (Boreal) — also covers theme-black where styling is identical */
html.theme-dark, html.theme-dark body {
  background: var(--boreal-0);
  color: #D9E6F0;
}
html.theme-black, html.theme-black body { background: #000; color: #D9E6F0; }
html.theme-dark a, html.theme-black a { color: #8FB6D4; }
html.theme-dark a:hover, html.theme-black a:hover { color: var(--warmth-3); }
html.theme-dark ::selection, html.theme-black ::selection { background: rgba(46,64,80,.85); }
html.theme-dark ::-webkit-scrollbar-track, html.theme-black ::-webkit-scrollbar-track { background: var(--boreal-0); }
html.theme-dark ::-webkit-scrollbar-thumb, html.theme-black ::-webkit-scrollbar-thumb { background: var(--boreal-3); border-color: var(--boreal-0); }
html.theme-dark .search_box,
html.theme-dark .result,
html.theme-dark #sidebar,
html.theme-dark .preferences,
html.theme-dark .info,
html.theme-dark .stats,
html.theme-dark .error-page,
html.theme-dark .autocomplete ul,
html.theme-black .search_box,
html.theme-black .result,
html.theme-black #sidebar,
html.theme-black .preferences,
html.theme-black .info,
html.theme-black .stats,
html.theme-black .error-page,
html.theme-black .autocomplete ul {
  background: rgba(26,40,50,.72);
  border-color: rgba(61,84,100,.55);
  color: #D9E6F0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
html.theme-dark .result.result-images,
html.theme-black .result.result-images {
  background: transparent;
  border-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
html.theme-dark .search_box:focus-within, html.theme-black .search_box:focus-within { border-color: #8FB6D4; box-shadow: 0 4px 24px rgba(143,182,212,.12); }
html.theme-dark .search_box input#q, html.theme-black .search_box input#q { color: #D9E6F0; }
html.theme-dark .search_box input#q::placeholder, html.theme-black .search_box input#q::placeholder { color: var(--granite-4); }
html.theme-dark #send_search, html.theme-black #send_search { background: #8FB6D4; color: var(--boreal-0); }
html.theme-dark #send_search:hover, html.theme-black #send_search:hover { background: var(--warmth-3); color: var(--boreal-0); }
html.theme-dark #categories label,
html.theme-dark .category label,
html.theme-black #categories label,
html.theme-black .category label {
  background: rgba(26,40,50,.72);
  border-color: rgba(61,84,100,.55);
  color: #9FB0D6;
}
html.theme-dark #categories label:hover,
html.theme-dark .category label:hover,
html.theme-black #categories label:hover,
html.theme-black .category label:hover { color: #D9E6F0; border-color: #6A9ABC; }
html.theme-dark #categories input:checked + label,
html.theme-dark .category input:checked + label,
html.theme-black #categories input:checked + label,
html.theme-black .category input:checked + label { background: #8FB6D4; border-color: #8FB6D4; color: var(--boreal-0); }
html.theme-dark .result h3 a, html.theme-black .result h3 a { color: #D9E6F0; }
html.theme-dark .result h3 a:hover, html.theme-black .result h3 a:hover { color: #8FB6D4; }
html.theme-dark .result .content, html.theme-black .result .content { color: #9FB0D6; }
html.theme-dark .result .engines span, html.theme-black .result .engines span { background: rgba(46,64,80,.7); color: #9FB0D6; }
html.theme-dark #sidebar .title,
html.theme-dark .preferences h1,
html.theme-dark .info h1,
html.theme-black #sidebar .title,
html.theme-black .preferences h1,
html.theme-black .info h1 { color: #D9E6F0; }
html.theme-dark #links_on_top a:hover, html.theme-black #links_on_top a:hover { background: var(--boreal-2); }
html.theme-dark .autocomplete li,
html.theme-black .autocomplete li { color: #D9E6F0; }
html.theme-dark .autocomplete li:hover,
html.theme-dark .autocomplete li.selected,
html.theme-dark .autocomplete li.active,
html.theme-black .autocomplete li:hover,
html.theme-black .autocomplete li.selected,
html.theme-black .autocomplete li.active { background: var(--boreal-2); color: #FFFFFF; }
html.theme-dark #suggestions a,
html.theme-dark #corrections a,
html.theme-black #suggestions a,
html.theme-black #corrections a {
  background: rgba(26,40,50,.72);
  border-color: rgba(61,84,100,.55);
  color: #8FB6D4;
}
html.theme-dark #suggestions a:hover,
html.theme-dark #corrections a:hover,
html.theme-black #suggestions a:hover,
html.theme-black #corrections a:hover { border-color: #6A9ABC; color: #D9E6F0; }
html.theme-dark .search_filters label,
html.theme-black .search_filters label { color: #9FB0D6; }
html.theme-dark .search_filters select,
html.theme-black .search_filters select {
  background: rgba(26,40,50,.72) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%239FB0D6" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m6 9 6 6 6-6"/></svg>') no-repeat right 10px center;
  border-color: rgba(61,84,100,.55);
  color: #D9E6F0;
}
html.theme-dark .preferences th,
html.theme-dark .preferences td,
html.theme-black .preferences th,
html.theme-black .preferences td { border-bottom-color: var(--boreal-3); }
html.theme-dark #categories input:focus-visible + label,
html.theme-dark .category input:focus-visible + label,
html.theme-black #categories input:focus-visible + label,
html.theme-black .category input:focus-visible + label { outline-color: #8FB6D4; }
html.theme-dark .nosco-theme-option input:focus-visible,
html.theme-black .nosco-theme-option input:focus-visible { outline-color: #8FB6D4; }

/* ============================================================
   IMAGE RESULTS (2026-10-11) — full-width tile grid, rounded tiles,
   hover captions, resolution pill, broken thumbnails hidden.
   No transform/filter on .result-images itself: the image detail
   panel inside it is position:fixed and must stay window-relative.
   ============================================================ */
#results.only_template_images,
#main_results #results.only_template_images { width: 100% !important; margin-left: 0 !important; }
body:has(#results.only_template_images) .nosco-results-illustration { display: none; }
#results.only_template_images #urls,
#urls .template_group_images,
.template_group_images {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
#results.only_template_images #urls::after,
.template_group_images::after { content: ""; flex: 999 1 220px; }
.result.result-images {
  flex: 1 1 220px;
  max-width: 420px;
  height: 200px;
  margin: 0;
  padding: 0;
  border-radius: 14px;
  background: var(--shore-2);
  box-shadow: 0 1px 2px rgba(15, 26, 34, .06), 0 4px 14px rgba(15, 26, 34, .07);
  transition: box-shadow .2s ease;
  overflow: visible;
}
.result.result-images > a {
  position: relative;
  display: block;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
}
.result.result-images img.image_thumbnail {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.result.result-images:hover { box-shadow: 0 12px 28px rgba(15, 26, 34, .18); }
.result.result-images:hover img.image_thumbnail { transform: scale(1.045); }
.result.result-images img.image_thumbnail[src$=".svg"],
.result.result-images img.image_thumbnail[src*=".svg?"] {
  object-fit: contain;
  padding: 34px;
  background: var(--shore-0);
}
.result.result-images:has(img[src*="img_load_error"]) { display: none; }
.result.result-images > a .title,
.result.result-images > a .source {
  position: absolute;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0 12px;
  color: #FDFBF7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.result.result-images > a .title { bottom: 24px; font-size: 13px; font-weight: 600; }
.result.result-images > a .source { bottom: 8px; font-size: 11px; opacity: 0; color: rgba(253, 251, 247, .8); }
.result.result-images > a::after {
  content: "";
  position: absolute;
  inset: 45% 0 0 0;
  background: linear-gradient(180deg, transparent, rgba(15, 26, 34, .78));
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.result.result-images:hover > a::after,
.result.result-images:hover > a .title,
.result.result-images:hover > a .source,
.result.result-images > a:focus-visible::after,
.result.result-images > a:focus-visible .title,
.result.result-images > a:focus-visible .source { opacity: 1; }
@media (hover: none) {
  .result.result-images > a::after, .result.result-images > a .title, .result.result-images > a .source { opacity: 1; }
}
.result.result-images > a .image_resolution {
  position: absolute;
  top: 8px;
  right: 8px;
  bottom: auto;
  left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 26, 34, .62);
  color: #FDFBF7;
  font-size: 11px;
  line-height: 18px;
  z-index: 1;
}
html.theme-dark .result.result-images,
html.theme-black .result.result-images { background: var(--boreal-2); }
html.theme-dark .result.result-images img.image_thumbnail[src$=".svg"],
html.theme-black .result.result-images img.image_thumbnail[src$=".svg"] { background: #E9E4DC; }
@media (max-width: 600px) {
  .result.result-images { flex-basis: 150px; height: 150px; }
}

/* Image detail panel + selection in nosco colours (SearXNG's own variables) */
:root, html.theme-dark, html.theme-black {
  --color-result-vim-selected: rgba(74, 122, 156, .14);
  --color-result-detail-background: #0F1A22;
}
#urls article.result-images[data-vim-selected] {
  background: var(--shore-2) !important;
  box-shadow: 0 0 0 3px var(--atlantic-2), 0 12px 28px rgba(15, 26, 34, .18) !important;
}
#urls article.result-images[data-vim-selected] img.image_thumbnail { filter: none !important; }
.image-detail-open article.result-images[data-vim-selected] .detail {
  color: #E9E4DC !important;
  border-radius: 18px 0 0 18px !important;
  box-shadow: -18px 0 48px rgba(15, 26, 34, .28) !important;
}
.image-detail-open article.result-images[data-vim-selected] .detail a { color: #8FB6D4 !important; }
.image-detail-open article.result-images[data-vim-selected] .detail a:hover { color: #D9E6F0 !important; }
.image-detail-open article.result-images[data-vim-selected] .detail a.result-images-source img[src$=".svg"] {
  background: #FDFBF7 !important;
  border-radius: 14px !important;
  padding: 24px !important;
}

/* ============================================================
   VIDEO "show video" TOGGLE (2026-10-11) — SearXNG 2026.10 renders it as a
   grey stock button; nosco pill instead.
   ============================================================ */
#urls .result .altlink a.btn-collapse {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  padding: 5px 13px !important;
  border-radius: 999px !important;
  border: 1px solid var(--atlantic-0) !important;
  background: transparent !important;
  color: var(--atlantic-0) !important;
  font-size: 12px !important;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: none !important;
  transition: background .15s, color .15s;
}
#urls .result .altlink a.btn-collapse:hover,
#urls .result .altlink a.btn-collapse:not(.collapsed) {
  background: var(--atlantic-0) !important;
  color: var(--shore-1) !important;
}
html.theme-dark #urls .result .altlink a.btn-collapse,
html.theme-black #urls .result .altlink a.btn-collapse {
  border-color: var(--boreal-3) !important;
  color: #D9E6F0 !important;
}
html.theme-dark #urls .result .altlink a.btn-collapse:hover,
html.theme-black #urls .result .altlink a.btn-collapse:hover {
  background: var(--boreal-3) !important;
}
