:root {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --ink: #1c2421;
  --muted: #5b6661;
  --line: #e3dfd6;
  --field: #cfc9bc;
  --brand: #1f5c4d;
  --brand-dark: #174739;
  --brand-soft: #e4ede8;
  --error: #b3261e;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 0.5em; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 5.5vw, 2.9rem); letter-spacing: -0.015em; }
h2 { font-size: clamp(1.3rem, 3.5vw, 1.7rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 760px; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

/* Header and footer */
.site-header { padding: 16px 0; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-size: 1.05rem; font-weight: 700; text-decoration: none; }
.brand::before { content: ""; flex: none; width: 28px; height: 28px; background: url("/favicon.svg") center / contain no-repeat; }
.site-footer { padding: 32px 0 48px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0 0 0.4em; }

/* Hero and form */
.hero { padding: 8px 0 48px; }
.hero-grid { display: grid; gap: 28px; }
.eyebrow { margin-bottom: 0.5em; color: var(--brand); font-weight: 600; }
.intro { color: var(--muted); font-size: 1.125rem; }
.checks { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before {
  content: "";
  position: absolute;
  top: 0.15em;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='%231f5c4d' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px no-repeat;
}

.card {
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px rgb(0 0 0 / 0.05);
}
.form { display: grid; gap: 14px; }
.form h2 { margin-bottom: 0.25em; }
.form p { margin: 0; }
label { display: grid; gap: 6px; font-size: 0.95rem; font-weight: 600; }
input, select, button { font: inherit; font-size: 16px; }
input, select {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  color: var(--ink);
  font-weight: 400;
  background: #fff;
  border: 1px solid var(--field);
  border-radius: 10px;
}
input:focus, select:focus { border-color: var(--brand); outline: 3px solid rgb(31 92 77 / 0.25); outline-offset: 0; }
button {
  min-height: 52px;
  padding: 12px 18px;
  color: #fff;
  font-weight: 700;
  background: var(--brand);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}
button:hover { background: var(--brand-dark); }
.terms { color: var(--muted); font-size: 0.85rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Sections */
.section { padding: 48px 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.steps { display: grid; gap: 14px; margin: 20px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  position: relative;
  padding: 18px 18px 18px 66px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  counter-increment: step;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  top: 18px;
  left: 18px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  font-weight: 700;
  background: var(--brand);
  border-radius: 50%;
}
.steps strong { display: block; }
.steps span { color: var(--muted); }
.faq details { padding: 14px 0; border-bottom: 1px solid var(--line); }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 8px 0 0; color: var(--muted); }

/* Text pages */
.prose { padding-bottom: 24px; }
.prose h2 { margin-top: 1.6em; font-size: 1.25rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.5em; }
.message { margin: 24px 0 48px; }

/* Admin */
.admin-bar { display: flex; align-items: center; justify-content: space-between; }
.admin { display: grid; gap: 28px; padding-bottom: 48px; }
.table-wrap { margin-bottom: 1em; overflow-x: auto; }
.stats { width: 100%; background: var(--surface); border: 1px solid var(--line); border-collapse: collapse; }
.stats th, .stats td { padding: 10px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line); }
.stats th:first-child, .stats td:first-child { text-align: left; white-space: normal; }
.leads { display: grid; gap: 12px; align-items: start; }
.lead-card h3 { margin: 4px 0; }
.lead-card p { margin: 0 0 4px; }
.lead-card.is-new { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.meta { color: var(--muted); font-size: 0.85rem; }
.status { display: flex; gap: 8px; margin-top: 12px; }
.status select { flex: 1; min-height: 44px; }
.status button { min-height: 44px; padding: 8px 14px; }
.login { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login form { width: min(340px, 100%); }
.error { color: var(--error); }

@media (min-width: 700px) {
  .card { padding: 28px; }
  .leads { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

@media (min-width: 860px) {
  .hero { padding: 24px 0 72px; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start; }
  .hero-text { padding-top: 32px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
}
