:root {
  --bg: #0a0b10;
  --bg-2: #12141c;
  --bg-3: #1a1d28;
  --line: #262a38;
  --text: #e7e9f0;
  --muted: #9aa0b4;
  --brand: #7c5cff;
  --brand-2: #22d3ee;
  --danger: #ff5c7a;
  --warn: #ffb020;
  --ok: #34d399;
  --radius: 14px;
  --wrap: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 760px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10,11,16,0.82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand { color: var(--text); font-weight: 700; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--brand); font-size: 1.2em; }
.nav-links { display: flex; gap: 22px; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* HERO */
.hero {
  padding: 84px 0 60px;
  background:
    radial-gradient(900px 400px at 50% -10%, rgba(124,92,255,0.18), transparent 60%),
    radial-gradient(700px 300px at 85% 10%, rgba(34,211,238,0.10), transparent 60%);
  text-align: center;
}
.eyebrow {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px;
  font-size: 0.82rem; color: var(--brand-2);
  border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2);
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.3rem); margin: 0 0 20px; }
.lede { color: var(--muted); font-size: clamp(1rem, 2vw, 1.18rem); max-width: 680px; margin: 0 auto 34px; }
.lede.small { font-size: 1.02rem; margin-bottom: 26px; }
.lede.small.narrow, .section .lede { text-align: left; }

