:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --ink: #14202b;
  --muted: #5b6b78;
  --line: #e1e7ec;
  --accent: #0e9f6e;
  --accent-ink: #ffffff;
  --warn: #d97706;
  --bad: #dc2626;
  --chart: #0e9f6e;
  --radius: 14px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1720;
    --surface: #16212c;
    --ink: #e6edf3;
    --muted: #93a4b3;
    --line: #243241;
    --accent: #34d399;
    --accent-ink: #062b1d;
    --chart: #34d399;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}
a { color: var(--accent); }
.top, main, .foot { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 18px; padding-bottom: 18px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand svg { color: var(--accent); }
.top nav { display: flex; gap: 18px; flex-wrap: wrap; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.top nav a:hover { color: var(--ink); }

.hero { padding: 36px 0 12px; }
.hero h1 { font-size: clamp(28px, 5vw, 42px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.02em; }
.lead { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0; }

.tester { display: grid; grid-template-columns: 280px 1fr; gap: 20px; margin: 28px 0 8px; }
.dial, .panel, .card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.dial { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 20px; gap: 6px; }
.dial-value { font-size: 64px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.dial-value small { font-size: 18px; color: var(--muted); margin-left: 4px; font-weight: 500; }
.dial-label { color: var(--muted); min-height: 1.6em; }
.go {
  margin-top: 14px; border: 0; border-radius: 999px; padding: 12px 28px;
  background: var(--accent); color: var(--accent-ink); font-size: 16px; font-weight: 600; cursor: pointer;
}
.go:disabled { opacity: .55; cursor: progress; }
.panel { padding: 18px 20px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; margin-bottom: 14px; }
.stats span { display: block; font-size: 13px; color: var(--muted); }
.stats b { font-size: 22px; font-variant-numeric: tabular-nums; }
canvas { width: 100%; height: 150px; display: block; border-top: 1px solid var(--line); padding-top: 8px; }
.grade { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.badge { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 20px; background: var(--accent); color: var(--accent-ink); }
.badge.warn { background: var(--warn); color: #fff; }
.badge.bad { background: var(--bad); color: #fff; }
.grade p { margin: 0; }
.meta { color: var(--muted); font-size: 14px; margin: 12px 0 0; }

.block { padding: 36px 0 4px; }
.block h2 { font-size: 26px; margin: 0 0 14px; letter-spacing: -0.01em; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 8px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 12px; }
.card { padding: 16px; }
.card h3 { margin: 0 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 2px; }
.foot { padding-top: 40px; padding-bottom: 40px; color: var(--muted); font-size: 14px; }
.prose { max-width: 720px; }
.prose h1 { font-size: 32px; margin: 32px 0 12px; }

@media (max-width: 760px) {
  .tester { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .top nav { gap: 12px; }
}
