/* The SEO Detective — design system. Dark theme by default; [data-theme="light"] overrides tokens. */

:root {
  --bg: #0a1020;
  --bg-2: #0d1529;
  --surface: #111a2e;
  --surface-2: #16213a;
  --surface-3: #1c2945;
  --border: #212e4a;
  --border-strong: #2d3d60;
  --text: #e7edf6;
  --text-2: #aab6ca;
  --muted: #7f8ca5;
  --accent: #3b8cff;
  --accent-strong: #2a74e8;
  --accent-soft: rgba(59, 140, 255, .14);
  --accent-ink: #ffffff;
  --good: #22c38e;
  --fair: #f2b33d;
  --poor: #f0525b;
  --sev-critical: #f0525b;
  --sev-high: #f5813f;
  --sev-medium: #f2b33d;
  --sev-low: #7aa7e6;
  --sev-info: #8794ab;
  --sev-pass: #22c38e;
  --grid-line: rgba(120, 150, 210, .07);
  --glow: rgba(59, 140, 255, .18);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -12px rgba(0, 0, 0, .55);
  --radius: 14px;
  --radius-sm: 9px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --bg-2: #eef2f8;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #edf1f8;
  --border: #e1e7f0;
  --border-strong: #cdd6e4;
  --text: #0d1526;
  --text-2: #435069;
  --muted: #6b7890;
  --accent: #1d6ef5;
  --accent-strong: #165bd0;
  --accent-soft: rgba(29, 110, 245, .09);
  --good: #0c9a6a;
  --fair: #b7791f;
  --poor: #d63441;
  --sev-critical: #d63441;
  --sev-high: #d7651f;
  --sev-medium: #b7791f;
  --sev-low: #3d72c4;
  --sev-info: #6b7890;
  --sev-pass: #0c9a6a;
  --grid-line: rgba(30, 60, 120, .06);
  --glow: rgba(29, 110, 245, .10);
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 10px 28px -14px rgba(16, 24, 40, .18);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 650; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2.05rem); }
h3 { font-size: 1.08rem; }
p { margin: 0 0 1em; }
code, pre { font-family: var(--mono); font-size: .88em; }
code { background: var(--surface-3); padding: .1em .35em; border-radius: 5px; }
pre { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; }
pre code { background: none; padding: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.accent-text { color: var(--accent); }

.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 860px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 10px;
  padding: 10px 18px; font: 600 .95rem/1.2 var(--font); border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s; text-decoration: none !important; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: 7px 14px; font-size: .88rem; }
.btn-lg { padding: 0 24px; font-size: 1rem; min-height: 48px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--border);
  background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { color: var(--text); background: var(--surface-2); }
:root[data-theme="light"] .i-sun, :root:not([data-theme="light"]) .i-moon { display: none; }

/* ---------- header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  background: color-mix(in srgb, var(--bg) 82%, transparent); border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none !important; }
.brand .logo-mark { color: var(--text); width: 30px; height: 30px; flex: none; }
.brand-name { font-weight: 600; letter-spacing: -.02em; font-size: 1.05rem; white-space: nowrap; }
.brand-name b { color: var(--accent); font-weight: 700; }
.main-nav { display: flex; gap: 24px; margin-right: auto; }
.main-nav a { color: var(--text-2); font-size: .93rem; font-weight: 500; }
.main-nav a:hover { color: var(--text); text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 820px) { .main-nav { display: none; } }
@media (max-width: 420px) { .brand-name { font-size: .95rem; } .header-actions .btn { display: none; } }

.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); padding: 48px 0 28px; margin-top: 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-brand p { color: var(--muted); margin-top: 10px; font-size: .92rem; }
.footer-nav { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-nav h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; font-weight: 600; }
.footer-nav a { display: block; color: var(--text-2); font-size: .93rem; margin-bottom: 8px; }
.footer-legal { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); }
.footer-legal p { color: var(--muted); font-size: .82rem; margin: 0; }

/* ---------- shared bits ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px;
}
.lede { font-size: 1.15rem; color: var(--text-2); max-width: 40em; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 rgba(34, 195, 142, .6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 195, 142, .55); } 70% { box-shadow: 0 0 0 9px rgba(34, 195, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 195, 142, 0); } }
.section { padding: 88px 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p:not(.eyebrow) { color: var(--text-2); font-size: 1.05rem; }
@media (max-width: 640px) { .section { padding: 60px 0; } }

.sev {
  display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: .72rem; font-weight: 650;
  letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; flex: none;
  background: color-mix(in srgb, currentColor 12%, transparent);
}
.sev-critical { color: var(--sev-critical); } .sev-high { color: var(--sev-high); } .sev-medium { color: var(--sev-medium); }
.sev-low { color: var(--sev-low); } .sev-info { color: var(--sev-info); } .sev-pass { color: var(--sev-pass); }
.fill-critical { fill: var(--sev-critical); } .fill-high { fill: var(--sev-high); } .fill-medium { fill: var(--sev-medium); }
.fill-low { fill: var(--sev-low); } .fill-info { fill: var(--sev-info); }
.tone-text-good { color: var(--good); } .tone-text-fair { color: var(--fair); } .tone-text-poor { color: var(--poor); } .tone-text-none { color: var(--muted); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 9px; margin-bottom: 12px; }

/* score ring and bars */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { display: block; }
.ring-track { stroke: var(--surface-3); }
.ring-value { stroke: var(--muted); transition: stroke-dashoffset .8s ease; }
.ring.tone-good .ring-value { stroke: var(--good); } .ring.tone-fair .ring-value { stroke: var(--fair); } .ring.tone-poor .ring-value { stroke: var(--poor); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-num { font-size: 2.3rem; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.ring-cap { font-size: .72rem; color: var(--muted); margin-top: 4px; }
.bar { display: block; width: 100%; height: 6px; }
.bar-track { fill: var(--surface-3); }
.bar-value { fill: var(--muted); }
.bar.tone-good .bar-value { fill: var(--good); } .bar.tone-fair .bar-value { fill: var(--fair); } .bar.tone-poor .bar-value { fill: var(--poor); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: 84px 0 92px; border-bottom: 1px solid var(--border); }
.hero-grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 70% 20%, var(--glow), transparent 70%),
    linear-gradient(var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: linear-gradient(to bottom, #000 40%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent);
}
.hero-inner { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .85fr); gap: 56px; align-items: center; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { margin-bottom: 30px; }
.hero-points { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: .9rem; }
.hero-points li { display: flex; align-items: center; gap: 8px; }
.hero-points li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; gap: 40px; } .hero { padding: 56px 0 64px; } }