/* SCAN BOX */
.scan-box {
  display: flex; gap: 10px; max-width: 560px; margin: 0 auto;
  background: var(--bg-2); border: 1px solid var(--line);
  padding: 8px; border-radius: var(--radius);
}
.scan-box input {
  flex: 1; background: transparent; border: 0; color: var(--text);
  font-size: 1.05rem; padding: 12px 14px; outline: none; min-width: 0;
}
.scan-box input::placeholder { color: #5b6072; }
.scan-box button {
  background: linear-gradient(135deg, var(--brand), #5a3ff0);
  color: #fff; border: 0; border-radius: 10px; padding: 12px 22px;
  font-size: 1rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .08s ease, opacity .2s;
}
.scan-box button:hover { transform: translateY(-1px); }
.scan-box button:disabled { opacity: .6; cursor: wait; transform: none; }
.micro { color: var(--muted); font-size: 0.85rem; }
#scanMicro { margin-top: 16px; text-align: center; }

/* RESULTS */
.results { margin: 34px auto 0; max-width: 720px; text-align: left; }
.result-summary {
  border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px;
  border: 1px solid var(--line);
}
.result-summary.clean { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.35); }
.result-summary.exposed { background: rgba(255,92,122,0.08); border-color: rgba(255,92,122,0.35); }
.result-summary h3 { margin: 0 0 6px; font-size: 1.3rem; }
.result-summary p { margin: 0; color: var(--muted); }
.breach {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 18px; margin-bottom: 12px;
}
.breach-logo {
  width: 40px; height: 40px; border-radius: 8px; background: var(--bg-3);
  display: grid; place-items: center; font-weight: 700; color: var(--brand-2);
  flex: none; overflow: hidden; font-size: 1.1rem;
}
.breach-logo img { width: 100%; height: 100%; object-fit: contain; }
.breach-main { flex: 1; min-width: 0; }
.breach-main h4 { margin: 0 0 4px; font-size: 1.05rem; }
.breach-meta { color: var(--muted); font-size: 0.85rem; margin: 0 0 8px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 0.74rem; padding: 3px 8px; border-radius: 6px;
  background: var(--bg-3); color: var(--muted); border: 1px solid var(--line);
}
.tag.pw { background: rgba(255,92,122,0.12); color: #ff90a6; border-color: rgba(255,92,122,0.3); }
.risk-badge { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.risk-plaintext, .risk-easytocrack { background: rgba(255,92,122,0.15); color: #ff90a6; }
.risk-hardtocrack { background: rgba(52,211,153,0.15); color: #6ee7b7; }
.risk-unknown { background: var(--bg-3); color: var(--muted); }

/* STRIP */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.strip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 30px 20px; text-align: center; }
.strip-grid strong { display: block; font-size: 1.7rem; color: var(--text); }
.strip-grid span { color: var(--muted); font-size: 0.86rem; }

/* SECTIONS */
.section { padding: 68px 0; }
.section.alt { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 12px; }

/* CARDS */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.section.alt .card { background: var(--bg-3); }
.card .step {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), #5a3ff0); color: #fff; font-weight: 700; margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; }
.card p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* PASSWORD */
.pw-result { margin-top: 18px; padding: 16px 18px; border-radius: 12px; border: 1px solid var(--line); }
.pw-result.safe { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.35); }
.pw-result.bad { background: rgba(255,92,122,0.08); border-color: rgba(255,92,122,0.35); }

/* REMOVAL */
.removal-tools { margin: 22px 0 30px; }
.letter-gen { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 20px; }
.section.alt .letter-gen { background: var(--bg-3); }
.letter-gen summary { cursor: pointer; padding: 16px 0; font-weight: 600; }
.letter-body { padding-bottom: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin: 12px 0; }
.field-grid label { display: flex; flex-direction: column; gap: 6px; font-size: 0.85rem; color: var(--muted); }
.field-grid input, #pf-broker, #letterOut {
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); padding: 10px 12px; font-size: 0.95rem; font-family: inherit;
}
.letter-actions { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
#pf-broker { flex: 1; min-width: 180px; }
#letterOut { width: 100%; resize: vertical; line-height: 1.5; }
button.ghost {
  background: transparent; border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 10px 16px; cursor: pointer; font-size: 0.9rem;
}
button.ghost:hover { border-color: var(--brand); }
button.ghost.small { padding: 6px 12px; font-size: 0.82rem; }
#genLetterBtn, #copyLetterBtn {
  background: linear-gradient(135deg, var(--brand), #5a3ff0); color: #fff; border: 0;
  border-radius: 9px; padding: 10px 18px; cursor: pointer; font-weight: 600;
}
#copyLetterBtn { margin-top: 10px; }

.broker-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.progress-pill { background: var(--bg-3); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 0.85rem; color: var(--muted); }
.broker-list { display: grid; gap: 10px; }
.broker {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px;
}
.broker-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.section .broker { background: var(--bg-2); }
.broker.done { opacity: 0.55; }
.broker input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); flex: none; cursor: pointer; }
.broker-info { flex: 1; min-width: 200px; }
.broker-info strong { display: flex; align-items: center; gap: 8px; }
.broker-info span { color: var(--muted); font-size: 0.83rem; }
.method-badge { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 5px; font-weight: 700; }
.method-badge.email { background: rgba(34,211,238,0.15); color: var(--brand-2); }
.method-badge.form { background: var(--bg-3); color: var(--muted); border: 1px solid var(--line); }
.broker-steps { margin: 10px 0 0; padding-left: 34px; color: var(--muted); font-size: 0.86rem; line-height: 1.5; }
.steps-label { color: var(--text); font-weight: 600; }
.diff { font-size: 0.72rem; padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.diff-easy { background: rgba(52,211,153,0.15); color: #6ee7b7; }
.diff-medium { background: rgba(255,176,32,0.15); color: #ffca6b; }
.diff-hard { background: rgba(255,92,122,0.15); color: #ff90a6; }
.broker .optout {
  background: var(--brand); color: #fff; border: 0; border-radius: 8px; padding: 8px 14px;
  font-size: 0.85rem; font-weight: 600; white-space: nowrap; cursor: pointer; font-family: inherit;
}
.broker .optout:hover { text-decoration: none; opacity: 0.92; }
button.optout.email-optout { background: linear-gradient(135deg, var(--brand-2), #0ea5b7); color: #06232a; }
button.optout.email-optout.locked,
button.optout.email-optout:disabled {
  background: var(--bg-3); color: #5b6072; cursor: not-allowed; opacity: 1;
  border: 1px solid var(--line);
}
button.optout.email-optout.locked::before { content: "🔒 "; }
.email-lock-note {
  background: rgba(255,176,32,0.10); border: 1px solid rgba(255,176,32,0.35);
  color: #ffca6b; border-radius: 10px; padding: 12px 16px; font-size: 0.9rem; margin: 0 0 16px;
}
.letter-gen summary .req { color: var(--brand-2); font-weight: 400; font-size: 0.9rem; }

/* FAQ */
#faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
#faq summary { cursor: pointer; font-weight: 600; font-size: 1.05rem; }
#faq details p { color: var(--muted); margin: 12px 0 0; }

/* FOOTER */
.footer { border-top: 1px solid var(--line); padding: 34px 0; background: var(--bg-2); }
.footer-brand { font-weight: 700; margin: 0 0 12px; }
.footer .micro { max-width: 620px; }
.visitor-count {
  display: inline-block; margin: 0 0 14px; padding: 8px 16px;
  background: rgba(52,211,153,0.08); border: 1px solid rgba(52,211,153,0.3);
  border-radius: 999px; color: #6ee7b7; font-size: 0.9rem; font-weight: 600;
}
.visitor-count:empty { display: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; margin: 0 0 16px; }
.footer-links a { color: var(--muted); font-size: 0.9rem; }
.footer-links a:hover { color: var(--text); }

/* LEGAL PAGES */
.legal h1 { font-size: 2rem; margin: 0 0 6px; }
.legal h2 { font-size: 1.25rem; margin: 32px 0 10px; }
.legal p, .legal li { color: var(--muted); }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 8px; }
.legal strong { color: var(--text); }

/* SPINNER */
.spinner {
  display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -3px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 760px) {
  .nav-links { display: none; }
  .cards, .strip-grid, .field-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr; }
  .scan-box { flex-direction: column; }
  .scan-box button { width: 100%; }
}
@media (max-width: 460px) {
  .strip-grid { grid-template-columns: 1fr 1fr; }
}
