:root {
  /* brand */
  --ink: #16181d;
  --muted: #5c6370;
  --bg: #fbfaf7;
  --card: #ffffff;
  --accent: #0d9488;       /* deep teal — signal/detection, distinct from Reddit orange */
  --accent-dark: #0f766e;
  --accent-soft: rgba(13, 148, 136, 0.08);
  --line: #e6e2d9;
  /* surfaces */
  --surf-sunk: #f6f3ec;   /* draft blocks, sunken panels */
  --surf-panel: #f1ede4;  /* tab tracks, callout panels */
  /* spacing scale */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  /* radii */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  /* one transition, one focus ring */
  --t: .15s ease;
  --focus: 2px solid var(--accent);
}
* { box-sizing: border-box; margin: 0; }
body {
  font-family: "Avenir Next", "Segoe UI", system-ui, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.55;
}
a { color: var(--accent-dark); text-decoration: none; }
main { max-width: 1000px; margin: 0 auto; padding: 0 20px; }

/* shared focus ring for every interactive element */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: var(--focus); outline-offset: 2px; border-radius: var(--r-sm);
}

.nav {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1000px; margin: 0 auto; padding: 18px 20px;
}
.nav nav { display: flex; gap: var(--s5); align-items: center; }
.logo { font-size: 22px; font-weight: 800; color: var(--ink); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }

.hero { text-align: center; padding: 70px 0 50px; }
.hero.narrow { max-width: 420px; margin: 0 auto; }
.hero h1 { font-size: 40px; line-height: 1.15; letter-spacing: -1px; }
.sub { color: var(--muted); font-size: 18px; margin: 18px auto 26px; max-width: 640px; }
.tiny { color: var(--muted); font-size: 13px; }

/* ---- buttons: one base, size modifiers. All share font + line-height so
   heights are always consistent regardless of context. ---- */
.btn, .btn-secondary {
  display: inline-block; font-family: inherit; font-weight: 600;
  line-height: 1.4; border: 0; border-radius: var(--r-sm);
  cursor: pointer; transition: background var(--t), box-shadow var(--t);
  text-align: center;
}
.btn { background: var(--accent); color: #fff; padding: 12px 26px; font-size: 16px; }
.btn:hover { background: var(--accent-dark); }
.btn-lg { font-size: 18px; padding: 15px 34px; }
.btn-sm { font-size: 14px; padding: 8px 16px; }
.btn-secondary {
  display: block; width: 100%; background: transparent; padding: 8px 16px;
  font-size: 14px; color: var(--accent-dark);
  box-shadow: inset 0 0 0 1px var(--accent); margin: 2px 0 var(--s3);
}
.btn-secondary:hover { background: var(--accent-soft); }
.btn-secondary:disabled, .btn:disabled { opacity: 0.6; cursor: default; }

/* text/ghost buttons */
.x { background: none; border: 0; color: var(--muted); font-size: 18px;
  cursor: pointer; transition: color var(--t); }
.x:hover { color: var(--accent); }
.x-btn { background: none; border: 0; color: var(--muted); font-size: 13px;
  cursor: pointer; transition: color var(--t); }
.x-btn:hover { color: var(--ink); }
.link-btn {
  background: none; border: 0; padding: 0; font-family: inherit; font-size: 13px;
  color: var(--muted); cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; transition: color var(--t);
}
.link-btn:hover { color: var(--accent-dark); }

section { padding: 40px 0; }
h2 { font-size: 26px; margin-bottom: 18px; letter-spacing: -0.5px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s5); }
.how h3, .features h3 { margin-bottom: 6px; font-size: 17px; }
.how p, .why p, .features p { color: var(--muted); }
.why p { max-width: 720px; margin-bottom: var(--s3); }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s5);
}
.pricing .card { text-align: center; }
.pricing .featured { border-color: var(--accent); border-width: 2px; }
.price { font-size: 40px; font-weight: 800; margin: var(--s2) 0; }
.price span { font-size: 16px; color: var(--muted); font-weight: 400; }
.pricing ul { list-style: none; padding: 0; margin: 0 0 18px; color: var(--muted); }
.pricing li { padding: 4px 0; }

/* ---- form controls: one shared height and radius ---- */
.stack { display: flex; flex-direction: column; gap: var(--s3); margin: 14px 0; }
input:not([type]), input[type="text"], input[type="email"], input[type="search"], textarea {
  font-family: inherit; font-size: 15px; line-height: 1.4;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; width: 100%; transition: border-color var(--t);
}
input:focus, textarea:focus { border-color: var(--accent); }
label { font-size: 14px; color: var(--muted); }

