:root {
  --bg: #f7f8fb; --card: #fff; --fg: #16213a; --muted: #5a6a86;
  --border: #e4e8f0; --accent: #2f6df6;
  --critical: #c0202f; --serious: #d9601a; --moderate: #b8860b; --minor: #4a7a4a;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 system-ui, -apple-system, Segoe UI, Roboto, sans-serif; }
main { max-width: 680px; margin: 0 auto; padding: 40px 20px 60px; }

.brandbar { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 28px; }
.brand { font-weight: 800; font-size: 20px; color: var(--fg); text-decoration: none; letter-spacing: -.5px; }
.brand-dot { color: var(--accent); }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 800;
  color: var(--accent); margin: 0 0 8px; }
.brandnav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; margin-left: 14px; }
.brandnav a:hover { color: var(--accent); }

.hero h1 { font-size: 30px; line-height: 1.2; margin: 0 0 10px; }
.hero .sub { color: var(--muted); font-size: 17px; margin: 0 0 24px; }

.scan-form { display: flex; gap: 8px; flex-wrap: wrap; }
.scan-form input {
  flex: 1; min-width: 200px; padding: 14px 16px; font-size: 16px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--card);
}
.scan-form button {
  padding: 14px 22px; font-size: 16px; font-weight: 700; color: #fff;
  background: var(--accent); border: none; border-radius: 10px; cursor: pointer;
}
.scan-form button:disabled { opacity: .6; cursor: default; }

.status { color: var(--muted); min-height: 22px; margin: 14px 0 0; }

.summary { font-weight: 700; background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; margin: 16px 0; }

.results { list-style: none; padding: 0; margin: 0; }
.issue { background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; margin-bottom: 10px; }
.issue-head { display: flex; align-items: center; gap: 10px; }
.issue-title { font-weight: 700; flex: 1; }
.badge { font-size: 12px; font-weight: 800; color: #fff; padding: 3px 9px; border-radius: 999px; }
.badge.critical { background: var(--critical); }
.badge.serious { background: var(--serious); }
.badge.moderate { background: var(--moderate); }
.badge.minor { background: var(--minor); }
.count { color: var(--muted); font-size: 14px; margin: 4px 0; }
.why { margin: 6px 0; }
.fix { background: #eef3ff; border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.fix strong { color: var(--accent); }

.badge-box { background: var(--card); border: 1px dashed var(--accent);
  border-radius: 12px; padding: 18px; margin-top: 24px; }
.badge-box h2 { margin: 0 0 6px; font-size: 19px; }
.badge-box p { color: var(--muted); margin: 0 0 12px; }
.badge-preview { margin-bottom: 12px; }
.badge-box textarea { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 13px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
.badge-box button { margin-top: 10px; padding: 10px 16px; font-weight: 700;
  color: var(--accent); background: #fff; border: 1px solid var(--accent);
  border-radius: 8px; cursor: pointer; }

/* Pricing */
.pricing { margin-top: 48px; }
.pricing h2 { font-size: 22px; margin: 0 0 4px; }
.pricing-sub { color: var(--muted); margin: 0 0 20px; }
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.plan { position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px; display: flex; flex-direction: column; }
.plan.featured { border-color: var(--accent); box-shadow: 0 6px 24px rgba(47,109,246,.12); }
.plan .tag { position: absolute; top: -11px; left: 20px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px; }
.plan h3 { margin: 0 0 4px; font-size: 18px; }
.plan .price { font-size: 30px; font-weight: 800; margin: 0 0 14px; }
.plan .price span { font-size: 15px; font-weight: 600; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.plan li { padding: 5px 0 5px 24px; position: relative; font-size: 15px; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.plan form { margin: 0; }
.plan-btn { display: block; width: 100%; text-align: center; padding: 13px 16px;
  font-size: 16px; font-weight: 700; color: #fff; background: var(--accent);
  border: none; border-radius: 10px; cursor: pointer; text-decoration: none; }
.plan-btn.ghost { color: var(--accent); background: #fff; border: 1px solid var(--accent); }
.plan-btn.link { background: none; color: var(--muted); font-weight: 600; font-size: 13px;
  padding: 8px 0 0; }
.annual-form { margin-top: 2px; }
.pricing-note { color: var(--muted); font-size: 13px; margin: 14px 0 0; }

/* Products by Kodex */
.products { margin-top: 48px; }
.products h2 { font-size: 22px; margin: 0 0 4px; }
.products-sub { color: var(--muted); margin: 0 0 18px; }
.product-list { list-style: none; padding: 0; margin: 0; display: grid;
  grid-template-columns: 1fr 1fr; gap: 16px; }
.product-card { background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px; }
.product-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.product-top h3 { margin: 0; font-size: 17px; }
.product-card p { color: var(--muted); margin: 0 0 12px; font-size: 15px; }
.product-card a { color: var(--accent); text-decoration: none; font-weight: 700; font-size: 15px; }
.pill { font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.pill.live { background: #e6f6ec; color: #1a7f3c; }
.pill.soon { background: #eef0f6; color: var(--muted); }

.foot { margin-top: 40px; color: var(--muted); font-size: 13px; }
.foot .biz { margin-top: 14px; }

/* Audit report page */
.max-field { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.max-field input { width: 64px; padding: 10px; border: 1px solid var(--border);
  border-radius: 8px; background: var(--card); color: var(--fg); }
.bar { height: 8px; background: var(--border); border-radius: 999px; overflow: hidden; margin: 14px 0; }
#bar-fill { height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap; margin: 18px 0 6px; }
.report-head h2 { font-size: 20px; margin: 0; word-break: break-all; }
.report-actions button { padding: 9px 14px; font-weight: 700; color: var(--accent);
  background: var(--card); border: 1px solid var(--accent); border-radius: 8px; cursor: pointer; margin-left: 8px; }
.totals-list { list-style: none; padding: 0; margin: 10px 0 0; }
.totals-list li { display: flex; justify-content: space-between; padding: 5px 0;
  border-bottom: 1px solid var(--border); font-weight: 600; }
.totals-list li b { color: var(--critical); }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .issue, .summary { break-inside: avoid; }
}

@media (max-width: 560px) { .plans { grid-template-columns: 1fr; } }

@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1420; --card: #171d2b; --fg: #e8ecf4; --muted: #9aa8c2; --border: #2a3346; }
  .fix { background: #1b2740; }
  .plan-btn.ghost { background: var(--card); }
}
