:root {
  --bg: #fbfcfd;
  --surface: #ffffff;
  --text: #182026;
  --muted: #5d6b76;
  --border: #dfe5ea;
  --accent: #2563eb;
  --accent-ink: #ffffff;
  --good: #0d9265;
  --warn: #b45309;
  --warn-bg: #fef3e2;
  --mark: #fde68a;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10151a;
    --surface: #171e25;
    --text: #e6ebef;
    --muted: #93a1ac;
    --border: #2a343d;
    --accent: #5b8def;
    --accent-ink: #0d1420;
    --good: #2fbd85;
    --warn: #e8a04c;
    --warn-bg: #2a2118;
    --mark: #6b5d1f;
  }
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font: 16px/1.6 system-ui, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--accent); }

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 20px; }

header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0; flex-wrap: wrap; gap: 10px;
}
.logo { font-size: 20px; font-weight: 800; text-decoration: none; color: var(--text); }
.logo em { color: var(--accent); font-style: normal; }
nav.site a { margin-left: 18px; font-size: 14px; text-decoration: none; color: var(--muted); }
nav.site a:hover { color: var(--text); }

.hero { text-align: center; padding: 34px 0 8px; }
.hero h1 { font-size: clamp(26px, 4.5vw, 40px); line-height: 1.2; letter-spacing: -0.01em; }
.hero p.sub { max-width: 640px; margin: 14px auto 0; color: var(--muted); font-size: 17px; }
.hero .privacy {
  display: inline-block; margin-top: 14px; padding: 5px 14px;
  border: 1px solid var(--border); border-radius: 99px;
  font-size: 13px; color: var(--muted); background: var(--surface);
}
.hero .privacy strong { color: var(--good); }

/* Tool */
.tool { margin: 28px 0 10px; }
.panes { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 800px) { .panes { grid-template-columns: 1fr; } }

.pane {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  display: flex; flex-direction: column; min-height: 320px;
}
.pane-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.pane textarea, .pane .output {
  flex: 1; padding: 14px; border: none; background: none; color: var(--text);
  font: 14.5px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace;
  resize: vertical; min-height: 260px; white-space: pre-wrap; word-wrap: break-word;
  overflow: auto;
}
.pane textarea:focus { outline: none; }
.pane .output:empty::before { content: "Cleaned text appears here…"; color: var(--muted); }

.tiny-btn {
  border: 1px solid var(--border); background: none; border-radius: 7px;
  color: var(--muted); font-size: 12px; padding: 3px 10px; cursor: pointer;
}
.tiny-btn:hover { color: var(--text); }

.copy-btn {
  border: none; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 700; padding: 6px 16px; cursor: pointer;
}
.copy-btn:hover { filter: brightness(1.08); }

.statsbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; min-height: 28px; }
.chip {
  font-size: 12.5px; padding: 4px 11px; border-radius: 99px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
}
.chip.active { border-color: var(--good); color: var(--good); font-weight: 600; }
.chip.total { background: var(--good); border-color: var(--good); color: #fff; font-weight: 700; }

/* Rule toggles */
.rules { margin: 6px 0 4px; }
.rules summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); padding: 6px 0; }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; margin-top: 8px; }
.rule {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px;
}
.rule input[type="checkbox"] { margin-top: 4px; accent-color: var(--accent); }
.rule .r-label { font-weight: 600; font-size: 14px; }
.rule .r-desc { font-size: 12.5px; color: var(--muted); }
.rule select { margin-top: 4px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); padding: 2px 6px; }

/* Tells report */
.tells { margin: 18px 0; }
.tells h2 { font-size: 17px; margin-bottom: 6px; }
.tells .none { color: var(--good); font-size: 14px; }
.tell {
  background: var(--warn-bg); border: 1px solid var(--border); border-left: 3px solid var(--warn);
  border-radius: 8px; padding: 9px 13px; margin-bottom: 8px; font-size: 13.5px;
}
.tell b { color: var(--warn); }
.tell .snips { color: var(--muted); }
.tell .snips mark { background: var(--mark); color: var(--text); border-radius: 3px; padding: 0 3px; }

/* Content sections */
section.content { padding: 34px 0 6px; }
section.content h2 { font-size: 22px; margin-bottom: 10px; }
section.content h3 { font-size: 16.5px; margin: 18px 0 6px; }
section.content p, section.content li { color: var(--muted); font-size: 15px; }
section.content ul { padding-left: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin: 16px 0; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
}
.card h3 { margin: 0 0 6px; font-size: 15.5px; }
.card p { font-size: 13.5px; }
.card a { font-size: 13.5px; }

details.faq {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; margin-bottom: 8px;
}
details.faq summary { font-weight: 600; cursor: pointer; font-size: 15px; }
details.faq p { margin-top: 8px; font-size: 14px; color: var(--muted); }

footer.site {
  margin-top: 40px; padding: 22px 0 34px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted); text-align: center;
}
footer.site a { color: var(--muted); }
