:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --accent: #0284c7;
  --accent-dark: #0369a1;
  --pass-bg: #dcfce7;
  --pass-text: #166534;
  --fail-bg: #fee2e2;
  --fail-text: #991b1b;
  --warn-bg: #fef3c7;
  --warn-text: #92400e;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
header {
  background: #0f172a;
  color: #fff;
  padding: 1rem 1.25rem;
  border-bottom: 3px solid #f59e0b;
}
.nav-wrap {
  max-width: 1020px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand span { color: #f59e0b; }
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
nav a {
  color: #e2e8f0;
  text-decoration: none;
  font-size: 0.88rem;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
}
nav a:hover, nav a.active {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 600;
}
main {
  max-width: 1020px;
  margin: 1.5rem auto;
  padding: 0 1rem 3rem;
}
.hero {
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: 1.75rem;
  margin: 0 0 0.4rem;
}
.hero p {
  margin: 0;
  color: var(--muted);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card h2 {
  margin-top: 0;
  font-size: 1.3rem;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 0.6rem;
}
.grid-2, .grid-3, .grid-4 {
  display: grid;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.3rem;
}
select, input[type="number"] {
  width: 100%;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
}
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
button.btn {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #f1f5f9;
  color: var(--text);
  padding: 0.45rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
}
button.btn.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
button.btn:hover { opacity: 0.92; }
.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin: 1rem 0;
}
.metric-box {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.9rem;
  background: #f8fafc;
}
.metric-box.pass { background: var(--pass-bg); color: var(--pass-text); border-color: #86efac; }
.metric-box.fail { background: var(--fail-bg); color: var(--fail-text); border-color: #fca5a5; }
.metric-box.warn { background: var(--warn-bg); color: var(--warn-text); border-color: #fde68a; }
.metric-val {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
}
.metric-lbl {
  font-size: 0.8rem;
  font-weight: 600;
  margin-top: 0.2rem;
}
.metric-sub {
  font-size: 0.75rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}
.affiliate-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 0.95rem 1.1rem;
  margin-top: 1rem;
}
.affiliate-box h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: #92400e;
}
.aff-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.aff-links a {
  display: inline-block;
  background: #f59e0b;
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
  padding: 0.45rem 0.8rem;
  border-radius: 6px;
}
.aff-links a:hover { background: #d97706; color: #fff; }
.ad-slot {
  border: 1px dashed #94a3b8;
  background: #f1f5f9;
  color: #64748b;
  text-align: center;
  padding: 0.85rem;
  border-radius: 8px;
  font-size: 0.8rem;
  margin: 1.25rem 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-top: 0.75rem;
}
th, td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #e2e8f0;
}
th { background: #f1f5f9; font-weight: 700; }
.faq h3 { font-size: 1.02rem; margin: 1rem 0 0.25rem; }
.faq p { margin: 0 0 0.75rem; color: var(--muted); font-size: 0.94rem; }
footer {
  max-width: 1020px;
  margin: 2rem auto;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}
