/* =========================================================
   Oodits — Influencer Audit front end
   Plain CSS, no framework. Tokens first, then components.
   ========================================================= */

:root {
  --bg: #f5f7fa;
  --surface: #ffffff;
  --surface-2: #eef2f6;
  --surface-3: #e3e9f0;
  --text: #0e1726;
  --text-2: #334155;
  --muted: #5e6b7e;
  --border: #dfe5ec;
  --brand: #0d8f6f;
  --brand-strong: #0a7359;
  --brand-soft: #d9f3eb;
  --brand-ink: #ffffff;
  --accent: #5b5bd6;
  --ok: #15803d;
  --ok-soft: #dcfce7;
  --warn: #b45309;
  --warn-soft: #fef3c7;
  --bad: #c2261d;
  --bad-soft: #fde4e1;
  --info: #2563eb;
  --c1: #0d8f6f; --c2: #5b5bd6; --c3: #d4890f; --c4: #c2261d;
  --console-bg: #0d1424;
  --console-text: #c9d4e3;
  --shadow-sm: 0 1px 2px rgba(14, 23, 38, .06);
  --shadow: 0 1px 2px rgba(14, 23, 38, .05), 0 10px 30px -12px rgba(14, 23, 38, .14);
  --radius: 18px;
  --radius-sm: 11px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1120; --surface: #121a2b; --surface-2: #19233a; --surface-3: #22304b;
    --text: #e8eef7; --text-2: #c3cede; --muted: #94a3b8; --border: #26344f;
    --brand: #2dd4a7; --brand-strong: #5eead4; --brand-soft: #0f3a33; --brand-ink: #04211b;
    --accent: #8b8cf5; --ok: #4ade80; --ok-soft: #10331f; --warn: #fbbf24; --warn-soft: #3a2c0b;
    --bad: #f87171; --bad-soft: #3d1715; --info: #60a5fa;
    --c1: #2dd4a7; --c2: #8b8cf5; --c3: #f0b440; --c4: #f87171;
    --console-bg: #070c17;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -14px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1120; --surface: #121a2b; --surface-2: #19233a; --surface-3: #22304b;
  --text: #e8eef7; --text-2: #c3cede; --muted: #94a3b8; --border: #26344f;
  --brand: #2dd4a7; --brand-strong: #5eead4; --brand-soft: #0f3a33; --brand-ink: #04211b;
  --accent: #8b8cf5; --ok: #4ade80; --ok-soft: #10331f; --warn: #fbbf24; --warn-soft: #3a2c0b;
  --bad: #f87171; --bad-soft: #3d1715; --info: #60a5fa;
  --c1: #2dd4a7; --c2: #8b8cf5; --c3: #f0b440; --c4: #f87171;
  --console-bg: #070c17;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px -14px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-strong); text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5.4vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 750; }
h3, .h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 780px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sr-only { 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: -60px; background: var(--surface); padding: 8px 14px; border-radius: 8px; z-index: 100; box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border: 1px solid transparent; border-radius: 12px; padding: .7rem 1.15rem;
  font-weight: 650; font-size: .95rem; text-decoration: none; cursor: pointer;
  transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-sm { padding: .45rem .85rem; font-size: .875rem; border-radius: 10px; }
.btn-lg { padding: .9rem 1.35rem; font-size: 1rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.icon-btn {
  width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px;
  border: 1px solid var(--border); background: var(--surface); cursor: pointer;
}
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.icon-btn .i-moon { display: none; }
:root[data-theme="dark"] .icon-btn .i-sun { display: none; }
:root[data-theme="dark"] .icon-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .i-moon { display: block; }
}
.link-btn { background: none; border: 0; padding: 0; color: var(--brand-strong); font-weight: 600; cursor: pointer; font-size: .875rem; }
.link-btn:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.header-inner { display: flex; align-items: center; gap: 1rem; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.1rem; color: var(--text); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 30px; height: 30px; }
.bm-bg { fill: var(--brand); }
.bm-check { fill: none; stroke: var(--brand-ink); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.nav { display: flex; gap: 1.4rem; margin-left: auto; }
.nav a { color: var(--text-2); text-decoration: none; font-weight: 550; font-size: .94rem; }
.nav a:hover { color: var(--text); }
.header-actions { display: flex; gap: .6rem; align-items: center; }
@media (max-width: 760px) {
  .nav { display: none; }
  .header-actions { margin-left: auto; }
  .hide-sm { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 104px) 0 56px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(700px 340px at 85% -10%, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%),
    radial-gradient(600px 320px at 5% 10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
    linear-gradient(var(--border) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, var(--border) 1px, transparent 1px) 0 0 / 44px 44px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
  opacity: .9;
}
.hero-inner { text-align: center; max-width: 860px; }
.hl { background: linear-gradient(100deg, var(--brand), var(--accent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { font-size: clamp(1rem, 2.1vw, 1.18rem); color: var(--text-2); max-width: 680px; margin: 0 auto 2rem; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand-strong); margin-bottom: 1rem;
}
.eyebrow.center { display: flex; justify-content: center; }
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }

.audit-form {
  display: grid; grid-template-columns: 1fr auto; gap: .6rem; max-width: 640px; margin: 0 auto;
  background: var(--surface); padding: 8px; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow);
  text-align: left;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .at { position: absolute; left: 14px; color: var(--muted); font-weight: 700; pointer-events: none; }
.audit-form input {
  width: 100%; height: 52px; border: 0; outline: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 1.02rem; padding: 0 44px 0 34px; border-radius: 12px;
}
.audit-form input::placeholder { color: color-mix(in srgb, var(--muted) 80%, transparent); }
.audit-form:focus-within { border-color: color-mix(in srgb, var(--brand) 60%, var(--border)); box-shadow: 0 0 0 4px var(--brand-soft), var(--shadow); }
.audit-form input[aria-invalid="true"] { color: var(--bad); }
.kbd { position: absolute; right: 10px; font-family: var(--mono); font-size: .75rem; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; color: var(--muted); }
.form-hint, .form-error { grid-column: 1 / -1; margin: 2px 8px 4px; font-size: .84rem; }
.form-hint { color: var(--muted); }
.form-error { color: var(--bad); font-weight: 600; }
@media (max-width: 560px) {
  .audit-form { grid-template-columns: 1fr; }
  .audit-form .btn { width: 100%; }
}
.trust-row { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 1.4rem; color: var(--text-2); font-size: .9rem; font-weight: 550; }
.trust-row li { display: inline-flex; align-items: center; gap: .4rem; }
.trust-row svg { width: 17px; height: 17px; fill: none; stroke: var(--brand); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Generic card / sections ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(18px, 3vw, 28px); }
.panel-section { margin-top: 8px; margin-bottom: 40px; scroll-margin-top: 80px; }
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { text-align: center; max-width: 760px; margin-left: auto; margin-right: auto; }
.section-title.left { text-align: left; margin-left: 0; }
.section-lede { text-align: center; color: var(--text-2); max-width: 620px; margin: 0 auto 2.4rem; }
.section-row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; }

.steps-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: s; }
.step-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.step-card p { color: var(--text-2); font-size: .95rem; margin: 0; }
.step-num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft); color: var(--brand-strong); font-weight: 800; margin-bottom: 14px; }
@media (max-width: 900px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .steps-grid { grid-template-columns: 1fr; } }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 2.4rem; }
.feature { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature p { color: var(--text-2); font-size: .95rem; margin: 0; }
.f-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); display: grid; place-items: center; margin-bottom: 14px; }
.f-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--brand-strong); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 56px); align-items: center; }
.two-col p { color: var(--text-2); }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.checklist ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.checklist li { position: relative; padding-left: 28px; color: var(--text-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: .42em; width: 16px; height: 16px; border-radius: 50%; background: var(--warn-soft); box-shadow: inset 0 0 0 4px var(--warn-soft), inset 0 0 0 10px var(--warn); }

.faq { display: grid; gap: 10px; margin-top: 2rem; }
.faq details { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; padding: 16px 28px 16px 0; font-weight: 650; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--muted); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--text-2); margin: 0 0 16px; }
.cta { padding-top: 64px; }