.investigate { width: 100%; }
.investigate-field {
  display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 14px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
}
.investigate-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.investigate-icon { color: var(--muted); flex: none; }
.investigate input {
  flex: 1; min-width: 0; height: 48px; border: 0; background: transparent; color: var(--text); font: 500 1.05rem var(--font); outline: none;
}
.investigate input::placeholder { color: var(--muted); font-weight: 400; }
.form-error { margin: 12px 0 0; color: var(--poor); font-size: .93rem; font-weight: 500; }
.spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.investigate.is-busy .spinner { display: inline-block; }
.investigate.is-busy button { pointer-events: none; opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 560px) {
  .investigate-field { flex-wrap: wrap; padding: 8px; }
  .investigate-icon { display: none; }
  .investigate input { flex-basis: 100%; height: 44px; padding: 0 6px; }
  .investigate .btn { width: 100%; }
}

.case-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.case-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.case-tag { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.case-host { font-family: var(--mono); font-size: .88rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; }
.case-score { display: flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.case-grade { font-size: 1.3rem; font-weight: 650; margin: 0 0 4px; }
.case-meta { color: var(--muted); font-size: .88rem; margin: 0; }
.cat-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.cat-list li { display: grid; grid-template-columns: 9.5em 1fr 2.2em; align-items: center; gap: 12px; font-size: .9rem; color: var(--text-2); }
.cat-list b { text-align: right; font-weight: 650; }
.case-link { font-weight: 600; font-size: .93rem; }

/* ---------- example report ---------- */
.example { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs button {
  flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 18px; border: 0;
  border-bottom: 2px solid transparent; background: none; color: var(--text-2); font: 600 .93rem var(--font); cursor: pointer; white-space: nowrap;
}
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); background: var(--surface-2); }
.tab-score { font-weight: 700; }
.tab-panel { padding: 8px 24px 20px; }
.mini-findings { list-style: none; margin: 0; padding: 0; }
.mini-findings li { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--border); }
.mini-findings li:last-child { border-bottom: 0; }
.mini-findings .sev { margin-top: 2px; min-width: 76px; justify-content: center; }
.mf-title { font-weight: 600; margin: 0 0 4px; }
.mf-fix { color: var(--text-2); font-size: .92rem; margin: 0; }
.panel-foot { color: var(--muted); font-size: .88rem; margin: 12px 0 0; }
.empty { color: var(--muted); padding: 16px 0; margin: 0; }

.severity-panel {
  margin-top: 28px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 24px 40px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.severity-panel p { color: var(--text-2); }
.sev-stack svg { width: 100%; height: 14px; border-radius: 7px; overflow: hidden; display: block; background: var(--surface-3); }
.sev-legend { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 10px 18px; }
.sev-legend li { display: flex; align-items: center; gap: 8px; }
.sev-defs { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: 0; padding-top: 22px; border-top: 1px solid var(--border); }
.sev-defs dt { margin-bottom: 8px; }
.sev-defs dd { margin: 0; color: var(--text-2); font-size: .88rem; }
@media (max-width: 900px) { .severity-panel { grid-template-columns: 1fr; } .sev-defs { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sev-defs { grid-template-columns: 1fr; } .tab-panel { padding: 4px 16px 16px; } .mini-findings li { flex-direction: column; gap: 8px; } }

/* ---------- how / checks / features ---------- */
.steps-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps-grid li { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; position: relative; }
.steps-grid p { color: var(--text-2); font-size: .94rem; margin: 0; }
.step-num { display: block; font-family: var(--mono); font-size: .8rem; color: var(--accent); margin-bottom: 18px; }
@media (max-width: 960px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } }

.check-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.check-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.check-icon { color: var(--accent); margin-bottom: 14px; }
.check-card h3 { display: flex; align-items: center; gap: 8px; }
.check-card .count { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--surface-3); border-radius: 999px; padding: 1px 8px; }
.check-card ul { list-style: none; padding: 0; margin: 14px 0 0; }
.check-card li { font-size: .89rem; color: var(--text-2); padding: 6px 0; border-top: 1px solid var(--border); }
@media (max-width: 1040px) { .check-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .check-grid { grid-template-columns: 1fr; } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.feature { background: var(--surface); padding: 28px; }
.feature p { color: var(--text-2); font-size: .94rem; margin: 0; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.roadmap > div { border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 24px; }
.roadmap p { color: var(--text-2); font-size: .92rem; margin: 0; }
.roadmap-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .roadmap { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .roadmap { grid-template-columns: 1fr; } }

.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; font-weight: 600; font-size: 1.04rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.4rem; color: var(--muted); font-weight: 400; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--text-2); padding-bottom: 12px; }

