/* PageSourceSearch public UI: the search page, results, preview, match list, about and help. Layered on site.css
   (base tokens, inputs, buttons, tags, banners). Look: white page, Inter, near-black type with tight headlines,
   pill buttons, soft grey (#f5f5f5) panels with large radii, a green accent for state. Dark by the system setting. */

:root {
    --bg: #ffffff;
    --panel: #ffffff;
    --panel-2: #f5f5f5;
    --ink: #171717;
    --muted: #6b6b6b;
    --faint: #929292;
    --line: #e8e8e8;
    --line-strong: #d4d4d4;
    --accent: #171717;
    --accent-ink: #ffffff;
    --link: #171717;
    --result-link: #1a0dab;          /* result URLs: the blue a search result is expected to have */
    --result-link-visited: #681da8;
    --green: #06ba61;
    --green-soft: #e6f8ee;
    --code-bg: #f0f0f0;
    --tag-bg: #efefef;
    --snippet-bg: #f5f5f5;
    --mark: #ffe58a;
    --mark-current: #ffc53d;
    --row-line: #ececec;
    --accent-soft: #f0f0f0;
    --accent-line: #cfcfcf;
    --focus: rgba(23, 23, 23, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --radius: 16px;
    --radius-sm: 10px;
    --pill: 999px;
    --gutter: 24px;
    --max: 1160px;
    --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
    :root:has(body.public) {
        --bg: #0a0a0a;
        --panel: #121212;
        --panel-2: #171717;
        --ink: #f2f2f2;
        --muted: #a3a3a3;
        --faint: #737373;
        --line: #262626;
        --line-strong: #333333;
        --accent: #f5f5f5;
        --accent-ink: #0a0a0a;
        --link: #f2f2f2;
        --result-link: #8ab4f8;
        --result-link-visited: #c58af9;
        --green: #22c55e;
        --green-soft: #0f2a1a;
        --code-bg: #1f1f1f;
        --tag-bg: #262626;
        --snippet-bg: #161616;
        --mark: #6b5300;
        --mark-current: #a67c00;
        --row-line: #232323;
        --accent-soft: #1f1f1f;
        --accent-line: #404040;
        --focus: rgba(255, 255, 255, 0.14);
        --ok: #4ade80;
        --bad: #f87171;
        --warn: #fbbf24;
        --shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.6);
        color-scheme: dark;
    }
    body.public code { background: var(--code-bg); }
    body.public .tag { background: var(--tag-bg); color: var(--ink); }
    body.public .tag.warn { background: #4a3a05; color: var(--warn); }
    body.public .banner.error { background: #3b1513; border-color: #7f2a24; }
    body.public .banner.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--ink); }
    body.public input[type=text], body.public input[type=date], body.public select, body.public button { background: var(--panel); color: var(--ink); border-color: var(--line-strong); }
    body.public button.primary, body.public .button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
    body.public button.primary:hover, body.public .button.primary:hover { background: #ffffff; border-color: #ffffff; color: #0a0a0a; }
    body.public .results .notes { background: #3a2e08; border-color: #6b5300; color: #fbbf24; }
    body.public details.vendor { background: #1a1a10; border-color: #4a3a05; }
    body.public details.vendor > summary { color: #fbbf24; }
    body.public details.vendor pre.src { background: #171710; }
    body.public .src .row:target { background: #2c2a10; }
    body.public .tag.kind-html { background: #0c3a52; color: #7dd3fc; }
    body.public .tag.kind-js, body.public .tag.kind-inline_js { background: #4a3305; color: #fcd34d; }
    body.public details.filters-panel .count { color: var(--green); }
}

/* base */
body.public { font-family: var(--sans); background: var(--bg); color: var(--ink); min-height: 100vh; display: flex; flex-direction: column; -webkit-font-smoothing: antialiased; font-size: 15px; line-height: 1.5; }
body.public main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 24px var(--gutter) 64px; }
body.public h1 { font-size: 28px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; }
body.public h2 { text-transform: none; letter-spacing: -0.015em; font-size: 20px; color: var(--ink); font-weight: 600; margin: 0 0 10px; }
body.public h3 { font-size: 16px; font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
body.public a { color: var(--link); }
body.public a:hover { text-decoration: underline; text-underline-offset: 3px; }
body.public code { background: var(--code-bg); border-radius: 4px; padding: 1px 5px; }
body.public :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
body.public input[type=text], body.public input[type=date], body.public select { border-color: var(--line-strong); border-radius: var(--radius-sm); }
body.public input:focus { outline: 3px solid var(--focus); border-color: var(--ink); }
body.public button { border-radius: var(--pill); border-color: var(--line-strong); font-weight: 500; }
body.public button:hover { border-color: var(--ink); color: var(--ink); }
body.public button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
body.public button.primary:hover { background: #000; border-color: #000; color: #fff; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -48px; z-index: 100; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); border-radius: var(--pill); }
.skip:focus { top: 8px; text-decoration: none; }
.button { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border: 1px solid var(--line-strong); border-radius: var(--pill); color: var(--ink); background: var(--panel); font-weight: 500; line-height: 1.3; white-space: nowrap; }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.button:hover { text-decoration: none; border-color: var(--ink); }
.button.primary:hover { background: #000; border-color: #000; }
.muted { color: var(--muted); }

/* top bar */
body.public .topbar { position: sticky; top: 0; z-index: 20; height: auto; padding: 0; gap: 0; display: block; border-bottom: 1px solid transparent; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); transition: border-color 0.2s; }
body.public .topbar.scrolled { border-bottom-color: var(--line); }
.topbar-inner { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); height: 72px; display: flex; align-items: center; gap: 28px; }
body.public .topbar .brand { display: inline-flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 650; letter-spacing: -0.02em; color: var(--ink); }
.mark { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: -0.04em; }
body.public .topbar nav { gap: 4px; margin: 0 auto; }
body.public .topbar nav a { padding: 8px 12px; border-radius: var(--pill); color: var(--muted); font-weight: 500; font-size: 15px; white-space: nowrap; }
body.public .topbar nav a:hover { color: var(--ink); text-decoration: none; }
body.public .topbar nav a[aria-current=page] { color: var(--ink); background: var(--panel-2); }
.topbar-cta { display: flex; gap: 8px; }
.topbar-cta .button { padding: 8px 16px; font-size: 14px; }

/* hero (home page, before a search) */
.hero { padding: 56px 0 28px; max-width: 820px; margin: 0 auto; text-align: center; }
.hero .badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 22px; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel); color: var(--muted); font-size: 13px; font-weight: 500; box-shadow: var(--shadow); }
.hero .badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
body.public .hero h1 { font-size: 64px; line-height: 1.02; letter-spacing: -0.04em; margin: 0 0 20px; font-weight: 600; text-wrap: balance; }
body.public .hero .lede { font-size: 20px; line-height: 1.5; color: var(--muted); margin: 0 auto; max-width: 42em; text-wrap: pretty; }
body.public .hero .lede strong { color: var(--ink); font-weight: 600; }
.lede { font-size: 17px; line-height: 1.55; color: var(--muted); margin: 0 0 8px; max-width: 68ch; }

/* search form */
form.searchbox { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 20px; box-shadow: var(--shadow); }
form.searchbox.hero-form { padding: 16px 18px; box-shadow: var(--shadow-lg); max-width: 900px; margin: 0 auto 40px; }
form.searchbox .qrow { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; }
form.searchbox .qrow input[type=text] { flex: 1 1 320px; min-width: 0; font-family: var(--mono); font-size: 15px; padding: 11px 14px; border-radius: var(--radius-sm); }
form.searchbox.hero-form .qrow input[type=text] { font-size: 16px; padding: 13px 16px; }
form.searchbox .qrow button.primary { padding: 0 24px; font-weight: 600; font-size: 15px; }
form.searchbox .mode { display: inline-flex; margin: 0; padding: 3px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel-2); }
form.searchbox .mode legend { display: none; }
form.searchbox .mode label { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
form.searchbox .mode input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
form.searchbox .mode span { display: inline-block; padding: 7px 16px; border-radius: var(--pill); font-weight: 500; color: var(--muted); user-select: none; line-height: 1.4; white-space: nowrap; }
form.searchbox .mode input:checked + span { background: var(--panel); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
form.searchbox .mode input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }
details.filters-panel { margin-top: 12px; }
details.filters-panel > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; color: var(--muted); font-size: 13.5px; padding: 4px 0; user-select: none; }
details.filters-panel > summary::-webkit-details-marker { display: none; }
details.filters-panel > summary::before { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s; margin-left: 2px; }
details.filters-panel[open] > summary::before { transform: rotate(45deg); }
details.filters-panel .summary-label { color: var(--ink); font-weight: 500; }
details.filters-panel .count { padding: 2px 9px; border-radius: var(--pill); background: var(--green-soft); color: #067a41; font-size: 12px; font-weight: 600; }
details.filters-panel .summary-hint { color: var(--faint); }
details.filters-panel[open] .summary-hint { display: none; }
form.searchbox .filters { display: flex; gap: 12px 18px; align-items: center; flex-wrap: wrap; margin-top: 12px; color: var(--muted); font-size: 13.5px; }
form.searchbox .filters label { display: inline-flex; gap: 6px; align-items: center; }
form.searchbox .filters .radios { display: inline-flex; gap: 10px; align-items: center; }
form.searchbox .filters .radios label { gap: 4px; color: var(--ink); }
form.searchbox .filters input[type=radio] { margin: 0; accent-color: var(--ink); }
form.searchbox .filters input[type=text] { width: 170px; }
form.searchbox .filters select, form.searchbox .filters input[type=date] { font: inherit; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--panel); color: var(--ink); }
form.searchbox .filters label.all { margin-left: auto; }
form.searchbox .filters input[type=checkbox] { margin: 0; accent-color: var(--ink); }
form.searchbox .hint { margin-top: 12px; color: var(--faint); }
form.searchbox.compact .hint { display: none; }

/* the search job's progress panel (search.js) */
.progress-panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 20px; box-shadow: var(--shadow); }
.progress-head { display: flex; align-items: center; gap: 12px; }
.progress-head .stage { font-weight: 600; }
.progress-head .elapsed { font-family: var(--mono); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.progress-head .cancel { margin-left: auto; padding: 5px 14px; font-size: 13px; }
.progress-panel .detail { margin: 8px 0 12px; color: var(--muted); }
.progress-panel .bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; position: relative; }
.progress-panel .fill { height: 100%; border-radius: 3px; background: var(--green); transition: width 0.3s; }
.progress-panel .fill.indeterminate { position: absolute; width: 30%; animation: progress-slide 1.2s ease-in-out infinite; }
@keyframes progress-slide { 0% { left: -30%; } 100% { left: 100%; } }
.progress-panel .steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; gap: 6px; font-size: 12px; color: var(--faint); }
.progress-panel .steps li { display: flex; align-items: center; gap: 6px; }
.progress-panel .steps li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--line-strong); }
.progress-panel .steps li.done { color: var(--muted); }
.progress-panel .steps li.done::before { background: var(--green); }
.progress-panel .steps li.now { color: var(--ink); font-weight: 500; }
.progress-panel .steps li.now::before { background: var(--ink); box-shadow: 0 0 0 3px var(--panel-2); }
.progress-panel .steps li + li { margin-left: 8px; }
.progress-panel .tip { margin: 12px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel-2); color: var(--muted); font-size: 13px; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line-strong); border-top-color: var(--ink); border-radius: 50%; animation: spin 0.8s linear infinite; flex: 0 0 auto; }
@keyframes spin { to { transform: rotate(360deg); } }

