/* Loaded only by public templates. The administration area keeps its palette. */
:root { color-scheme: light; }
:root[data-theme="dark"], [data-theme="dark"] .public-site {
  --page-bg: #141b24;
  --surface: #1b2532;
  --subtle: #233146;
  --accent: #4d58bf;
  --accent-hover: #626ed4;
  color-scheme: dark;
  --ink: #dce3eb;
  --muted: #a1adbc;
  --line: #303d4d;
  --line-strong: #4a5b70;
  --blue: #8ebaff;
  --blue-dark: #b8d3ff;
  --green: #70c99e;
  --red: #ff938a;
  --wash: #192330;
  background: #141b24;
  color: var(--ink);
}
[data-theme="dark"] .topbar,
[data-theme="dark"] .searchbox,
[data-theme="dark"] .save-site-dialog,
[data-theme="dark"] .ad-dialog,
[data-theme="dark"] .save-instructions kbd { background: #1b2532; color: var(--ink); }
[data-theme="dark"] .brand,
[data-theme="dark"] .filters select,
[data-theme="dark"] .file-row,
[data-theme="dark"] .footer p:last-child span { color: var(--ink); }
[data-theme="dark"] .header-inner nav a,
[data-theme="dark"] .home-nav nav a,
[data-theme="dark"] .save-site,
[data-theme="dark"] .save-close,
[data-theme="dark"] .ad-close,
[data-theme="dark"] .filters label,
[data-theme="dark"] .results-caption h1,
[data-theme="dark"] .results-caption > span,
[data-theme="dark"] .file-preview,
[data-theme="dark"] .file-preview small,
[data-theme="dark"] .file-icon,
[data-theme="dark"] .more-files,
[data-theme="dark"] .result-meta,
[data-theme="dark"] .extension-text,
[data-theme="dark"] .page-numbers .ellipsis,
[data-theme="dark"] .facts dt,
[data-theme="dark"] .file-table-head,
[data-theme="dark"] .file-table-head span:last-child,
[data-theme="dark"] .file-row span:last-child,
[data-theme="dark"] .file-row i,
[data-theme="dark"] .tip-panel p,
[data-theme="dark"] .footer,
[data-theme="dark"] .home-search h1,
[data-theme="dark"] .search-symbol,
[data-theme="dark"] .home-hints > span,
[data-theme="dark"] .home-hints a,
[data-theme="dark"] .hot-searches span { color: var(--muted); }
[data-theme="dark"] .hot-searches a,
[data-theme="dark"] .type-tag { color: #afc9e6; }
[data-theme="dark"] .type-tag,
[data-theme="dark"] .result,
[data-theme="dark"] .file-table-head,
[data-theme="dark"] .file-row,
[data-theme="dark"] .save-instructions kbd { border-color: var(--line); }
[data-theme="dark"] .panel h2,
[data-theme="dark"] .save-instructions p,
[data-theme="dark"] .search-status,
[data-theme="dark"] .ad-item { background: var(--wash); color: var(--ink); border-color: var(--line); }
[data-theme="dark"] .filter-submit,
[data-theme="dark"] .magnet-row button,
[data-theme="dark"] .save-instructions .device-current { background: #23354b; color: var(--blue); border-color: #47678b; }
[data-theme="dark"] .filter-submit:hover,
[data-theme="dark"] .magnet-row button:hover { background: #2c4561; }
[data-theme="dark"] .searchbox button:hover { background: #195fab; }
[data-theme="dark"] .searchbox:focus-within { border-color: #8ebaff; box-shadow: 0 0 0 2px #2a405c; }
[data-theme="dark"] .filters select option { background: #1b2532; color: var(--ink); }
[data-theme="dark"] .page-direction.disabled { color: #8b98a8; background: #192330; }
[data-theme="dark"] .notice { background: #352e1c; color: #ebd493; }
[data-theme="dark"] [data-search-phase="queued"] [data-phase="queued"],
[data-theme="dark"] [data-search-phase="matching"] [data-phase="matching"],
[data-theme="dark"] [data-search-phase="collecting"] [data-phase="collecting"],
[data-theme="dark"] .search-clock strong { color: var(--blue); }
[data-theme="dark"] .search-steps li::before { color: var(--green); }

/* Titles apply only to search-result advertisements, including inline slots. */
.search-ad-slot { flex-wrap: wrap; }
.search-ad-slot .ad-item { min-width: 0; }
.search-ad-title { display: block; margin-bottom: 8px; color: var(--blue); font-size: 15px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.search-ad-slot .ad-item img { margin-inline: auto; }
@media (max-width: 760px) {
  .search-ad-slot .ad-item { width: 100%; }
  .search-ad-title { font-size: 14px; }
}

.ad-slot[hidden], .ad-item[hidden], [data-ad-expires][hidden] { display: none; }