.cta { text-align: center; background: radial-gradient(60% 100% at 50% 0%, var(--glow), transparent 70%); }
.cta p { color: var(--text-2); font-size: 1.08rem; }
.cta .investigate { max-width: 680px; margin: 28px auto 0; text-align: left; }

/* ---------- live investigation ---------- */
.investigation { padding-top: 56px; }
.live { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.live-head h1 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 6px; overflow-wrap: anywhere; }
.live-url { color: var(--muted); font-family: var(--mono); font-size: .85rem; overflow-wrap: anywhere; }
.live-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 24px 0; }
.live-stats > div { background: var(--surface-2); padding: 14px 16px; }
.stat-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.stat-value { font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.live-queue { color: var(--fair); font-weight: 500; }
.live-error { margin: 20px 0 0; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--poor) 45%, transparent); background: color-mix(in srgb, var(--poor) 10%, transparent); color: var(--text); }
.live-note { color: var(--muted); }
.step-list { list-style: none; margin: 0; padding: 0; }
.step { display: grid; grid-template-columns: 26px minmax(0, 15em) minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 11px 0; border-top: 1px solid var(--border); }
.step:first-child { border-top: 0; }
.step-icon { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; align-self: center; color: var(--muted); }
.step-dot { width: 8px; height: 8px; border-radius: 50%; border: 2px solid var(--border-strong); }
.step-label { font-weight: 550; }
.step-detail { color: var(--text-2); font-size: .9rem; font-family: var(--mono); overflow-wrap: anywhere; }
.step-pending .step-label { color: var(--muted); }
.step-running .step-icon { border: 2px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.step-running .step-dot { display: none; }
.step-running .step-label { color: var(--accent); }
.step-done .step-icon { color: var(--good); background: color-mix(in srgb, var(--good) 14%, transparent); }
.step-failed .step-icon { color: var(--poor); background: color-mix(in srgb, var(--poor) 14%, transparent); }
.step-skipped .step-icon { color: var(--muted); background: var(--surface-3); }
.step-skipped .step-label { color: var(--muted); }
.step-list.compact .step { padding: 8px 0; }
@media (max-width: 640px) {
  .live { padding: 22px 18px; }
  .step { grid-template-columns: 26px minmax(0, 1fr); }
  .step-detail { grid-column: 2; }
  .live-stats .stat-value { font-size: 1.15rem; }
}
.retry { margin-top: 32px; }
.retry h2 { font-size: 1.2rem; }
.partial-findings { margin-top: 40px; }
.partial-findings h2 { font-size: 1.2rem; }

/* ---------- report ---------- */
.report-head { padding: 48px 0 32px; border-bottom: 1px solid var(--border); background: var(--bg-2); }
.report-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.report-title h1 { font-size: clamp(1.8rem, 4vw, 2.7rem); margin-bottom: 6px; overflow-wrap: anywhere; }
.report-url { font-family: var(--mono); font-size: .86rem; color: var(--text-2); overflow-wrap: anywhere; margin: 0; }
.report-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.overview { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; margin: 28px 0 0; }
.overview > div { background: var(--surface); padding: 12px 16px; }
.overview dt { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.overview dd { margin: 2px 0 0; font-weight: 650; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
@media (max-width: 1000px) { .overview { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .overview { grid-template-columns: repeat(2, 1fr); } }

.report-body { padding-top: 40px; }
.score-panel { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.score-main { display: flex; gap: 26px; align-items: center; }
.score-main h2 { font-size: 1.45rem; margin-bottom: 2px; }
.score-grade { font-weight: 650; font-size: 1.05rem; margin-bottom: 10px; }
.score-main .muted { font-size: .88rem; margin: 0; }
.cat-scores { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: center; }
.cat-scores a { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); background: var(--surface-2); text-decoration: none; }
.cat-scores a:hover { border-color: var(--border-strong); }
.cat-scores .bar { grid-column: 1 / -1; }
.cat-name { font-size: .9rem; color: var(--text-2); font-weight: 500; }
.cat-num { font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
@media (max-width: 900px) { .score-panel { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .score-main { flex-direction: column; align-items: flex-start; } .cat-scores { grid-template-columns: 1fr; } }

.facts { margin-top: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; display: grid; gap: 12px; }
.facts > div:not(.facts-row) span:last-child { overflow-wrap: anywhere; }
.facts-row { display: flex; flex-wrap: wrap; gap: 8px 26px; color: var(--text-2); font-size: .92rem; padding-top: 12px; border-top: 1px solid var(--border); }
.facts-row b { color: var(--text); }

.priority { margin-top: 20px; border: 1px solid color-mix(in srgb, var(--poor) 35%, var(--border)); background: color-mix(in srgb, var(--poor) 5%, var(--surface)); border-radius: var(--radius); padding: 20px 24px; }
.priority h2 { font-size: 1.15rem; }
.priority ol { margin: 0; padding-left: 1.2em; }
.priority li { padding: 5px 0; }
.priority .sev { margin-right: 6px; vertical-align: 1px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 36px 0 8px; position: sticky; top: 64px; z-index: 5; padding: 12px 0; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2); font: 600 .84rem var(--font); cursor: pointer; }
.chip span { color: var(--muted); font-weight: 600; }
.chip:hover { color: var(--text); }
.chip.is-active { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.chip-plain { margin-left: auto; }

.cat-section { margin-top: 36px; }
.cat-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.cat-head h2 { font-size: 1.35rem; margin: 0; }
.cat-head-score { font-weight: 700; font-size: 1.2rem; }
.cat-head-score small { font-size: .7em; color: var(--muted); font-weight: 600; }
.cat-head .muted { margin-left: auto; font-size: .88rem; }

.finding { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; }
.finding[open] { border-color: var(--border-strong); }
.finding > summary { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; list-style: none; }
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin-left: 4px; flex: none; transition: transform .15s; }
.finding[open] > summary::after { transform: rotate(225deg); }
.finding .sev { min-width: 76px; justify-content: center; }
.finding-title { font-weight: 600; flex: 1; min-width: 0; }
.kind { font-size: .75rem; color: var(--muted); font-weight: 600; white-space: nowrap; }
.kind-problem { color: var(--text-2); }
.finding-body { padding: 4px 18px 18px 108px; color: var(--text-2); }
.finding-body > p { margin-bottom: 14px; }
.fix { border-left: 3px solid var(--accent); background: var(--accent-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin-bottom: 14px; }
.fix h4, .evidence h4 { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 4px; }
.fix p { color: var(--text); margin: 0; }
.finding-meta { display: grid; gap: 6px; margin: 0 0 14px; font-size: .9rem; }
.finding-meta > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 10px; }
.finding-meta dt { color: var(--muted); }
.finding-meta dd { margin: 0; overflow-wrap: anywhere; }
.evidence { font-size: .88rem; }
.ev-url { font-family: var(--mono); font-size: .92em; overflow-wrap: anywhere; color: var(--text); }
.ev-null { color: var(--muted); }
.ev-dl { display: grid; grid-template-columns: minmax(8em, max-content) 1fr; gap: 4px 14px; margin: 0; }
.ev-dl dt { color: var(--muted); }
.ev-dl dd { margin: 0; overflow-wrap: anywhere; min-width: 0; }
.ev-list { margin: 0; padding-left: 1.1em; }
.ev-list li { overflow-wrap: anywhere; }
.ev-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
.ev-table { border-collapse: collapse; width: 100%; font-size: .86rem; }
.ev-table th, .ev-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
.ev-table th { color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.ev-table tr:last-child td { border-bottom: 0; }
.ev-table td { overflow-wrap: anywhere; min-width: 6em; }
.ev-more { color: var(--muted); margin: 6px 0 0; }
.raw { margin-top: 12px; }
.raw summary, .ev-inline summary { cursor: pointer; color: var(--muted); font-size: .84rem; }
.raw pre { max-height: 360px; margin-top: 8px; font-size: .8rem; }
@media (max-width: 640px) {
  .finding > summary { flex-wrap: wrap; gap: 8px 12px; padding: 12px 14px; }
  .finding-title { flex-basis: 100%; order: 3; }
  .finding-body { padding: 4px 14px 16px; }
  .finding-meta > div { grid-template-columns: 1fr; gap: 0; }
  .ev-dl { grid-template-columns: 1fr; }
  .ev-dl dt { margin-top: 6px; }
}
.passed { margin-top: 8px; }
.passed > summary { cursor: pointer; color: var(--good); font-weight: 600; font-size: .92rem; padding: 8px 0; }
.passed ul { list-style: none; padding: 0; margin: 4px 0 0; display: grid; gap: 2px; }
.passed li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; padding: 6px 0; font-size: .92rem; color: var(--text-2); }
.passed li svg { color: var(--good); margin-top: 3px; }
.passed .ev-inline { grid-column: 2; }
.passed .ev-inline .evidence { padding: 8px 0 4px; }
.is-filtered-out { display: none !important; }

.log { margin-top: 48px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.log h2 { font-size: 1.15rem; margin-bottom: 2px; }

/* scan mode choice under the investigate field */
.scan-mode { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.mode-opt { flex: 1 1 240px; display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--surface) 70%, transparent); cursor: pointer; font-size: .9rem; }
.mode-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mode-opt input { appearance: none; -webkit-appearance: none; flex: none; width: 17px; height: 17px; margin: 2px 0 0; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-content: center; background: var(--surface); }
.mode-opt input::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform .12s; }
.mode-opt input:checked { border-color: var(--accent); }
.mode-opt input:checked::before { transform: scale(1); }
.mode-opt input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mode-opt b { display: block; font-weight: 600; }
.mode-opt small { color: var(--text-2); font-size: .82rem; }
.mode-opt select { font: inherit; font-size: .82rem; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 6px; padding: 0 4px; }
.cta .scan-mode { text-align: left; }

/* ---------- SEO tools ---------- */
.main-nav a[aria-current="page"] { color: var(--text); }
.tools-hero { padding-top: 64px; }
.tools-hero h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tool-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; color: var(--text); text-decoration: none !important; transition: border-color .15s, transform .15s; }
.tool-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.tool-card h2 { font-size: 1.05rem; margin: 12px 0 6px; }
.tool-card p { color: var(--text-2); font-size: .9rem; margin: 0 0 14px; flex: 1; }
.tool-card-go { color: var(--accent); font-weight: 600; font-size: .88rem; }
.tool-icon { color: var(--accent); flex: none; }
@media (max-width: 960px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tool-grid { grid-template-columns: 1fr; } }

.tool-hero { position: relative; overflow: hidden; padding: 40px 0 56px; border-bottom: 1px solid var(--border); }
.tool-hero-inner { position: relative; }
.breadcrumb { font-size: .86rem; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--text-2); }
.tool-title { display: flex; align-items: center; gap: 12px; }
.tool-title .tool-icon { width: 30px; height: 30px; }
.tool-title h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.tool-hero .lede { margin: 14px 0 26px; }
.tool-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.field { display: grid; gap: 6px; font-size: .85rem; color: var(--text-2); font-weight: 500; }
.field input, .field select, .field textarea { height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 .95rem var(--font); padding: 0 12px; }
.field textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tool-note { color: var(--muted); font-size: .85rem; margin: 16px 0 0; }
@media (max-width: 560px) { .tool-fields { grid-template-columns: 1fr; } }
.tool-doc h2 { font-size: 1.25rem; margin-top: 1.6em; }
.section:has(> .tool-doc) { padding-top: 56px; }
.tool-doc .tool-cols h2 { margin-top: 0; }
.tool-doc p { color: var(--text-2); }
.tool-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
@media (max-width: 760px) { .tool-cols { grid-template-columns: 1fr; } }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding: 7px 0 7px 26px; color: var(--text-2); border-bottom: 1px solid var(--border); font-size: .95rem; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: 14px; width: 10px; height: 6px; border-left: 2px solid var(--good); border-bottom: 2px solid var(--good); transform: rotate(-45deg); }
.related-tools { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.related-tools a { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 550; font-size: .92rem; text-decoration: none; }
.related-tools a:hover { border-color: var(--accent); }
.related-tools .tool-icon { width: 18px; height: 18px; }
@media (max-width: 760px) { .related-tools { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .related-tools { grid-template-columns: 1fr; } }

.tool-result-head .breadcrumb { margin-bottom: 10px; }
.tool-result-head h1 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.tool-live { max-width: 860px; }
.tool-summary { grid-template-columns: repeat(4, 1fr); margin: 0 0 20px; }
@media (max-width: 760px) { .tool-summary { grid-template-columns: repeat(2, 1fr); } }
.notice { padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--fair) 45%, transparent); background: color-mix(in srgb, var(--fair) 9%, transparent); color: var(--text); }
.tool-panel { margin-top: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; }
.tool-panel h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tool-panel h3 { font-size: .98rem; margin: 18px 0 8px; }
.tool-panel > .muted { font-size: .88rem; }
.tool-panel .ev-table-wrap + .ev-table-wrap { margin-top: 14px; }
@media (max-width: 640px) { .tool-panel { padding: 18px 16px; } }
.tool-foot { margin-top: 28px; font-size: .85rem; }
.kv-table th { width: 30%; white-space: normal; }
code.wrap { overflow-wrap: anywhere; }
.tick { color: var(--good); font-weight: 700; }
.filters-static { position: static; margin: 0 0 12px; padding: 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }

.serp { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px 18px; background: var(--surface-2); max-width: 640px; }
.serp p { margin: 0; }
.serp-url { font-size: .82rem; color: var(--text-2); }
.serp-title { font-size: 1.2rem; color: #8ab4f8; line-height: 1.35; margin: 4px 0 !important; }
:root[data-theme="light"] .serp-title { color: #1a0dab; }
.serp-desc { font-size: .9rem; color: var(--text-2); }

.level-bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 520px; }
.level-bars li { display: grid; grid-template-columns: 2.4em 1fr 2.4em; align-items: center; gap: 12px; font-weight: 600; }
.level-bars b { text-align: right; }
.bar.tone-none .bar-value { fill: var(--accent); }
.outline { list-style: none; margin: 0; padding: 0; }
.outline li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.outline-tag { font-family: var(--mono); font-size: .75rem; color: var(--accent); background: var(--accent-soft); border-radius: 5px; padding: 1px 6px; flex: none; }
.outline-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.outline .outline-l2 { padding-left: 22px; } .outline .outline-l3 { padding-left: 44px; } .outline .outline-l4 { padding-left: 66px; }
.outline .outline-l5 { padding-left: 88px; } .outline .outline-l6 { padding-left: 110px; }
.outline li.is-skip .outline-tag { color: var(--sev-low); }
@media (max-width: 560px) { .outline .outline-l3, .outline .outline-l4, .outline .outline-l5, .outline .outline-l6 { padding-left: 44px; } }

.sd-item { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; background: var(--surface-2); }
.sd-item header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sd-item h3 { margin: 0; }
.sd-errors, .sd-warnings { margin: 10px 0 0; padding-left: 1.2em; font-size: .92rem; }
.sd-errors li { color: var(--text); } .sd-errors li::marker { color: var(--sev-medium); }
.sd-warnings li { color: var(--text-2); }
.sd-props { margin: 10px 0 0; font-size: .85rem; overflow-wrap: anywhere; }

.robots-groups { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.robots-group { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2); min-width: 0; }
.robots-group h3 { margin: 0 0 6px; font-size: .92rem; font-family: var(--mono); overflow-wrap: anywhere; }
.robots-rules { list-style: none; margin: 0; padding: 0; font-size: .86rem; max-height: 280px; overflow: auto; }
.robots-rules li { padding: 2px 0; overflow-wrap: anywhere; }
.robots-rules .is-allow b { color: var(--good); } .robots-rules .is-disallow b { color: var(--sev-high); }
.robots-body { max-height: 420px; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 760px) { .robots-groups { grid-template-columns: 1fr; } }

.hops { list-style: none; margin: 0; padding: 0; }
.hop { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); position: relative; }
.hop:last-child { border-bottom: 0; }
.hop-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 650; font-size: .85rem; }
.hop-body { min-width: 0; flex: 1; }
.hop-body p { margin: 0 0 4px; }
.hop-error { color: var(--poor); font-size: .9rem; }
.headers-table td.hv { font-family: var(--mono); font-size: .82rem; }
.name-list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.link-table td:first-child { min-width: 16em; }
@media (max-width: 640px) {
  .link-table thead { display: none; }
  .link-table tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px; border-bottom: 1px solid var(--border); }
  .link-table tr[hidden] { display: none; }
  .link-table td { border: 0; padding: 0; min-width: 0 !important; }
  .link-table td:first-child { grid-column: 1 / -1; }
  .link-table td:nth-child(3)::before { content: "HTTP "; color: var(--muted); }
}