/* ---------- Progress ---------- */
.progress-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.progress-head h2 { margin: 0; overflow-wrap: anywhere; }
.progress-head p { margin: 0 0 4px; }
.handle { color: var(--brand-strong); }
.progress-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: .9rem; }
.meta-item strong { font-family: var(--mono); font-weight: 500; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); }

.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .5s ease; position: relative; }
.bar-fill::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); animation: shimmer 1.6s infinite; }
.bar-caption { margin: 10px 0 24px; font-size: .92rem; }
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

.progress-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; }
@media (max-width: 860px) { .progress-grid { grid-template-columns: 1fr; } }

.stepper { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.step { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 12px 12px 12px 8px; border-radius: 14px; transition: background-color .2s; }
.step:not(:last-child)::before { content: ""; position: absolute; left: 25px; top: 46px; bottom: -6px; width: 2px; background: var(--border); }
.step.done:not(:last-child)::before { background: var(--brand); }
.step.active { background: var(--surface-2); }
.step-icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: .9rem; background: var(--surface-2); color: var(--muted); border: 2px solid var(--border); position: relative; z-index: 1; }
.step.active .step-icon { border-color: var(--brand); color: var(--brand-strong); background: var(--surface); }
.step.active .step-icon::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--brand); animation: spin .9s linear infinite; }
.step.done .step-icon { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.step.error .step-icon { background: var(--bad); border-color: var(--bad); color: #fff; }
.step-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.step-title { font-weight: 700; margin: 6px 0 2px; }
.step.pending .step-title { color: var(--muted); }
.step-desc { color: var(--muted); font-size: .88rem; margin: 0; }
.step-detail { font-family: var(--mono); font-size: .8rem; color: var(--text-2); margin-top: 6px; }
.step-mini { height: 4px; background: var(--surface-3); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.step-mini > i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .4s ease; }
@keyframes spin { to { transform: rotate(360deg); } }

.side-col { display: grid; gap: 14px; align-content: start; min-width: 0; }
.mini-profile { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 14px; background: var(--bg); animation: pop .35s ease; }
.mini-profile .mp-stats { display: flex; gap: 14px; font-size: .82rem; color: var(--muted); }
.mini-profile .mp-stats strong { color: var(--text); }
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.avatar { flex: none; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--accent)); overflow: hidden; font-size: 1.1rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.8rem; }

