/* SmartBoy Search. Static, no scripts, no web fonts. Tokens match the SmartBoy site. */

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --bg-2: #111114;
  --surface: #17171a;
  --surface-2: #1f1f23;
  --line: #26262b;
  --line-2: #34343a;
  --text: #f4f4f5;
  --text-2: #a8a8b0;
  --text-3: #75757e;
  --gold: #d4a537;
  --gold-2: #f2c14e;
  --gold-ink: #1a1305;
  --gold-soft: rgba(212, 165, 55, 0.14);
  --gold-line: rgba(212, 165, 55, 0.38);
  --grad: linear-gradient(135deg, #f2c14e 0%, #d4a537 55%, #a9791e 100%);
  --link: #f2c14e;
  --visited: #c9a45a;
  --mark: rgba(242, 193, 78, 0.2);
  --r: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f8f6f1; --bg-2: #f0ece3; --surface: #ffffff; --surface-2: #f4f1ea; --line: #e6e1d6; --line-2: #d8d1c3;
    --text: #17171a; --text-2: #55555e; --text-3: #85858e;
    --gold: #b8862a; --gold-2: #9c7114; --gold-ink: #fff; --gold-soft: rgba(184, 134, 42, 0.12); --gold-line: rgba(184, 134, 42, 0.4);
    --grad: linear-gradient(135deg, #d9a43a 0%, #b8862a 55%, #8f6516 100%);
    --link: #8a5f0c; --visited: #6f5226; --mark: rgba(217, 164, 58, 0.26);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold-line); outline-offset: 2px; border-radius: 6px; }
code, pre { font-family: var(--mono); font-size: 0.9em; }
img { display: block; }

/* ---------------------------------------------------------------- brand */
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--text); text-decoration: none !important; }
.brand img { filter: drop-shadow(0 6px 18px rgba(212, 165, 55, 0.25)); }
.brand .word { font-family: var(--display); font-weight: 800; letter-spacing: -0.03em; font-size: 40px; line-height: 1; }
.brand .word b { color: var(--gold-2); font-weight: 800; }
.brand .word i { font-style: normal; font-weight: 500; color: var(--text-2); }
.brand-sm { gap: 9px; }
.brand-sm .word { font-size: 20px; }
.brand-sm img { filter: none; }

/* ---------------------------------------------------------------- search box */
.sbox { width: 100%; }
.field { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 5px 5px 20px; transition: border-color .15s, box-shadow .15s; }
.field:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 4px var(--gold-soft); }
.field input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 17px; padding: 9px 0; }
.field input::placeholder { color: var(--text-3); }
.field input::-webkit-search-cancel-button { filter: grayscale(1); }
.field button { border: 0; cursor: pointer; font: inherit; font-weight: 700; font-size: 15px; color: var(--gold-ink); background: var(--grad); border-radius: 999px; padding: 10px 20px; }
.field button:hover { filter: brightness(1.06); }
.big .field { padding: 7px 7px 7px 24px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.big .field input { font-size: 19px; padding: 11px 0; }
.big .field button { padding: 12px 24px; font-size: 16px; }

.cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.big .cats { justify-content: center; }
.cat { position: relative; cursor: pointer; }
.cat input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cat span { display: inline-block; font-size: 13.5px; font-weight: 600; color: var(--text-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 13px; transition: color .12s, border-color .12s, background .12s; }
.cat:hover span { color: var(--text); border-color: var(--text-3); }
.cat input:checked + span { color: var(--gold-2); border-color: var(--gold-line); background: var(--gold-soft); }
.cat input:focus-visible + span { outline: 3px solid var(--gold-line); outline-offset: 2px; }

/* ---------------------------------------------------------------- home */
.home { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 64px 20px 40px; width: min(760px, 100%); margin: 0 auto; }
.home .glow { position: absolute; inset: -10% -30% auto; height: 520px; background: radial-gradient(closest-side, rgba(212, 165, 55, 0.16), transparent 70%); pointer-events: none; z-index: -1; }
.home .brand { flex-direction: column; gap: 16px; }
.home .brand .word { font-size: 46px; }
.tag { color: var(--text-2); font-size: 17px; margin: 14px 0 30px; }
.count { color: var(--text-3); font-size: 14px; margin: 26px 0 0; }
.points { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; color: var(--text-3); font-size: 13.5px; }
.points li::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); margin-right: 8px; vertical-align: 2px; }

