:root {
  --bg: #0f1220;
  --panel: #171b2e;
  --panel2: #1e2338;
  --text: #eef1ff;
  --muted: #9aa3c7;
  --accent: #5865f2;
  --accent2: #7d8cff;
  --good: #2ecc71;
  --bad: #e74c3c;
  --warn: #f1c40f;
  --border: #2a3050;
}

* { 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.55;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}

.brand { font-weight: 800; font-size: 1.2rem; color: var(--text); text-decoration: none; }

.topbar nav a { margin-left: 18px; color: var(--muted); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--text); }

main { max-width: 980px; margin: 0 auto; padding: 32px 24px 60px; }

h1 { font-size: 2rem; margin: 0 0 12px; }
h2 { font-size: 1.35rem; margin: 34px 0 14px; color: var(--accent2); }
h3 { font-size: 1rem; margin: 20px 0 8px; }

.lead { font-size: 1.1rem; color: var(--muted); }

.hero { text-align: center; padding: 26px 0 10px; }
.hero h1 { font-size: 2.5rem; }
.hero-cta { margin: 24px 0 10px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
}
.btn:hover { background: var(--accent2); }
.btn-lg { padding: 14px 26px; font-size: 1.05rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent2); color: var(--accent2); }

.muted { color: var(--muted); font-size: .9rem; }

.steps { max-width: 720px; margin: 0 auto; padding-left: 22px; }
.steps li { margin: 10px 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px;
  display: flex;
  flex-direction: column;
}
.card.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card .price { font-size: 2.2rem; font-weight: 800; margin: 6px 0 10px; }
.card .price span { font-size: .9rem; color: var(--muted); font-weight: 400; }
.card ul { margin: 0 0 16px; padding-left: 18px; color: var(--muted); font-size: .92rem; }
.card .btn { margin-top: auto; text-align: center; }

.narrow { max-width: 640px; margin: 0 auto; }
.gate-form, .audit-form { margin: 20px 0; display: flex; flex-direction: column; gap: 12px; }
.gate-form input, .audit-form textarea, .audit-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel2);
  color: var(--text);
  font-family: inherit;
}
.audit-form textarea { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .85rem; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; }
.error { color: var(--bad); font-weight: 600; }
.hint { margin-top: 18px; color: var(--muted); }
.hint pre { background: var(--panel2); padding: 12px; border-radius: 8px; overflow-x: auto; font-size: .8rem; }

.results .score-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

.score-ring {
  --pct: 0%;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--pct), var(--border) var(--pct));
  display: grid;
  place-items: center;
}
.score-inner {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--panel);
  display: grid;
  place-items: center;
  text-align: center;
}
.score-num { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.score-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

.delta { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px 22px; margin-top: 22px; }
.delta-big { font-size: 1.1rem; }
.change.up { color: var(--good); font-weight: 700; }
.change.down { color: var(--bad); font-weight: 700; }
.delta-table { border-collapse: collapse; width: 100%; margin: 10px 0; }
.delta-table th, .delta-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); font-size: .9rem; }
.chip { display: inline-block; background: var(--panel2); border-radius: 999px; padding: 2px 10px; font-size: .75rem; margin: 2px; }
.chip.ok { color: var(--good); }
.chip.bad { color: var(--bad); }

.dim { margin: 12px 0; }
.dim-label { display: flex; justify-content: space-between; font-size: .95rem; margin-bottom: 6px; }
.dim-score { color: var(--muted); }
.bar { height: 10px; background: var(--panel2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 999px; }

.plan ol.fix-list { padding-left: 0; list-style: none; }
.fix-list li { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 14px 18px; margin: 10px 0; }
.fix-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prio { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; border-radius: 999px; padding: 3px 9px; }
.prio.high { background: rgba(231, 76, 60, .18); color: var(--bad); }
.prio.medium { background: rgba(241, 196, 15, .16); color: var(--warn); }
.prio.low { background: rgba(154, 163, 199, .16); color: var(--muted); }
.lost { margin-left: auto; color: var(--muted); font-size: .85rem; }
.fix-list .detail { color: var(--muted); margin: 8px 0 4px; font-size: .92rem; }
.fix-list .action { font-size: .92rem; margin: 0; }

.kit pre { background: var(--panel2); border: 1px solid var(--border); border-radius: 8px; padding: 14px; overflow-x: auto; font-size: .82rem; white-space: pre-wrap; }

.reaudit { margin-top: 30px; display: flex; gap: 12px; flex-wrap: wrap; }

.footer { text-align: center; padding: 20px; color: var(--muted); font-size: .85rem; border-top: 1px solid var(--border); }