.kw-target { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; background: var(--surface-2); }
.kw-target header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.kw-target h3 { margin: 0; }
.kw-target p { margin: 10px 0 0; font-size: .9rem; }
.zone-chips { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 6px; }
.zone-chips li { font-size: .8rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--muted); }
.zone-chips li.is-on { color: var(--good); border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 10%, transparent); }
.kw-suggest { margin: 10px 0 0; padding-left: 1.2em; font-size: .9rem; color: var(--text-2); }
.tool-panel .tabs { margin: 8px 0 0; border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.tool-panel .tab-panel { padding: 0; }
.tool-panel .tab-panel .ev-table-wrap { border-radius: 0 0 8px 8px; }
.kw-table td, .kw-table th { text-align: center; }
.kw-table td:first-child, .kw-table th:first-child { text-align: left; }

/* ---------- crawl report ---------- */
.site-structure { margin-top: 28px; }
.site-structure .cat-head a { margin-left: auto; font-size: .9rem; }
.structure-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.structure-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.structure-card h3 { font-size: .95rem; margin-bottom: 12px; }
.structure-card .muted { font-size: .82rem; margin: 10px 0 0; }
.depth-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.depth-bars li { display: grid; grid-template-columns: 1.6em 1fr 2.6em; gap: 10px; align-items: center; font-size: .85rem; }
.depth-bars b { text-align: right; }
.depth-bars .bar .bar-value { fill: var(--accent); }
.stat-list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 16px; }
.stat-list li { display: flex; align-items: center; gap: 6px; }
.mini-dl { margin: 0; display: grid; gap: 6px; font-size: .86rem; }
.mini-dl div { display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid var(--border); padding-top: 6px; }
.mini-dl dt { color: var(--muted); }
.mini-dl dd { margin: 0; font-weight: 600; }
.top-linked { margin: 0; padding-left: 1.2em; font-size: .86rem; }
.top-linked li { padding: 3px 0; }
.top-linked li > span { display: inline-block; max-width: calc(100% - 3em); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-family: var(--font); }
.top-linked b { float: right; }
@media (max-width: 960px) { .structure-grid { grid-template-columns: 1fr; } }
.pages-table td:first-child { min-width: 22em; }
.issue-chips a { display: inline-block; font-size: .74rem; border: 1px solid var(--border-strong); border-radius: 999px; padding: 1px 8px; margin: 2px 4px 2px 0; color: var(--text-2); white-space: nowrap; }
.issue-chips a:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.tag-mini { font-size: .72rem; color: var(--good); border: 1px solid color-mix(in srgb, var(--good) 40%, transparent); border-radius: 999px; padding: 0 7px; }
.pager { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 24px 0 0; font-size: .92rem; }
.pager .is-disabled { color: var(--muted); }
.pager-pos { color: var(--text-2); }
a.chip { text-decoration: none; }

