/* BSP V1.12.4 — explicit user-selected themes; light default even when device is dark */
:root{color-scheme:light}
html[data-bsp-theme="dark"]{color-scheme:dark}
.bsp-theme-toggle{display:inline-flex;justify-content:center;align-items:center;gap:5px;min-height:34px;border-radius:999px;padding:7px 12px;border:1px solid #dadce0;background:#fff;color:#3c4043;font:600 12px/1.25 Arial,sans-serif;white-space:nowrap;cursor:pointer;flex:0 0 auto;box-shadow:none}
.bsp-theme-toggle:hover{background:#f2f5fa;border-color:#aab8cb}
.bsp-theme-toggle:focus-visible{outline:3px solid #4285f4;outline-offset:2px}
.bsp-admin-top-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* Admin theme (dashboard, panels, forms, and login). */
html[data-bsp-theme="dark"]{background:#151a22;color:#e6edf8}
html[data-bsp-theme="dark"] body{background:#151a22;color:#e6edf8}
html[data-bsp-theme="dark"] a{color:#8ab4f8}
html[data-bsp-theme="dark"] p,html[data-bsp-theme="dark"] .hint,html[data-bsp-theme="dark"] small{color:#aab6c9}
html[data-bsp-theme="dark"] .sidebar,html[data-bsp-theme="dark"] .panel,html[data-bsp-theme="dark"] .auth-card,html[data-bsp-theme="dark"] .curation-item{background:#202833;color:#e6edf8;border-color:#344052}
html[data-bsp-theme="dark"] .dashboard,html[data-bsp-theme="dark"] .admin-layout{background:#151a22}
html[data-bsp-theme="dark"] .brandmark,html[data-bsp-theme="dark"] .admin-top h1{color:#eef4ff}
html[data-bsp-theme="dark"] .sidebar nav a{color:#d5dfeb}
html[data-bsp-theme="dark"] .sidebar nav a.active{color:#9cc3ff;background:#2b3d5e}
html[data-bsp-theme="dark"] .sidebar-bottom{border-color:#344052}
html[data-bsp-theme="dark"] .user-pill{color:#8ee2c5;background:#193b30;border-color:#2a6454}
html[data-bsp-theme="dark"] input,html[data-bsp-theme="dark"] select,html[data-bsp-theme="dark"] textarea{background:#151e2a;color:#e6edf8;border-color:#3a4960}
html[data-bsp-theme="dark"] input::placeholder,html[data-bsp-theme="dark"] textarea::placeholder{color:#94a3b8}
html[data-bsp-theme="dark"] .secondary,html[data-bsp-theme="dark"] button.secondary,html[data-bsp-theme="dark"] .buttonlike{background:#263448;color:#dde9fa;border-color:#40526a}
html[data-bsp-theme="dark"] .secondary:hover,html[data-bsp-theme="dark"] button.secondary:hover{background:#30415b}
html[data-bsp-theme="dark"] .muted-panel,html[data-bsp-theme="dark"] .metric,html[data-bsp-theme="dark"] .empty{background:#253040;color:#e6edf8;border-color:#40526a}
html[data-bsp-theme="dark"] .flag,html[data-bsp-theme="dark"] .tab-pill{border-color:#40526a}
html[data-bsp-theme="dark"] .metric.blue,html[data-bsp-theme="dark"] .metric.green,html[data-bsp-theme="dark"] .metric.amber{background:#243147}
html[data-bsp-theme="dark"] .ranking,html[data-bsp-theme="dark"] .divider,html[data-bsp-theme="dark"] .table th,html[data-bsp-theme="dark"] .table td{border-color:#354356}
html[data-bsp-theme="dark"] .bar-track{background:#3a4960}
html[data-bsp-theme="dark"] .tab-pill{color:#c8d9f0}
html[data-bsp-theme="dark"] .tab-pill.active{background:#2c4263;color:#9fc4ff}
html[data-bsp-theme="dark"] .seo-advanced .seo-code{background:#151e2a;color:#dbe6f8;border-color:#3a4960}
html[data-bsp-theme="dark"] .auth-page{background:#151a22}
html[data-bsp-theme="dark"] .favicon-manager .favicon-brand-list,html[data-bsp-theme="dark"] .favicon-manager .favicon-brand-row{border-color:#3a4960}
html[data-bsp-theme="dark"] .notice{background:#1e4033;color:#a8efce;border-color:#3a6d57}
html[data-bsp-theme="dark"] .notice.error{background:#472329;color:#ffbfc2;border-color:#873944}
html[data-bsp-theme="dark"] .bsp-theme-toggle{background:#303134;color:#e8eaed;border-color:#5f6368}
/* Public search: dark selected deliberately, not inherited from Android/Windows settings */
html[data-bsp-theme="dark"] body:has(.public-header){background:#202124;color:#e8eaed}
html[data-bsp-theme="dark"] .public-header,html[data-bsp-theme="dark"] .search-tabs{background:#202124;border-color:#3c4043}
html[data-bsp-theme="dark"] .public-logo,html[data-bsp-theme="dark"] .home-wordmark{color:#e8eaed}
html[data-bsp-theme="dark"] .search-form{background:#303134;border-color:#5f6368;box-shadow:none}
html[data-bsp-theme="dark"] .search-form:hover,html[data-bsp-theme="dark"] .search-form:focus-within{background:#303134;border-color:#74777e;box-shadow:none}
html[data-bsp-theme="dark"] .search-form input{background:transparent;color:#e8eaed;border-color:transparent}
html[data-bsp-theme="dark"] .search-form input::placeholder{color:#bdc1c6}
html[data-bsp-theme="dark"] .search-form .search-submit{color:#8ab4f8}
html[data-bsp-theme="dark"] .search-tabs .tab-active{color:#8ab4f8;border-bottom-color:#8ab4f8}
html[data-bsp-theme="dark"] .home-tagline,html[data-bsp-theme="dark"] .brand-shortcuts h2,html[data-bsp-theme="dark"] .result-heading .result-count,html[data-bsp-theme="dark"] .result-heading .result-description{color:#bdc1c6}
html[data-bsp-theme="dark"] .brand-shortcuts .chips a{background:#303134;color:#e8eaed;border-color:#5f6368}
html[data-bsp-theme="dark"] .brand-shortcuts .chips a:hover{background:#414349;color:#8ab4f8}
html[data-bsp-theme="dark"] .result-favicon{background:#303134;color:#8ab4f8;border-color:#5f6368}
html[data-bsp-theme="dark"] .result-domain{color:#e8eaed}
html[data-bsp-theme="dark"] .result-url{color:#bdc1c6}
html[data-bsp-theme="dark"] .result-card h2 a{color:#8ab4f8}
html[data-bsp-theme="dark"] .result-card h2 a:visited{color:#c58af9}
html[data-bsp-theme="dark"] .result-card p{color:#bdc1c6}
html[data-bsp-theme="dark"] .result-pagination a{color:#8ab4f8}
html[data-bsp-theme="dark"] .result-pagination strong{color:#e8eaed;border-color:#8ab4f8}
html[data-bsp-theme="dark"] .result-pagination a:hover{background:#303134}
html[data-bsp-theme="dark"] .empty{background:transparent;color:#bdc1c6}
html[data-bsp-theme="dark"] body:has(.public-header) .public-footer{background:#171717;color:#bdc1c6;border-color:#3c4043}
html[data-bsp-theme="dark"] body:has(.public-header) .footer-location{border-color:#3c4043}
html[data-bsp-theme="dark"] body:has(.public-header) .footer-links a{color:#bdc1c6}
html[data-bsp-theme="dark"] body:has(.public-header) .footer-links .footer-install-link{color:#8ab4f8!important}
html[data-bsp-theme="dark"] .bsp-install-dialog{background:#303134;color:#e8eaed}
html[data-bsp-theme="dark"] .bsp-install-dialog h2{color:#e8eaed}
html[data-bsp-theme="dark"] .bsp-install-dialog p,html[data-bsp-theme="dark"] .bsp-install-dialog ol{color:#bdc1c6}
html[data-bsp-theme="dark"] .bsp-pwa-close{background:#414349;color:#e8eaed;border-color:#5f6368}
html[data-bsp-theme="dark"] .bsp-install-dialog .bsp-pwa-x{color:#bdc1c6}
html[data-bsp-theme="dark"] .bsp-theme-toggle{background:#303134;color:#e8eaed;border-color:#5f6368}
/* Position: on both homepage and results. Keep mobile search header sticky intact. */
.public-header{position:relative}
.public-header .bsp-theme-toggle{margin-left:auto}
.public-header-home .bsp-theme-toggle{margin-left:auto}
.public-header-results{gap:12px}
@media(max-width:650px){
  .public-header .bsp-theme-toggle{padding:5px 8px;min-height:28px;font-size:10px}
  .public-header-results .bsp-theme-toggle{position:absolute;right:12px;top:64px;z-index:3;margin:0}
  .public-results{padding-top:39px}
  .bsp-admin-top-actions{gap:6px}
  .dashboard .admin-top{gap:10px;flex-wrap:wrap}
  .bsp-theme-toggle{font-size:11px;padding:6px 9px}
}

/* Keep Admin wordmark visibly interactive (V1.12.3 previously made it static). */
.admin-layout > .sidebar .admin-static-title{cursor:pointer;text-decoration:none}
.admin-layout > .sidebar .admin-static-title:hover{color:#1d63df;text-decoration:none}
html[data-bsp-theme="dark"] .admin-layout > .sidebar .admin-static-title:hover{color:#9cc3ff}
html[data-bsp-theme="dark"] .rank-savebar{background:#202833;border-color:#40526a;box-shadow:0 2px 12px #0003}
html[data-bsp-theme="dark"] .rank-savebar .rank-save-status{color:#c8d2e1}
html[data-bsp-theme="dark"] #sortableResultList .rank-position,html[data-bsp-theme="dark"] #sortableResultList .drag-handle,html[data-bsp-theme="dark"] #sortableResultList .rank-step button,html[data-bsp-theme="dark"] #sortableResultList .rank-jump{background:#2a3b52;color:#b6d5ff;border-color:#405875}
html[data-bsp-theme="dark"] #sortableResultList .curation-item.dragging{background:#2c4263}

/* CKS V1.12.15 dark search mobile fix.
   The sticky mobile results form has a higher-specificity white background
   in the base stylesheet; this override follows the explicit theme choice. */
html[data-bsp-theme="dark"] body:has(.public-header) .public-header .search-form,
html[data-bsp-theme="dark"] body:has(.public-header) .public-header-results .results-form,
html[data-bsp-theme="dark"] body:has(.public-header) .public-header .home-search-form {
  background: #303134 !important;
  background-color: #303134 !important;
  border-color: #5f6368 !important;
  box-shadow: none !important;
  color-scheme: dark;
}
html[data-bsp-theme="dark"] body:has(.public-header) .search-form:hover,
html[data-bsp-theme="dark"] body:has(.public-header) .search-form:focus-within {
  background-color: #303134 !important;
  border-color: #74777e !important;
  box-shadow: none !important;
}
html[data-bsp-theme="dark"] body:has(.public-header) .search-form input[type="search"] {
  background: transparent !important;
  background-color: transparent !important;
  color: #e8eaed !important;
  -webkit-text-fill-color: #e8eaed;
  caret-color: #e8eaed;
  border-color: transparent !important;
}
html[data-bsp-theme="dark"] body:has(.public-header) .search-form input[type="search"]::placeholder {
  color: #bdc1c6 !important;
  opacity: 1;
}
html[data-bsp-theme="dark"] body:has(.public-header) .search-form .search-submit {
  color: #8ab4f8;
}
