/* ============================================================
   Reach — design system (pure CSS, no build step)
   ============================================================ */
:root {
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --brand: #4f46e5;
  --brand-dark: #4338ca;
  --brand-soft: #eef2ff;
  --saffron: #f59e0b;
  --green: #059669;
  --green-soft: #ecfdf5;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

/* ---------- App shell (embedded admin) ---------- */
.app-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 800;
}
.app-nav { display: flex; gap: 4px; flex: 1; }
.app-nav a {
  padding: 7px 14px; border-radius: 9px; color: var(--muted);
  font-weight: 600; font-size: 14px;
}
.app-nav a:hover { background: var(--bg); color: var(--ink); }
.app-nav a.active { background: var(--brand-soft); color: var(--brand-dark); }

.plan-badge {
  font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  background: var(--green-soft); color: var(--green);
  white-space: nowrap;
}
.plan-badge.free { background: var(--brand-soft); color: var(--brand-dark); }

.app-main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 64px; }

/* ---------- Cards & stats ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 24px;
}
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.grid { display: grid; gap: 16px; }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 760px) { .grid.cols-2 { grid-template-columns: 1fr; } }

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px;
}
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin-top: 2px; }
.stat .delta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat .value.green { color: var(--green); }
.stat .value.brand { color: var(--brand); }

/* ---------- Funnel ---------- */
.funnel-row { display: grid; grid-template-columns: 150px 1fr 96px 84px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.funnel-row:last-child { border-bottom: 0; }
.funnel-row .fname { font-weight: 600; font-size: 14px; }
.funnel-track { background: var(--bg); border-radius: 999px; height: 12px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), #8b5cf6); min-width: 4px; }
.funnel-row.highlight .funnel-fill { background: linear-gradient(90deg, var(--green), #34d399); }
.funnel-count { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.funnel-cv { color: var(--muted); font-size: 12px; text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
  .funnel-row { grid-template-columns: 120px 1fr 70px; }
  .funnel-cv { display: none; }
}

/* ---------- Chart ---------- */
.chart { display: flex; align-items: flex-end; gap: 6px; height: 150px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; height: 100%; }
.chart .bar .col { width: 100%; background: var(--brand-soft); border: 1px solid #e0e7ff; border-radius: 6px 6px 0 0; min-height: 2px; transition: background .2s; }
.chart .bar:hover .col { background: var(--brand); }
.chart .bar .day { font-size: 10px; color: var(--muted); }

/* ---------- Tables ---------- */
table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.list td { padding: 10px; border-bottom: 1px solid var(--line); }
table.list tr:last-child td { border-bottom: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; transition: all .15s;
  font-family: var(--font); text-decoration: none;
}
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-saffron { background: var(--saffron); color: #fff; }
.btn-saffron:hover { background: #d97706; color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: #cbd5e1; background: var(--bg); }
.btn-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 12px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field .hint { color: var(--muted); font-size: 12.5px; margin-top: 6px; }
.input, input[type=text], input[type=url], input[type=password], textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 14px; font-family: var(--font); background: #fff; color: var(--ink);
}
.input:focus, input:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(79, 70, 229, .12); }
textarea { resize: vertical; }

/* ---------- Badges / tags / alerts ---------- */
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark);
}
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: #fffbeb; color: #b45309; }
.tag.gray { background: #f1f5f9; color: var(--muted); }

.alert {
  padding: 12px 16px; border-radius: 10px; font-size: 14px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.alert.success { background: var(--green-soft); color: #065f46; border: 1px solid #a7f3d0; }
.alert.error { background: var(--red-soft); color: #991b1b; border: 1px solid #fecaca; }
.alert.info { background: var(--brand-soft); color: #3730a3; border: 1px solid #c7d2fe; }

.page-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 4px; }
.page-sub { color: var(--muted); margin: 0 0 24px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-16 { margin-top: 16px; } .mb-16 { margin-bottom: 16px; }

/* ---------- Landing page ---------- */
.landing { background: #fff; color: var(--ink); }
.landing .wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.landing .nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.landing .hero { padding: 72px 0 56px; text-align: center; }
.landing .hero h1 {
  font-size: clamp(30px, 5vw, 48px); font-weight: 900; letter-spacing: -0.03em;
  line-height: 1.1; margin: 0 auto 18px; max-width: 800px;
}
.landing .hero h1 .grad {
  background: linear-gradient(90deg, var(--brand), #9333ea);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.landing .hero p.lede { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.landing .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; background: #fffbeb;
  border: 1px solid #fde68a; color: #92400e; font-weight: 700; font-size: 13px;
  padding: 6px 14px; border-radius: 999px; margin-bottom: 20px;
}
.landing .cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.landing .trust { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.landing .trust span { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.landing section { padding: 56px 0; border-top: 1px solid var(--line); }
.landing h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; text-align: center; margin: 0 0 12px; }
.landing section > .wrap > p.sec-lede { text-align: center; color: var(--muted); max-width: 560px; margin: 0 auto 36px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.step { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.step .num {
  width: 34px; height: 34px; border-radius: 10px; background: var(--brand-soft);
  color: var(--brand-dark); font-weight: 800; display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.step h4 { margin: 0 0 6px; font-size: 16px; }
.step p { color: var(--muted); font-size: 14px; margin: 0; }
.funnel-strip { display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: 8px; }
.funnel-strip .chip {
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 700; font-size: 13.5px;
  padding: 10px 16px; border-radius: 10px;
}
.funnel-strip .chip.dark { background: var(--ink); color: #fff; }
.funnel-strip .arrow { color: var(--muted); font-size: 18px; }
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 720px; margin: 0 auto; }
@media (max-width: 700px) { .pricing { grid-template-columns: 1fr; } }
.price-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.price-card.featured { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand), var(--shadow); }
.price-card .name { font-weight: 800; font-size: 17px; }
.price-card .price { font-size: 34px; font-weight: 900; letter-spacing: -0.02em; margin: 8px 0 2px; }
.price-card .price small { font-size: 15px; font-weight: 600; color: var(--muted); }
.price-card .per { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 20px; }
.price-card li { padding: 6px 0; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.price-card li::before { content: "✓"; color: var(--green); font-weight: 800; }
.ribbon {
  position: absolute; top: -11px; right: 18px; background: var(--saffron); color: #fff;
  font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 999px;
}
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 700; cursor: pointer; font-size: 15px; }
.faq details p { color: var(--muted); margin: 10px 0 0; font-size: 14px; }
.landing .footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 13px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