/* ---------- accounts ---------- */
.small { font-size: .85rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--poor); color: #fff; }
.btn-danger:hover { background: color-mix(in srgb, var(--poor) 85%, #000); }
.btn[disabled] { opacity: .6; cursor: not-allowed; }
.hide-sm { }
@media (max-width: 560px) { .hide-sm { display: none !important; } }
.stack { display: grid; gap: 14px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--text-2); cursor: pointer; }
.check input { margin-top: 3px; accent-color: var(--accent); flex: none; }
.radio-row { border: 0; padding: 0; margin: 0; display: grid; gap: 8px; }
.auth { padding-top: 56px; }
.auth-card { max-width: 440px; margin: 0 auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 1.8rem; }
.auth-card .muted { margin-bottom: 20px; }
.auth-foot { margin: 18px 0 0; font-size: .9rem; text-align: center; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 360px); gap: 40px; justify-content: center; align-items: start; }
.auth-grid .auth-card { margin: 0; }
.auth-aside h2 { font-size: 1.15rem; margin-top: 8px; }
@media (max-width: 860px) { .auth-grid { grid-template-columns: 1fr; } .auth-card { padding: 24px 18px; } }
.flashes { padding-top: 18px; display: grid; gap: 8px; }
.flash { margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); }
.flash-success { border-color: color-mix(in srgb, var(--good) 50%, transparent); background: color-mix(in srgb, var(--good) 10%, var(--surface)); }
.flash-error { border-color: color-mix(in srgb, var(--poor) 50%, transparent); background: color-mix(in srgb, var(--poor) 10%, var(--surface)); }
.flash-info { border-color: color-mix(in srgb, var(--accent) 45%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }

/* header account menu */
.notif-btn { position: relative; }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--poor); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); font-weight: 700; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 8px; z-index: 60; display: grid; }
.menu-panel a, .menu-panel button { display: block; text-align: left; padding: 8px 10px; border-radius: 7px; color: var(--text); font: 500 .92rem var(--font); background: none; border: 0; cursor: pointer; text-decoration: none; width: 100%; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--surface-2); }
.menu-who { margin: 0 0 6px; padding: 6px 10px 10px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: .9rem; overflow-wrap: anywhere; }