.console { background: var(--console-bg); color: var(--console-text); border-radius: 14px; overflow: hidden; font-family: var(--mono); font-size: .78rem; min-width: 0; }
.console-head { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid rgba(255,255,255,.08); font-family: var(--font); font-size: .8rem; font-weight: 600; color: #e2e8f0; }
.console-head .link-btn { margin-left: auto; color: #7ee2c5; font-size: .78rem; }
.console-dots { display: inline-flex; gap: 5px; }
.console-dots i { width: 9px; height: 9px; border-radius: 50%; background: #ef4444; }
.console-dots i:nth-child(2) { background: #f59e0b; } .console-dots i:nth-child(3) { background: #22c55e; }
.console-body { list-style: none; margin: 0; padding: 10px 12px; max-height: 260px; overflow: auto; display: grid; gap: 3px; }
.console-body li { display: grid; grid-template-columns: auto 1fr; gap: 10px; animation: pop .25s ease; overflow-wrap: anywhere; }
.console-body time { color: #64748b; }
.console-body .ok { color: #6ee7b7; } .console-body .warn { color: #fcd34d; } .console-body .err { color: #fca5a5; }
.console.collapsed .console-body { display: none; }

.progress-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.progress-actions p { margin: 0; }

/* ---------- Error ---------- */
.error-card { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; border-color: color-mix(in srgb, var(--bad) 35%, var(--border)); }
.error-icon { width: 48px; height: 48px; border-radius: 14px; background: var(--bad-soft); display: grid; place-items: center; }
.error-icon svg { width: 26px; height: 26px; fill: none; stroke: var(--bad); stroke-width: 2.2; stroke-linecap: round; }
@media (max-width: 480px) { .error-card { grid-template-columns: 1fr; } }

/* ---------- Report ---------- */
.report { display: grid; gap: 18px; }
.demo-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); border: 1px solid color-mix(in srgb, var(--warn) 30%, transparent); font-size: .9rem; font-weight: 550; }
.demo-banner svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; margin-top: 1px; }
.report-toolbar { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.r-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.r-identity { display: flex; gap: 16px; align-items: center; min-width: 0; }
.r-identity h2 { margin: 0; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; overflow-wrap: anywhere; }
.r-identity .handle { font-weight: 600; }
.verified { width: 20px; height: 20px; flex: none; }
.verified circle { fill: var(--info); } .verified path { fill: none; stroke: #fff; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.r-bio { color: var(--text-2); margin: 6px 0 0; font-size: .94rem; white-space: pre-line; }
.r-stats { display: flex; gap: 26px; margin-top: 12px; flex-wrap: wrap; }
.r-stats div { font-size: .84rem; color: var(--muted); }
.r-stats strong { display: block; font-size: 1.15rem; color: var(--text); font-weight: 750; }
.r-meta { font-size: .8rem; color: var(--muted); margin-top: 10px; }
@media (max-width: 760px) { .r-head { grid-template-columns: 1fr; } }

.score-card { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.gauge { width: 168px; height: 168px; position: relative; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge .track { fill: none; stroke: var(--surface-2); stroke-width: 14; }
.gauge .val { fill: none; stroke-width: 14; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.2,.8,.2,1); }
.gauge-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.gauge-center strong { font-size: 2.6rem; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.gauge-center span { display: block; font-size: .78rem; color: var(--muted); margin-top: 4px; }
.grade-badge { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; padding: 5px 12px; border-radius: 999px; font-size: .9rem; }
.tone-ok { color: var(--ok); background: var(--ok-soft); } .tone-warn { color: var(--warn); background: var(--warn-soft); } .tone-bad { color: var(--bad); background: var(--bad-soft); }
.stroke-ok { stroke: var(--ok); } .stroke-warn { stroke: var(--warn); } .stroke-bad { stroke: var(--bad); }
.score-card h3 { font-size: 1.4rem; margin: 10px 0 6px; }
.score-card p { color: var(--text-2); margin: 0; }
@media (max-width: 600px) { .score-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.metric { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.metric .m-label { font-size: .8rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.metric .m-value { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.metric .m-note { font-size: .78rem; color: var(--muted); }
.metric .m-note.ok { color: var(--ok); } .metric .m-note.warn { color: var(--warn); } .metric .m-note.bad { color: var(--bad); }
@media (max-width: 900px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

.info-tip { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); font-size: .65rem; color: var(--muted); cursor: help; background: none; padding: 0; }
.info-tip:hover::after, .info-tip:focus::after {
  content: attr(data-tip); position: absolute; bottom: 140%; left: 50%; transform: translateX(-50%);
  width: 220px; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 8px; font-size: .75rem; font-weight: 500; line-height: 1.4; z-index: 5; text-align: left;
}

.chart-card h3 { margin-bottom: 4px; }
.chart-sub { font-size: .86rem; color: var(--muted); margin: 0 0 14px; }
.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { width: 100%; height: auto; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: .8rem; color: var(--text-2); margin-top: 10px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .lg-ok { background: var(--brand); } .legend .lg-bad { background: var(--bad); }
.legend .lg-band { background: color-mix(in srgb, var(--brand) 18%, transparent); border: 1px dashed var(--brand); }
.legend .lg-med { height: 0; border-top: 2px dashed var(--text-2); border-radius: 0; }
.bar-detail { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: .88rem; min-height: 46px; }

/* SVG chart parts (fills set via classes so they follow the theme) */
.ch-grid { stroke: var(--border); stroke-width: 1; }
.ch-axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.ch-band { fill: color-mix(in srgb, var(--brand) 13%, transparent); }
.ch-median { stroke: var(--text-2); stroke-width: 1.5; stroke-dasharray: 5 4; }
.ch-bar { fill: var(--brand); cursor: pointer; transition: opacity .15s; }
.ch-bar.flag { fill: var(--bad); }
.ch-bar:hover, .ch-bar:focus { opacity: .8; outline: none; }
.ch-bar.sel { stroke: var(--text); stroke-width: 2; }
.ch-grow { transform-box: fill-box; transform-origin: bottom; animation: grow .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.donut-row { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.donut { width: 150px; height: 150px; flex: none; }
.donut circle { fill: none; stroke-width: 20; }
.donut .d-track { stroke: var(--surface-2); }
.d1 { stroke: var(--c1); } .d2 { stroke: var(--c2); } .d3 { stroke: var(--c3); } .d4 { stroke: var(--c4); }
.donut-legend { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: .9rem; flex: 1; min-width: 160px; }
.donut-legend li { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.donut-legend i { width: 12px; height: 12px; border-radius: 3px; }
.bg-c1 { background: var(--c1); } .bg-c2 { background: var(--c2); } .bg-c3 { background: var(--c3); } .bg-c4 { background: var(--c4); }
.hbars { display: grid; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 6px; }
.hbar-track { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: inherit; transition: width 1s cubic-bezier(.2,.8,.2,1); }

.flag-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.flag-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.flag-item strong { display: block; font-size: .95rem; }
.flag-item p { margin: 2px 0 0; font-size: .87rem; color: var(--text-2); }
.sev { font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; height: fit-content; }
.sev-high { background: var(--bad-soft); color: var(--bad); } .sev-medium { background: var(--warn-soft); color: var(--warn); } .sev-low { background: var(--surface-3); color: var(--text-2); }
.sev-good { background: var(--ok-soft); color: var(--ok); }
.empty { color: var(--muted); font-size: .9rem; }

.posts-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.posts-table th, .posts-table td { text-align: right; padding: 9px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.posts-table th:first-child, .posts-table td:first-child { text-align: left; }
.posts-table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; cursor: pointer; user-select: none; }
.posts-table th[aria-sort="ascending"]::after { content: " ↑"; } .posts-table th[aria-sort="descending"]::after { content: " ↓"; }
.posts-table tr.flag td { background: color-mix(in srgb, var(--bad) 7%, transparent); }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.trust-chip { display: inline-block; min-width: 38px; text-align: center; padding: 2px 8px; border-radius: 999px; font-weight: 700; font-size: .78rem; }

.reco ul { margin: 0; padding-left: 1.2rem; color: var(--text-2); display: grid; gap: 6px; }
.method { font-size: .84rem; color: var(--muted); }
.method summary { cursor: pointer; font-weight: 650; color: var(--text-2); }

/* Recent */
.recent-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.recent-item button { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; }
.recent-item button:hover { border-color: var(--brand); }
.recent-item .avatar { width: 38px; height: 38px; font-size: .9rem; }
.recent-item .ri-main { flex: 1; min-width: 0; }
.recent-item .ri-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item .ri-main span { font-size: .78rem; color: var(--muted); }

/* Toast */
.toast-host { position: fixed; z-index: 200; left: 50%; bottom: 20px; transform: translateX(-50%); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 12px; font-size: .9rem; font-weight: 550; box-shadow: var(--shadow); animation: pop .25s ease; pointer-events: auto; }
.toast.err { background: var(--bad); color: #fff; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 28px; background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--text); }
.disclaimer { font-size: .8rem; color: var(--muted); max-width: 820px; }
.noscript { position: fixed; bottom: 0; left: 0; right: 0; padding: 14px; text-align: center; background: var(--warn-soft); color: var(--warn); font-weight: 600; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-io .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Print: only the report ---------- */
@media print {
  :root { --bg: #fff; --surface: #fff; --surface-2: #f1f5f9; --text: #000; --text-2: #222; --muted: #555; --border: #ddd; --shadow: none; --shadow-sm: none; color-scheme: light; }
  body { background: #fff; }
  .site-header, .hero, .section, .site-footer, #progressSection, #errorSection, #recentSection, .report-toolbar, .toast-host, .skip-link, .bar-detail { display: none !important; }
  #reportSection { display: block !important; margin: 0; }
  .card, .metric { box-shadow: none; break-inside: avoid; }
  .ch-grow, .gauge .val, .hbar-track i { animation: none !important; transition: none !important; }
  a { color: #000; }
}

/* Grid children must be allowed to shrink (wide table/chart otherwise widens the page) */
.report > *, .split > *, .metrics > *, .progress-grid > * { min-width: 0; }
.demo-banner code { overflow-wrap: anywhere; }

/* ---------- AI analysis card (report.analysis) ---------- */
.analysis .analysis-headline { font-size: 1.05rem; font-weight: 650; color: var(--text); margin: .2rem 0 .8rem; }
.analysis ul { margin: 0 0 .9rem; padding-left: 1.2rem; color: var(--text-2); }
.analysis li { margin: .35rem 0; }

/* ---------- Simple content pages (privacy, terms, errors) ---------- */
.prose h1 { font-size: clamp(1.7rem, 4vw, 2.2rem); }
.prose h2 { font-size: 1.2rem; margin-top: 1.8rem; }
.prose p, .prose li { color: var(--text-2); }
.error-page { text-align: center; padding: clamp(64px, 12vw, 140px) 0; }
.error-page .code { font-family: var(--mono); font-size: clamp(3rem, 10vw, 5rem); font-weight: 600; color: var(--brand); line-height: 1; }

/* ---------- Custom dropdown (templates/partials/controls.html, static/js/dropdown.js) ---------- */
.dd { position: relative; min-width: 0; }
.dd-trigger {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: .6rem .75rem; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .93rem; text-align: left; cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.dd-trigger:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--border)); }
.dd-trigger:focus-visible, .dd.is-open .dd-trigger { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 22%, transparent); }
.dd-trigger:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.dd-value { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-value.is-placeholder { color: var(--muted); }
.dd-chevron { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.dd.is-open .dd-chevron { transform: rotate(180deg); }
.dd-sm .dd-trigger { padding: .38rem .6rem; font-size: .85rem; border-radius: 9px; }

.dd-panel {
  position: fixed; z-index: 60; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, .28), 0 2px 6px rgba(0, 0, 0, .08);
  animation: dd-in .12s ease-out;
}
.dd.opens-up .dd-panel { animation-name: dd-in-up; }
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes dd-in-up { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .dd-panel { animation: none; } }
.dd-panel[hidden] { display: none; }
.dd-search-wrap { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.dd-search-wrap svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; }
.dd-search { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font: inherit; font-size: .9rem; padding: 2px 0; }
/* Focus is shown by the panel itself (search row tint + highlighted option), not the global outline. */
.dd-search:focus-visible, .dd-list:focus-visible { outline: none; }
.dd-search-wrap:focus-within { background: var(--surface-2); }
.dd-list { list-style: none; margin: 0; padding: 5px; overflow-y: auto; outline: none; overscroll-behavior: contain; }
.dd-option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer; font-size: .92rem; color: var(--text);
}
.dd-option[hidden] { display: none; }
.dd-option.is-active { background: var(--surface-2); }
.dd-option[aria-selected="true"] { color: var(--brand-strong); font-weight: 650; }
.dd-opt-text { display: grid; min-width: 0; }
.dd-opt-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-opt-hint { font-size: .78rem; color: var(--muted); font-weight: 500; }
.dd-check { width: 16px; height: 16px; flex: none; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; visibility: hidden; }
.dd-option[aria-selected="true"] .dd-check { visibility: visible; }
.dd-custom { border-bottom: 1px dashed var(--border); border-radius: 8px 8px 0 0; margin-bottom: 4px; }
.dd-empty { margin: 0; padding: 12px; color: var(--muted); font-size: .88rem; text-align: center; }