/* examples and the home sections */
.examples { margin: 0 auto 56px; text-align: center; }
body.public .examples h2 { margin-bottom: 12px; font-size: 14px; color: var(--faint); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; }
ul.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
a.chip { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: var(--pill); background: var(--panel); color: var(--ink); box-shadow: var(--shadow); transition: border-color 0.15s, transform 0.15s; }
a.chip:hover { border-color: var(--ink); text-decoration: none; transform: translateY(-1px); }
a.chip code { background: none; padding: 0; font-size: 13px; }
a.chip .chip-mode { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }

/* how to query: one line per rule, the query first, then what it finds */
.syntax { max-width: 860px; margin: 0 auto 56px; }
body.public .syntax h2 { margin-bottom: 12px; font-size: 14px; color: var(--faint); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; text-align: center; }
ul.syntax-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: var(--shadow); }
ul.syntax-list li { display: grid; grid-template-columns: minmax(180px, 260px) 1fr; gap: 6px 16px; align-items: baseline; padding: 10px 16px; border-top: 1px solid var(--line); }
ul.syntax-list li:first-child { border-top: 0; }
ul.syntax-list a { color: var(--ink); text-decoration: none; }
ul.syntax-list a:hover code { text-decoration: underline; text-underline-offset: 3px; }
ul.syntax-list code { background: none; padding: 0; font-size: 13.5px; white-space: pre; }
ul.syntax-list .mode { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); margin-left: 8px; }
ul.syntax-list .what { grid-column: 2; color: var(--muted); font-size: 14px; }
.syntax .section-more { text-align: center; margin: 12px 0 0; font-size: 14px; }
@media (max-width: 640px) {
    ul.syntax-list li { grid-template-columns: 1fr; gap: 2px; }
    ul.syntax-list .what { grid-column: 1; }
}
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0 0 56px; }
.feature { background: var(--panel-2); border-radius: var(--radius); padding: 24px 24px 22px; }
body.public .feature h3 { margin-bottom: 8px; }
.feature p { margin: 0; color: var(--muted); line-height: 1.55; }
.uses, .how, .faq-mini { margin: 0 0 24px; }
.faq-mini { max-width: 820px; margin-left: auto; margin-right: auto; }
.uses { margin: 0 0 8px; }
body.public .uses h2, .how h2, .faq-mini h2 { font-size: 28px; letter-spacing: -0.03em; margin-bottom: 14px; }
body.public .section-lede { max-width: 62ch; margin: -6px 0 18px; color: var(--muted); font-size: 16px; line-height: 1.55; }