/* ---------------------------------------------------------------- top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-in { width: min(1080px, 100% - 32px); margin: 0 auto; padding: 12px 0; display: flex; align-items: flex-start; gap: 24px; }
.top-in .brand { margin-top: 9px; flex: none; }
.top .sbox { max-width: 680px; }
.top .cats { margin-top: 10px; }

/* ---------------------------------------------------------------- results */
.res { flex: 1; width: min(1080px, 100% - 32px); margin: 0 auto; padding: 18px 0 40px; }
.res > * { max-width: 700px; margin-left: 233px; }
.meta { color: var(--text-3); font-size: 13.5px; margin-top: 0; margin-bottom: 18px; }
.meta .most { color: var(--gold); }
.hits { list-style: none; padding: 0; margin-top: 0; margin-bottom: 0; }
.hit { padding: 4px 0 20px; }
.src { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin-bottom: 2px; }
.src .site { font-weight: 600; color: var(--text); }
.badge { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: var(--gold-2); background: var(--gold-soft); border: 1px solid var(--gold-line); border-radius: 999px; padding: 0 8px; line-height: 18px; }
.date { color: var(--text-3); }
.hit h3 { margin: 0; font-family: var(--display); font-size: 19px; font-weight: 650; line-height: 1.3; letter-spacing: -0.01em; }
.hit h3 a { color: var(--link); }
.hit h3 a:visited { color: var(--visited); }
.url { font-size: 12.5px; color: var(--text-3); margin: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.snip { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
mark { background: var(--mark); color: var(--text); border-radius: 3px; padding: 0 2px; }
.pager { display: flex; gap: 10px; margin-top: 8px; }
.btn-ghost { display: inline-block; font-weight: 600; font-size: 14px; color: var(--text); border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 18px; }
.btn-ghost:hover { border-color: var(--gold-line); color: var(--gold-2); text-decoration: none; }
.empty { text-align: center; padding: 40px 0; }
.empty img { margin: 0 auto 10px; border-radius: 50%; }
.empty h2 { font-family: var(--display); font-size: 22px; margin: 6px 0 8px; }
.empty p { color: var(--text-2); max-width: 520px; margin: 0 auto; }

/* ---------------------------------------------------------------- doc pages */
.doc { flex: 1; width: min(820px, 100% - 32px); margin: 0 auto; padding: 32px 0 48px; }
.doc h1 { font-family: var(--display); font-size: 34px; letter-spacing: -0.02em; margin: 0 0 10px; }
.doc h2 { font-family: var(--display); font-size: 21px; margin: 32px 0 10px; }
.doc .lead { color: var(--text-2); font-size: 17px; margin: 0 0 18px; }
.doc p, .doc li { color: var(--text-2); }
.doc pre { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; overflow-x: auto; color: var(--text); line-height: 1.5; }
.doc :not(pre) > code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--text); }
.params { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 8px 0; }
.params th, .params td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line); }
.params th { color: var(--text-3); font-weight: 600; font-size: 13px; }
.params td:first-child { white-space: nowrap; }
.params td { color: var(--text-2); }
.group { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 10px 0; }
.group summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font-weight: 650; }
.group summary::-webkit-details-marker { display: none; }
.group summary::after { content: "+"; color: var(--gold); font-weight: 700; margin-left: 12px; }
.group[open] summary::after { content: "−"; }
.group summary .n { margin-left: auto; color: var(--text-3); font-weight: 500; font-size: 13.5px; }
.sitelist { list-style: none; margin: 0; padding: 0 18px 12px; }
.sitelist li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid var(--line); }
.sitelist .host { color: var(--text-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitelist .n { margin-left: auto; color: var(--text-3); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--line); padding: 22px 16px 28px; text-align: center; color: var(--text-3); font-size: 13px; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-bottom: 8px; }
.foot nav a { color: var(--text-2); }
.foot p { margin: 0; }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 860px) {
  .res > * { margin-left: 0; }
}
@media (max-width: 640px) {
  .top-in { flex-direction: column; gap: 10px; }
  .top-in .brand { margin-top: 0; }
  .home { padding-top: 40px; }
  .home .brand .word { font-size: 36px; }
  .home .brand img { width: 72px; height: 72px; }
  .tag { font-size: 15.5px; margin-bottom: 22px; }
  .field button { padding: 9px 16px; }
  .big .field { padding-left: 18px; }
  .big .field input { font-size: 17px; }
  .cats { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .big .cats { justify-content: flex-start; }
  .cats::-webkit-scrollbar { display: none; }
  .cat span { white-space: nowrap; }
  .doc h1 { font-size: 28px; }
}