/* ---- toggle switch ---- */
.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s3); padding: 4px 0; cursor: pointer; color: var(--ink);
}
.toggle-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch {
  flex: none; width: 40px; height: 22px; border-radius: var(--r-pill);
  background: var(--line); position: relative; transition: background var(--t);
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25);
  transition: transform var(--t);
}
.toggle-row input:checked + .switch { background: var(--accent); }
.toggle-row input:checked + .switch::after { transform: translateX(18px); }
.toggle-row input:focus-visible + .switch { outline: var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

.dash { padding-top: 20px; }
.dash-grid { display: grid; grid-template-columns: 300px 1fr; gap: 34px; }
@media (max-width: 800px) { .dash-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 30px; } }
.kw-list { list-style: none; padding: 0; margin: 0 0 var(--s5); }
.kw-list li {
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--s2); padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 15px;
}
.warn { color: var(--accent-dark); font-size: 14px; }

.match { margin-bottom: var(--s4); }
.match-head a { font-weight: 600; font-size: 16px; }
.match-head .tiny { display: block; margin-top: 2px; }
.hot { color: var(--accent); }
.ok { color: #2e7d32; }
.competitor { color: #6a4c93; }
.snippet { color: var(--muted); font-size: 14px; margin: var(--s2) 0; }
.match-actions { display: flex; gap: var(--s3); align-items: center; margin-top: var(--s2); flex-wrap: wrap; }
.draft {
  white-space: pre-wrap; font: 14px/1.5 inherit; background: var(--surf-sunk);
  border-radius: var(--r-sm); padding: 14px; margin-top: 10px;
}
.match.replied { opacity: 0.55; }
.low-lead { display: none; }
.low-lead.shown { display: block; opacity: 0.7; }
.upgrade { margin-top: var(--s5); }

/* ---- leads header, sort + filter tabs ---- */
.leads-head { display: flex; align-items: baseline; gap: 14px; }
.sort-tabs a { color: var(--muted); transition: color var(--t); }
.sort-tabs a.on { color: var(--accent-dark); font-weight: 700; }
.filter-tabs { display: inline-flex; gap: 2px; margin: 10px 0 20px;
  background: var(--surf-panel); border-radius: var(--r-pill); padding: 3px; }
.filter-tabs a {
  color: var(--muted); border-radius: var(--r-pill); padding: 5px 14px;
  font-size: 13px; font-weight: 500; transition: color var(--t), background var(--t);
}
.filter-tabs a:hover { color: var(--ink); }
.filter-tabs a.on {
  color: var(--accent-dark); font-weight: 700; background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

/* ---- keyword suggestion chips ---- */
#kw-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.kw-chip {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 5px 12px; font-family: inherit; font-size: 13px; color: var(--ink);
  cursor: pointer; transition: border-color var(--t), color var(--t);
}
.kw-chip:hover { border-color: var(--accent); color: var(--accent-dark); }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 0; }
footer .tiny { margin-top: var(--s2); }

.legal { max-width: 680px; margin: 0 auto; padding: 30px 0 60px; }
.legal h1 { font-size: 30px; margin-bottom: var(--s2); }
.legal h2 { font-size: 18px; margin: 26px 0 var(--s2); }
.legal p, .legal li { color: var(--muted); font-size: 15px; margin-bottom: var(--s2); }
.legal ul { padding-left: 20px; }

.waitlist-cta { text-align: center; background: var(--surf-panel); border-radius: var(--r-lg);
  padding: 40px 24px; margin: 20px 0; }
.waitlist-cta h2 { margin-bottom: 10px; }
.waitlist-cta p { color: var(--muted); max-width: 560px; margin: 0 auto 18px; }
.wl-form { display: flex; gap: var(--s2); max-width: 420px; margin: 0 auto;
  flex-wrap: wrap; justify-content: center; }
.wl-form input { flex: 1; min-width: 220px; }

.archived { color: #b04216; }
.stale { color: #c77d0a; }
.fullpost { margin: 6px 0 2px; }
.fullpost summary { font-size: 13px; color: var(--accent-dark); cursor: pointer;
  list-style: none; display: inline-block; }
.fullpost summary::-webkit-details-marker { display: none; }
.fullpost summary::before { content: "▸ "; }
.fullpost[open] summary::before { content: "▾ "; }
.fullpost-body { white-space: pre-wrap; font-size: 14px; color: var(--ink);
  background: var(--surf-sunk); border-radius: var(--r-sm); padding: 12px 14px;
  margin-top: 8px; max-height: 340px; overflow-y: auto; }

.snippet, .fullpost-body, .draft { overflow-wrap: anywhere; }

.features .cols { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* ---- match card: clear separation of context vs assessment vs post ---- */
.match-title { font-weight: 600; font-size: 16px; display: block; }
.match-context { display: block; margin-top: 3px; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.badge {
  display: inline-flex; align-items: center; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: var(--r-pill); line-height: 1.5;
}
.badge-match { background: #eef6f4; color: var(--accent-dark); }
.badge-hot { background: var(--accent); color: #fff; }
.badge-competitor { background: #efeafc; color: #6a4c93; }
.badge-archived { background: #fbeae4; color: #b04216; }
.badge-stale { background: #fcf1dc; color: #9a6407; }
.badge-ok { background: #e6f4ea; color: #2e7d32; }
.post-body { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.post-body .snippet { margin: 0; color: var(--ink); }