.use-list { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.use-list li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin: 0; }
.use-list li strong { display: block; margin-bottom: 4px; }
.use-list li, .steps li { margin: 8px 0; line-height: 1.6; color: var(--muted); }
.use-list strong, .steps strong { color: var(--ink); }
.how { background: var(--panel-2); border-radius: 24px; padding: 36px 40px; margin: 40px 0; }
.how ol.steps { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; counter-reset: step; }
.how ol.steps li { counter-increment: step; margin: 0; padding-top: 6px; }
.how ol.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-family: var(--mono); font-size: 12px; color: var(--faint); margin-bottom: 10px; letter-spacing: 0.08em; }
.faq-mini dl { margin: 0; }
.faq-mini dt, .faq dt { font-weight: 600; margin: 16px 0 4px; }
.faq-mini dd, .faq dd { margin: 0 0 4px; color: var(--muted); line-height: 1.6; }
.faq-mini > p { margin: 18px 0 0; }

/* results */
.results .summary { margin: 0 0 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 14px; }
.tag { border-radius: var(--pill); }
.tag.warn { background: #fdf1d6; color: #8a5a00; }
.tag.kind-html { background: #e0f2fe; color: #075985; }
.tag.kind-js, .tag.kind-inline_js { background: #fef3c7; color: #92400e; }
.results .notes { margin: 0 0 14px; padding: 10px 14px 10px 30px; background: #fdf6e3; border: 1px solid #f0dfae; border-radius: var(--radius-sm); color: #6b4a00; }
.results .notes li { margin: 2px 0; }
.results .empty { background: var(--panel-2); border-radius: var(--radius); padding: 22px 24px; margin: 12px 0; max-width: 720px; }
body.public .banner { border-radius: var(--radius-sm); padding: 12px 16px; }
body.public .banner.error { background: #fdf2f1; border-color: #f3c6c1; color: #9f2418; }
.results .empty .none { margin: 0 0 8px; }
.results .empty ul { margin: 0 0 10px; padding-left: 20px; color: var(--muted); }
.results .empty p:last-child { margin: 0; }
.domain { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 20px 10px; margin-bottom: 14px; }
body.public .domain h2 { font-size: 17px; margin-bottom: 6px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.domain h2 .name { font-family: var(--mono); font-weight: 600; letter-spacing: 0; }
.domain h2 .rank { font-weight: 400; font-size: 12px; color: var(--faint); }
.resource { border-top: 1px solid var(--row-line); padding: 12px 0; }
.resource:first-of-type { border-top: 0; }
.res-head { display: flex; gap: 8px 14px; align-items: flex-start; font-size: 13px; }
.res-meta { flex: 1 1 0; min-width: 0; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.res-head .url { font-family: var(--mono); word-break: break-all; }
body.public .res-head a.url, body.public .loaded-by a, body.public a.show-all, body.public .preview-head h1.url a { color: var(--result-link); }
body.public .res-head a.url:visited, body.public .loaded-by a:visited, body.public .preview-head h1.url a:visited { color: var(--result-link-visited); }
.res-head .preview, ul.matches .where { color: var(--ink); }
.res-head .preview { flex: 0 0 auto; padding: 3px 12px; border: 1px solid var(--line-strong); border-radius: var(--pill); font-weight: 500; font-size: 12.5px; }
.res-head .preview:hover { text-decoration: none; border-color: var(--ink); }
.loaded-by { margin: 2px 0 4px; font-size: 12.5px; word-break: break-all; color: var(--faint); }
.loaded-by a { margin-right: 8px; }
ul.matches { list-style: none; margin: 8px 0 0; padding: 0; }
ul.matches li { display: flex; gap: 12px; align-items: baseline; margin: 4px 0; }
code.snippet { flex: 1; white-space: pre-wrap; word-break: break-all; background: var(--snippet-bg); padding: 6px 10px; border-radius: var(--radius-sm); font-size: 12.5px; line-height: 1.5; }
code.snippet mark, .src mark { background: var(--mark); color: inherit; padding: 0; border-radius: 2px; }
ul.matches .where { white-space: nowrap; font-size: 12px; color: var(--muted); font-family: var(--mono); }
ul.matches .where:hover { color: var(--ink); }
.more { color: var(--muted); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 20px 0; }
.pager a { padding: 8px 18px; border: 1px solid var(--line-strong); border-radius: var(--pill); background: var(--panel); font-weight: 500; }
.pager a:hover { border-color: var(--ink); text-decoration: none; }

/* preview and match list */
.crumbs { font-size: 13px; color: var(--muted); margin: 0 0 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; }
.crumbs code { background: none; padding: 0; }
.preview-head { display: block; }
body.public .preview-head h1.url { font-family: var(--mono); font-size: 15px; font-weight: 500; word-break: break-all; letter-spacing: 0; }
.preview-head .meta { display: flex; gap: 12px; flex-wrap: wrap; margin: 8px 0 0; font-size: 13px; }
.preview-head .matches-line { margin: 8px 0 0; }
.match-nav { position: sticky; top: 84px; z-index: 10; float: right; display: inline-flex; align-items: center; gap: 6px; margin: 0 0 8px 12px; padding: 5px 8px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--pill); box-shadow: var(--shadow-lg); font-size: 12.5px; }
.match-nav button { padding: 2px 10px; line-height: 1.5; }
.match-nav .pos { font-family: var(--mono); font-variant-numeric: tabular-nums; min-width: 6ch; text-align: center; }
.match-nav .keys { font-family: var(--mono); font-size: 11px; }
.preview { clear: both; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; padding: 8px 0; }
pre.src { margin: 0; font-family: var(--mono); font-size: 12.5px; line-height: 1.5; tab-size: 4; white-space: pre; }
.src .row { display: inline; }   /* the renderer ends every row with a newline: a block row would double-space the file */
.src .row:target { background: #fff6cc; }
.src .n { display: inline-block; width: 6ch; margin-right: 1ch; padding-right: 8px; text-align: right; color: var(--faint); border-right: 1px solid var(--line); user-select: none; }
.src .row.cont .n { opacity: 0.45; }
.src mark:target, .src mark.current { outline: 2px solid var(--ink); background: var(--mark-current); }
details.vendor { border-top: 1px solid #f0dfae; border-bottom: 1px solid #f0dfae; background: #fffaf0; }
details.vendor > summary { cursor: pointer; padding: 3px 14px; font-family: var(--mono); font-size: 12px; color: #8a5a00; user-select: none; }
details.vendor[open] > summary { border-bottom: 1px dashed #f0dfae; }
details.vendor pre.src { background: #fffdf7; }

/* about and help */
.prose { max-width: 760px; margin: 16px auto 0; }
body.public .prose h1 { margin-bottom: 12px; font-size: 40px; letter-spacing: -0.035em; text-wrap: balance; }
body.public .prose h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -0.02em; scroll-margin-top: 88px; }
body.public .prose h3 { font-size: 16px; margin: 18px 0 4px; }
.prose p, .prose li { line-height: 1.65; }
.prose ul { padding-left: 22px; }
.prose > .lede { font-size: 18px; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 8px; padding: 0; font-size: 13.5px; }
.toc a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--pill); color: var(--muted); font-weight: 500; }
.toc a:hover { color: var(--ink); border-color: var(--ink); text-decoration: none; }
pre.ua { font-family: var(--mono); font-size: 12.5px; background: var(--panel-2); padding: 12px 14px; border-radius: var(--radius-sm); white-space: pre-wrap; word-break: break-all; margin: 6px 0 10px; }
.prose dl.faq dt { scroll-margin-top: 88px; }

/* status pages (404, 500) */
.status-page { max-width: 560px; margin: 80px auto; text-align: center; }
.status-page .status-code { font-family: var(--mono); color: var(--faint); font-size: 13px; margin: 0 0 8px; letter-spacing: 0.1em; }
body.public .status-page h1 { font-size: 36px; margin-bottom: 10px; letter-spacing: -0.03em; text-wrap: balance; }
.status-page p { color: var(--muted); }
.status-page .button { margin: 8px 4px 0; }

/* footer */
.foot { border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 14px; }
.foot-inner { max-width: var(--max); margin: 0 auto; padding: 40px var(--gutter) 44px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.foot-col a { display: block; color: var(--muted); margin: 6px 0; }
.foot-col a:hover { color: var(--ink); }
.foot-col p { margin: 0 0 8px; line-height: 1.55; max-width: 40ch; }
.foot-brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 650; letter-spacing: -0.02em; font-size: 16px; }
.foot-head { color: var(--ink); font-weight: 600; }

/* small screens */
@media (max-width: 900px) {
    .topbar-cta .button.secondary { display: none; }
}
@media (max-width: 900px) {
    .topbar-inner { gap: 16px; }
    body.public .topbar nav a { padding: 6px 9px; font-size: 14px; }
}

@media (max-width: 720px) {
    :root { --gutter: 16px; }
    .topbar-inner { gap: 12px; height: 60px; }
    body.public .topbar nav { gap: 0; margin: 0 0 0 auto; }
    body.public .topbar nav a { padding: 6px 8px; white-space: nowrap; font-size: 13.5px; }
    .topbar-cta { display: none; }
    .hero { padding: 28px 0 18px; }
    body.public .hero h1 { font-size: 38px; }
    body.public .hero .lede { font-size: 16px; }
    .lede { font-size: 15px; }
    form.searchbox, form.searchbox.hero-form { padding: 12px; }
    form.searchbox .qrow input[type=text] { flex-basis: 100%; }
    form.searchbox .mode { flex: 1; }
    form.searchbox .mode label { flex: 1; }
    form.searchbox .mode span { width: 100%; text-align: center; }
    form.searchbox .qrow button.primary { flex: 1; padding: 10px 16px; }
    form.searchbox .filters label { width: 100%; justify-content: space-between; }
    form.searchbox .filters .radios { width: 100%; }
    form.searchbox .filters .radios label { width: auto; }
    form.searchbox .filters input[type=text], form.searchbox .filters select, form.searchbox .filters input[type=date] { width: 60%; }
    form.searchbox .filters label.all { margin-left: 0; justify-content: flex-start; gap: 8px; }
    details.filters-panel .summary-hint { display: none; }
    .how { padding: 24px 20px; border-radius: 18px; }
    body.public .uses h2, .how h2, .faq-mini h2 { font-size: 24px; }
    ul.matches li { flex-direction: column; gap: 2px; }
    ul.matches .where { white-space: normal; }
    .res-head { flex-wrap: wrap; }
    .use-list { grid-template-columns: 1fr; }
    body.public .prose h1 { font-size: 30px; }
    .foot-inner { grid-template-columns: 1fr; gap: 20px; }
    .match-nav { float: none; margin: 0 0 8px; }
}
@media (max-width: 480px) {
    body.public .topbar .brand { font-size: 0; gap: 0; }   /* the mark alone; the text is still the accessible name */
    body.public .topbar .brand .mark { font-size: 11px; }
    body.public .topbar nav a { padding: 6px 6px; }
}

@media (prefers-reduced-motion: reduce) {
    details.filters-panel > summary::before, a.chip, body.public .topbar, .progress-panel .fill { transition: none; }
    .progress-panel .fill.indeterminate { animation: none; width: 100%; left: 0; opacity: 0.4; }
    .spinner { animation: none; }
}

@media print {
    body.public .topbar, .foot, form.searchbox, .match-nav, .skip { display: none; }
    body.public main { padding: 0; max-width: none; }
    .domain, .preview { border-color: #999; }
}

/* ---- technology pages ------------------------------------------------ */
.tech-index, .tech-page { max-width: 960px; }
body.public .eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tech-list { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.tech-list li { margin: 0; }
body.public a.tech-card { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
body.public a.tech-card:hover { border-color: var(--ink); box-shadow: var(--shadow); text-decoration: none; }
.tech-card .tech-name { font-weight: 600; font-size: 16px; }
.tech-card .tech-count { color: var(--green); font-size: 13px; font-weight: 500; }
.tech-card .tech-desc { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.tech-card .tech-key { margin-top: 6px; align-self: flex-start; font-size: 12px; background: var(--panel-2); padding: 3px 8px; border-radius: 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tech-page .keyword { background: var(--panel-2); border-radius: var(--radius); padding: 22px 24px; margin: 24px 0 32px; }
.tech-page .keyword h2 { margin-top: 0; }
.tech-page .keyword-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 12px 0; }
.tech-page code.discovery { font-size: 16px; padding: 8px 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; word-break: break-all; }
.tech-page .keyword .button.primary { margin: 0; }
table.tech-sites { margin: 16px 0 24px; font-size: 14px; }
table.tech-sites th, table.tech-sites td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tech-sites thead th { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
table.tech-sites td.n, table.tech-sites td.rank { font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
table.tech-sites td.site a { font-weight: 600; color: var(--ink); }
table.tech-sites td.where { max-width: 360px; }
table.tech-sites td.where .tag { margin-right: 8px; vertical-align: middle; }
table.tech-sites td.where a.url { display: inline-block; max-width: calc(100% - 70px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; font-family: var(--mono); font-size: 12.5px; color: var(--muted); }
table.tech-sites td.view { white-space: nowrap; text-align: right; }
table.tech-sites td.view a { color: var(--result-link); font-size: 13px; }
.tech-page pre.snippet-example { white-space: pre-wrap; word-break: break-all; }
.tech-teaser { margin: 0 auto 56px; text-align: center; }
.tech-teaser .section-lede { margin-left: auto; margin-right: auto; }
.tech-teaser .chips { justify-content: center; }
body.public .chip.more { border-style: dashed; }
@media (max-width: 720px) {
    table.tech-sites td.where { display: none; }
    table.tech-sites th:nth-child(4) { display: none; }
}

/* site profiles and reverse lookups (/site, /id, /hosts) */
.profile-lookup, .profile, .ids-hub, .ids-page, .hosts-hub, .host-page { max-width: 960px; }
form.lookup { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
form.lookup input[type=text] { flex: 1 1 260px; min-width: 0; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--pill); font: inherit; background: var(--panel); }
form.lookup select { padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--pill); font: inherit; background: var(--panel); max-width: 100%; }
form.lookup .button { margin: 0; }
.site-teaser { max-width: 860px; margin: 0 auto 56px; }
.site-teaser form.lookup { max-width: 620px; }
.profile-facts { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 8px; font-size: 14px; }
.profile-facts .external { margin-left: auto; }
.profile section { margin-top: 8px; }
table.profile-table { width: 100%; table-layout: auto; }
table.profile-table td.mono, table.profile-table .mono, .timeline .mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
table.profile-table td.view { white-space: nowrap; }
table.profile-table td.versions a { display: inline-block; margin: 2px 10px 2px 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.profile-table td.versions a:first-child { font-weight: 600; }
table.profile-table .tag { margin-right: 4px; }
code.discovery { font-size: 0.8em; padding: 4px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; word-break: break-all; }
ol.timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); }
ol.timeline > li { position: relative; margin: 0 0 26px; }
ol.timeline > li::before { content: ""; position: absolute; left: -29px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--panel); border: 2px solid var(--ink); }
body.public ol.timeline h3 { margin: 0 0 2px; font-size: 17px; display: flex; gap: 10px; align-items: baseline; }
ol.timeline > li > p { margin: 0 0 8px; font-size: 14px; }
details.changes { margin: 4px 0; font-size: 14px; }
details.changes > summary { cursor: pointer; font-weight: 500; }
details.changes ul { margin: 4px 0 8px; padding-left: 18px; }
details.changes li { line-height: 1.5; }
.banner.version { margin: 0 0 12px; }
