:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #16202c;
  --muted: #5b6776;
  --border: #e2e6eb;
  --brand: #1f5eff;
  --brand-ink: #ffffff;
  --green: #138a4b;
  --green-bg: #e7f6ee;
  --yellow: #a86400;
  --yellow-bg: #fff4e0;
  --red: #c4271b;
  --red-bg: #fdecea;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 4px 16px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); letter-spacing: -.02em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }

.wrap { max-width: 720px; margin: 0 auto; padding: 0 16px; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); font-size: 15px; }
.topbar nav { display: flex; gap: 18px; }
.topbar nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.topbar nav a:hover { color: var(--text); }

.hero { padding: 40px 0 20px; }
.eyebrow { color: var(--muted); font-size: .85rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .4rem; }
.lede { color: var(--muted); font-size: 1.1rem; margin: 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin: 16px 0; }
.center { text-align: center; }

.alert { background: var(--red-bg); color: var(--red); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }

.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; border: 2px dashed var(--border); border-radius: var(--radius); cursor: pointer; text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); background: #f3f6ff; }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone-icon { font-size: 2rem; }
.dropzone-file { color: var(--brand); font-weight: 600; word-break: break-all; }

.doc-types { border: 0; padding: 0; margin: 20px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.doc-types legend { font-weight: 600; margin-bottom: 8px; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-block; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: .95rem; }
.pill input:checked + span { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }

.field { display: block; margin: 0 0 16px; }
.field span { display: block; font-weight: 600; margin-bottom: 6px; }
.field small { color: var(--muted); font-weight: 400; }
.field input { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; }

.btn { display: inline-block; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-block { width: 100%; }
.hint { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }

.how { margin: 32px 0; }
.checklist { list-style: none; padding: 0; margin: 12px 0; }
.checklist li { position: relative; padding: 6px 0 6px 28px; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.soon { font-size: .75rem; font-weight: 600; color: var(--muted); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; white-space: nowrap; }

/* Result */
.verdict { display: flex; gap: 20px; align-items: center; margin: 28px 0 16px; padding: 24px; border-radius: var(--radius); }
.verdict p { margin: 0; }
.verdict h1 { margin: .2rem 0 .3rem; }
.verdict-green { background: var(--green-bg); }
.verdict-yellow { background: var(--yellow-bg); }
.verdict-red { background: var(--red-bg); }
.verdict-green h1 { color: var(--green); }
.verdict-yellow h1 { color: var(--yellow); }
.verdict-red h1 { color: var(--red); }

.light { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 8px; background: #1d2530; border-radius: 12px; }
.light span { width: 22px; height: 22px; border-radius: 50%; background: #39424e; }
.verdict-red .light span:nth-child(1) { background: #ff4b3e; box-shadow: 0 0 12px #ff4b3e; }
.verdict-yellow .light span:nth-child(2) { background: #ffb020; box-shadow: 0 0 12px #ffb020; }
.verdict-green .light span:nth-child(3) { background: #23c16b; box-shadow: 0 0 12px #23c16b; }

.finding { background: var(--surface); border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; padding: 16px 18px; margin: 12px 0; }
.finding p { margin: .3rem 0; }
.finding-high { border-left-color: var(--red); }
.finding-medium { border-left-color: var(--yellow); }
.finding-low { border-left-color: #8b97a6; }
.finding-note { border-left-color: var(--brand); }
.finding-meta { color: var(--muted); font-size: .85rem; display: flex; align-items: center; gap: 8px; }
.why { color: var(--muted); font-size: .95rem; }
.badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 8px; border-radius: 999px; }
.badge-high { background: var(--red-bg); color: var(--red); }
.badge-medium { background: var(--yellow-bg); color: var(--yellow); }
.badge-low { background: var(--bg); color: var(--muted); }

.finding-locked { position: relative; border-left-color: var(--border); }
.redacted span { display: block; height: 12px; margin: 10px 0; border-radius: 6px; background: linear-gradient(90deg, #e9ecf0, #f3f5f7); }
.redacted span:nth-child(1) { width: 55%; height: 16px; }
.redacted span:nth-child(2) { width: 90%; }
.redacted span:nth-child(3) { width: 70%; }
.lock { position: absolute; top: 14px; right: 16px; }
.locked-count { text-align: center; font-weight: 600; color: var(--muted); }

.upsell { border: 2px solid var(--brand); }
.upsell-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

.next { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 24px 0; }
.next .hint { margin: 0; }

.email-card h2 { margin-bottom: .3rem; }
.email-card > p { margin: 0 0 14px; color: var(--muted); }
.consent { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: .9rem; color: var(--muted); cursor: pointer; }
.consent input { margin-top: 3px; flex: none; }
.sent-note { background: var(--green-bg); color: var(--green); border-radius: 10px; padding: 12px 14px; font-weight: 500; }

.consent small { display: block; margin-top: 4px; font-size: .8rem; }
.attest { margin-top: 4px; }
.fairness { color: var(--muted); font-size: .9rem; border-left: 3px solid var(--border); padding-left: 12px; }
.delete-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: -8px 0 24px; }
.delete-form .hint { margin: 0; }
.link-button { background: none; border: 0; padding: 0; font: inherit; font-size: .9rem; color: var(--red); text-decoration: underline; cursor: pointer; }

/* Legal pages */
.legal { padding: 32px 0 8px; }
.legal h2 { margin-top: 28px; }
.legal li { margin: 6px 0; }
.legal-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: .95rem; background: var(--surface); }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border: 1px solid var(--border); }
.legal-table th { background: var(--bg); }
.footer-links a { color: var(--muted); }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plans .card { margin: 0; display: flex; flex-direction: column; }
.plans .card .btn, .plans .card .hint { margin-top: auto; }
.plan-featured { border: 2px solid var(--brand); }
.price { font-size: 1.8rem; font-weight: 700; margin: 0 0 .3rem; }
.price small { font-size: .9rem; font-weight: 500; color: var(--muted); }

.footer { color: var(--muted); font-size: .85rem; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--border); margin-top: 40px; }

@media (max-width: 480px) {
  .verdict { flex-direction: column; align-items: flex-start; }
  .light { flex-direction: row; }
}