/* ---------- dashboard ---------- */
.dash { padding-top: 40px; }
.dash h1 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
.dash-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dash-head h1 { margin-bottom: 4px; }
.dash-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.dash-nav a { padding: 10px 14px; color: var(--text-2); font-weight: 550; font-size: .93rem; border-bottom: 2px solid transparent; white-space: nowrap; text-decoration: none; }
.dash-nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.dash-grid .panel { margin-top: 0; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px 24px; margin-top: 20px; min-width: 0; }
.panel h2 { font-size: 1.15rem; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.panel-head a { font-size: .9rem; }
.panel-danger { border-color: color-mix(in srgb, var(--poor) 35%, var(--border)); }
.plan-panel p { margin: 0; color: var(--text-2); font-size: .92rem; }
@media (max-width: 640px) { .panel { padding: 18px 16px; } }
.empty-state { text-align: center; padding: 18px 10px; }
.empty-state p { color: var(--text-2); }
.verify-notice { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.verify-notice p { margin: 0; }
.site-list { list-style: none; margin: 0; padding: 0; }
.site-row { display: grid; grid-template-columns: 3em 1fr auto; gap: 14px; align-items: center; padding: 10px 6px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none !important; border-radius: 8px; }
.site-row:hover { background: var(--surface-2); }
.site-score { font-size: 1.4rem; font-weight: 700; text-align: center; }
.site-name { display: grid; min-width: 0; }
.site-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark polyline { stroke: var(--muted); }
.spark circle { fill: var(--muted); }
.spark.tone-good polyline { stroke: var(--good); } .spark.tone-good circle { fill: var(--good); }
.spark.tone-fair polyline { stroke: var(--fair); } .spark.tone-fair circle { fill: var(--fair); }
.spark.tone-poor polyline { stroke: var(--poor); } .spark.tone-poor circle { fill: var(--poor); }
.spark-empty { font-size: .8rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-top: 14px; }
.inline-form .field { flex: 1 1 220px; }
.usage { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 10px; }
.usage li { display: grid; grid-template-columns: 12em 1fr 5em; gap: 12px; align-items: center; font-size: .9rem; }
.usage b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .usage li { grid-template-columns: 1fr 4em; } .usage .bar { grid-column: 1 / -1; grid-row: 2; } }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: .92rem; flex-wrap: wrap; }
.site-overview { grid-template-columns: repeat(6, 1fr); margin: 0 0 4px; }
.site-overview small { font-size: .75em; }
@media (max-width: 1000px) { .site-overview { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .site-overview { grid-template-columns: repeat(2, 1fr); } }
.dash .report-actions form { display: inline; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif { display: grid; grid-template-columns: 12px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.notif:last-child { border-bottom: 0; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 7px; background: var(--sev-info); }
.notif-warning .notif-dot { background: var(--sev-medium); } .notif-critical .notif-dot { background: var(--sev-critical); }
.notif.is-unread .notif-title { font-weight: 700; }
.notif-title { margin: 0 0 4px; font-weight: 550; overflow-wrap: anywhere; }
.notif-meta { margin: 4px 0 0; font-size: .8rem; }
.notif-items { margin: 0; padding-left: 1.1em; font-size: .88rem; color: var(--text-2); }
.notif-items li { overflow-wrap: anywhere; padding: 1px 0; }
.notif-items .lvl-critical::marker { color: var(--sev-critical); } .notif-items .lvl-warning::marker { color: var(--sev-medium); }
.notif-items .lvl-critical { color: var(--text); }
.notif-items.big { font-size: .95rem; }
.notif-items.big li { padding: 4px 0; }
.notif-list.compact .notif { padding: 9px 0; }

.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--border); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
/* the chart scales down with its viewBox: larger user-unit text keeps labels readable on phones */
@media (max-width: 560px) { .chart .axis { font-size: 22px; } }
.chart polyline { stroke-width: 1.6; stroke-linejoin: round; opacity: .55; }
.chart polyline.s0 { stroke-width: 2.6; opacity: 1; }
.chart .s0 { stroke: var(--accent); fill: var(--accent); } .chart polyline.s0 { fill: none; }
.chart .s1 { stroke: #a78bfa; fill: #a78bfa; } .chart .s2 { stroke: #22c38e; fill: #22c38e; } .chart .s3 { stroke: #f2b33d; fill: #f2b33d; } .chart .s4 { stroke: #f0525b; fill: #f0525b; }
.chart polyline.s1, .chart polyline.s2, .chart polyline.s3, .chart polyline.s4 { fill: none; }
.chart-legend { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .85rem; color: var(--text-2); }
.chart-legend .key { display: inline-block; width: 12px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.key.s0 { background: var(--accent); } .key.s1 { background: #a78bfa; } .key.s2 { background: #22c38e; } .key.s3 { background: #f2b33d; } .key.s4 { background: #f0525b; }
.uptime-strip { display: flex; gap: 2px; height: 34px; align-items: stretch; }
.uptime-strip span { flex: 1; min-width: 2px; border-radius: 2px; background: var(--good); opacity: .85; }
.uptime-strip span.fail { background: var(--poor); opacity: 1; }
.compare-scores td:first-child { font-weight: 550; }

/* ---------- reports: export, share, AI ---------- */
.export-menu > summary { list-style: none; }
.export-menu > summary::-webkit-details-marker { display: none; }
.export-menu .menu-panel { min-width: 230px; }
.share-panel .activity form { display: inline; }
.prepared-by { margin: 0 0 8px; color: var(--text-2); font-size: .95rem; }
.ai-panel { border-color: color-mix(in srgb, var(--accent) 35%, var(--border)); }
.ai-tasks { display: grid; gap: 12px; margin-top: 12px; }
.ai-task { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; background: var(--surface-2); }
.ai-task > header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ai-task h3 { margin: 0 0 2px; font-size: 1rem; }
.ai-task header p { margin: 0; }
.ai-state { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; }
.ai-error { color: var(--poor); margin: 10px 0 0; font-size: .9rem; }
.spinner-inline { width: 14px; height: 14px; border: 2px solid var(--accent-soft); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
.prose { margin-top: 12px; color: var(--text); font-size: .95rem; }
.prose h3, .prose h4, .prose h5 { font-size: 1rem; margin: 1.1em 0 .4em; }
.prose p { margin: 0 0 .7em; color: var(--text-2); }
.prose ul, .prose ol { margin: 0 0 .8em; padding-left: 1.3em; color: var(--text-2); }
.prose li { margin-bottom: .3em; }
.prose strong { color: var(--text); }
.prose pre { max-height: 360px; }

/* ---------- comparisons ---------- */
.domain-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.domain-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; min-width: 0; }
.domain-card.is-primary { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.domain-card h2 { font-size: 1rem; overflow-wrap: anywhere; margin-bottom: 10px; }
.domain-card .eyebrow { margin-bottom: 6px; }
.domain-card .ring-num { font-size: 1.7rem; }
.domain-card p { margin: 8px 0 0; font-size: .88rem; }
.opps { list-style: none; margin: 0; padding: 0; }
.opps li { display: flex; gap: 14px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.opps li:last-child { border-bottom: 0; }
.opps .sev { min-width: 74px; justify-content: center; margin-top: 2px; }
.hbars { list-style: none; margin: 16px 0 6px; padding: 0; display: grid; gap: 10px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 14em) 1fr 6em; gap: 12px; align-items: center; font-size: .9rem; }
.hbars li.is-primary .hb-label { font-weight: 700; color: var(--text); }
.hb-label { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbars svg { width: 100%; height: 10px; display: block; }
.hb-track { fill: var(--surface-3); }
.hb-value { fill: var(--muted); }
.hbars li.is-primary .hb-value { fill: var(--accent); }
.hb-value.is-best { fill: var(--good) !important; }
.hbars b { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .hbars li { grid-template-columns: 1fr 5em; } .hbars svg { grid-column: 1 / -1; grid-row: 2; } }
.compare-table th.is-primary, .compare-table td.is-primary { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.compare-table td.is-best { color: var(--good); font-weight: 700; }
.compare-table .group-row th { background: var(--surface-3); color: var(--text); text-transform: none; font-size: .85rem; letter-spacing: 0; }
.compare-table td:first-child { color: var(--text-2); min-width: 14em; }
.cross { color: var(--poor); font-weight: 700; }
.kw-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin: 12px 0; }
.kw-columns h3 { font-size: .92rem; overflow-wrap: anywhere; }
.kw-list { margin: 0; padding-left: 1.3em; font-size: .88rem; }
.kw-list li { padding: 1px 0; }
.kw-list li.is-shared { color: var(--accent); }
.kw-track td, .kw-track th { white-space: nowrap; }

/* ---------- admin and plans ---------- */
.admin-stats { grid-template-columns: repeat(7, 1fr); margin-bottom: 20px; }
@media (max-width: 1000px) { .admin-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
.panel-head .inline-form { margin: 0; flex-wrap: nowrap; }
.panel-head .inline-form .field { flex: 0 1 260px; }
.row-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.row-form select, .row-form input { height: 30px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: .85rem; padding: 0 6px; }
.row-form input { width: 70px; }
.log-lines li { display: grid; gap: 2px; }
.log-lines code { font-size: .78rem; }
.plans-table td, .plans-table th { text-align: center; }
.plans-table td:first-child, .plans-table th:first-child { text-align: left; }

.tool-grid.compact .tool-card { padding: 18px; }
.tool-grid.compact .tool-card h3 { font-size: 1rem; margin: 10px 0 6px; }
.tool-grid.compact .tool-card p { font-size: .86rem; margin: 0; }
@media (max-width: 560px) { .tool-grid.compact { grid-template-columns: 1fr 1fr; gap: 10px; } .tool-grid.compact .tool-card { padding: 14px; } .tool-grid.compact .tool-card p { display: none; } .tool-grid.compact .tool-card h3 { font-size: .9rem; margin-bottom: 0; } }
.section-cta { margin: 32px 0 0; }
.compare-preview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.opps-preview { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.opps-preview h3 { font-size: 1rem; }
.opps-preview ul { margin: 0; padding-left: 1.1em; font-size: .92rem; color: var(--text-2); }
.opps-preview li { padding: 4px 0; }
@media (max-width: 900px) { .compare-preview { grid-template-columns: 1fr; } }

/* ---------- documents ---------- */
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); }
.doc h2 { font-size: 1.3rem; margin-top: 2em; }
.doc h3 { margin-top: 1.6em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: .4em; color: var(--text-2); }
.doc p { color: var(--text-2); }
.doc .lede { color: var(--text-2); }
.table-wrap { overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: .92rem; margin: 8px 0 16px; }
.doc-table th, .doc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.doc-table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
.checks-table td:first-child { width: 38%; color: var(--text); font-weight: 500; }
.checks-table code { font-size: .78rem; }

/* ---------- print ---------- */
@media print {
  :root { --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-2: #f6f7f9; --surface-3: #eceff3; --border: #d9dee6; --border-strong: #c3cad6; --text: #0d1526; --text-2: #333d4f; --muted: #5d6879; --accent: #1d5fd0; --accent-soft: #eef3fc; }
  .site-header, .site-footer, .filters, .report-actions, .raw, .skip-link, .cta, .hero-grid-bg { display: none !important; }
  body { font-size: 11pt; }
  .section { padding: 16px 0; }
  .report-head { padding: 0 0 12px; }
  .finding, .score-panel, .facts, .priority, .log { box-shadow: none; break-inside: avoid; }
  .finding .finding-body { display: block !important; }
  details > *:not(summary) { display: block; }
  a { color: inherit; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
