/* DetectWP - shared stylesheet for generated pages (entity, hosting, guides, top lists, site pages).
   One cached file instead of 11–17 KB of inline CSS per page. Palette matches the React app
   (slate greys, indigo accent). No external fonts. */

:root {
  --bg: #f8fafc; --surface: #ffffff; --ink: #0f172a; --ink-2: #334155; --muted: #64748b; --faint: #94a3b8;
  --line: #e2e8f0; --line-2: #f1f5f9; --accent: #4f46e5; --accent-2: #6366f1; --accent-soft: #eef2ff;
  --violet: #7c3aed; --amber: #d97706; --amber-soft: #fffbeb; --green: #16a34a; --green-soft: #ecfdf5;
  --red: #dc2626; --red-soft: #fef2f2; --radius: 16px; --radius-sm: 10px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
/* Light is the default for everyone; dark only when the visitor picks it with the header toggle
   (public/assets/theme.js sets data-theme="dark" and remembers the choice). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --accent: #818cf8; --accent-2: #a5b4fc;
  --bg: #0b1220; --surface: #111a2e; --ink: #e5e7eb; --ink-2: #cbd5e1; --muted: #94a3b8; --faint: #64748b;
  --line: #1f2a44; --line-2: #18223a; --accent-soft: #1e1b4b; --amber-soft: #2a2410; --green-soft: #0f2a1d; --red-soft: #2a1214;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.6; font-size: 16px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--line-2); padding: 0.1em 0.35em; border-radius: 6px; }
pre { background: var(--line-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; margin: 0 0 1em; overflow-x: auto; font-size: 0.85rem; line-height: 1.55; }
pre code { background: none; padding: 0; border-radius: 0; font-size: inherit; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 0.5em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 800; margin-top: 2.25rem; }
h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.5rem; }
p, ul, ol { margin: 0 0 1em; color: var(--ink-2); }
ul, ol { padding-left: 1.4em; }
li { margin-bottom: 0.35em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 800px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Top affiliate banner */
.promo { background: linear-gradient(90deg, #673de6, #4b2db5); color: #fff; text-align: center; font-size: 0.8rem; padding: 7px 16px; }
.promo a { color: #fff; font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.promo .disc { opacity: 0.75; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); font-size: 18px; }
.brand:hover { text-decoration: none; opacity: 0.85; }
/* Brand mark - same artwork as favicon.svg; identical on every page type */
.dwp-mark { width: 32px; height: 32px; background: linear-gradient(135deg, #4F46E5, #7C3AED); border-radius: 22%; display: inline-flex; flex-shrink: 0; overflow: hidden; }
.dwp-mark svg { display: block; width: 100%; height: 100%; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--ink-2); font-weight: 600; font-size: 0.9rem; padding: 6px 10px; border-radius: 999px; }
.nav a:hover { background: var(--line-2); text-decoration: none; }
.nav .cta { background: var(--accent); color: #fff; }
.nav .cta:hover { background: var(--accent-2); }
@media (max-width: 760px) { .nav a:not(.cta) { display: none; } }

/* Theme toggle */
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; margin: 0 4px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-2); cursor: pointer; flex-shrink: 0; }
.theme-toggle:hover { background: var(--line-2); color: var(--ink); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .nav .cta, :root[data-theme="dark"] .scan-form button { background: #4f46e5; }
:root[data-theme="dark"] .nav .cta:hover, :root[data-theme="dark"] .scan-form button:hover { background: #6366f1; }
:root[data-theme="dark"] .cta-box .scan-form button { background: #fff; color: #4f46e5; }

/* Hero + scanner form */
.hero { padding: 48px 0 28px; }
.hero .eyebrow { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 999px; margin-bottom: 14px; }
.hero .lede { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.scan-form { display: flex; gap: 8px; max-width: 640px; margin: 20px 0 8px; }
.scan-form input { flex: 1; min-width: 0; font: inherit; padding: 13px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); }
.scan-form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 15%, transparent); }
.scan-form button { font: inherit; font-weight: 700; padding: 13px 20px; border: 0; border-radius: 12px; background: var(--accent); color: #fff; cursor: pointer; }
.scan-form button:hover { background: var(--accent-2); }
.scan-note { font-size: 0.8rem; color: var(--faint); }
@media (max-width: 520px) { .scan-form { flex-direction: column; } }

/* Breadcrumbs */
.crumbs { font-size: 0.82rem; color: var(--faint); margin: 20px 0 0; }
.crumbs a { color: var(--muted); }
.crumbs span::before { content: "›"; margin: 0 8px; }

/* Cards + grids */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card h3 { margin-top: 0; }
.card.link { display: block; color: inherit; }
.card.link:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 6px 24px rgba(79,70,229,0.08); }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.stat .k { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); }
.stat .v { font-size: 1.25rem; font-weight: 800; color: var(--ink); margin-top: 2px; }
.stat .s { font-size: 0.78rem; color: var(--muted); }
.badge { display: inline-block; font-size: 0.72rem; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); vertical-align: middle; }
.badge.amber { background: var(--amber-soft); color: var(--amber); }
.badge.green { background: var(--green-soft); color: var(--green); }
.badge.grey { background: var(--line-2); color: var(--muted); }

/* Entity page layout */
.entity-head { display: grid; grid-template-columns: 1fr; gap: 24px; align-items: start; }
@media (min-width: 860px) { .entity-head { grid-template-columns: 1.4fr 1fr; } }
.shot { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line-2); aspect-ratio: 4/3; display: grid; place-items: center; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon { width: 56px; height: 56px; border-radius: 12px; }
.meta { font-size: 0.9rem; color: var(--muted); }
.meta b { color: var(--ink-2); }
.section { margin-top: 2.25rem; }
.prose p, .prose li { font-size: 1.02rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { font-size: 0.75rem; background: var(--line-2); color: var(--muted); padding: 3px 9px; border-radius: 999px; }

/* Ranked lists */
.rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rank-list li { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; }
.rank-list .n { font-weight: 900; color: var(--faint); font-size: 1.1rem; }
.rank-list .name { font-weight: 700; color: var(--ink); }
.rank-list .sub { font-size: 0.82rem; color: var(--muted); }
.rank-list .num { font-weight: 800; color: var(--ink-2); text-align: right; font-size: 0.95rem; white-space: nowrap; }
.rank-list .num small { display: block; font-weight: 600; color: var(--faint); font-size: 0.72rem; }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); }
.faq p { margin: 8px 0 0; }

/* Tables */
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }

/* Callouts */
.callout { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 14px 16px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.25rem 0; }
.callout.warn { border-color: var(--amber); background: var(--amber-soft); }
.cta-box { background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border-radius: var(--radius); padding: 28px; text-align: center; margin-top: 2.5rem; }
.cta-box h2 { color: #fff; margin-top: 0; }
.cta-box p { color: rgba(255,255,255,0.85); }
.cta-box .scan-form { margin: 16px auto 0; }
.cta-box .scan-form button { background: #fff; color: var(--accent); }

/* Footer */
.site-footer { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0 28px; font-size: 0.875rem; color: var(--muted); }
.site-footer .cols { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.site-footer h4 { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--faint); margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }
.site-footer .legal { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 0.78rem; color: var(--faint); }
