:root {
  --bg: #f5f7f6;
  --surface: #ffffff;
  --surface-2: #edf3f1;
  --ink: #16201d;
  --muted: #5d6d68;
  --line: #d9e2df;
  --brand: #0f6b57;
  --brand-dark: #0b4338;
  --accent: #d7902f;
  --blue: #255f8f;
  --danger: #b23b3b;
  --shadow: 0 18px 42px rgba(18, 32, 29, 0.11);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family:
    Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-shell {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(217, 226, 223, 0.86);
  background: rgba(245, 247, 246, 0.93);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  min-height: 68px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--brand-dark);
  border-radius: 8px;
  font-size: 13px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--muted);
  font-size: 14px;
}

.nav a {
  text-decoration: none;
}

.nav a:hover {
  color: var(--brand-dark);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  align-items: center;
  padding: 54px 0 72px;
  overflow: hidden;
  color: #fff;
  background: #15211e;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12, 25, 22, 0.92) 0%, rgba(12, 25, 22, 0.75) 43%, rgba(12, 25, 22, 0.16) 100%),
    url("/assets/seo-analytics-hero.png") center right / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 74px;
  background: linear-gradient(180deg, rgba(245, 247, 246, 0), var(--bg));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 690px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: #cfe4de;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
  line-height: 1.08;
}

h1 {
  max-width: 820px;
  font-size: clamp(38px, 6vw, 74px);
}

h2 {
  font-size: clamp(28px, 4vw, 46px);
}

h3 {
  font-size: 21px;
}

.lead {
  margin: 22px 0 0;
  max-width: 680px;
  color: #d9e9e4;
  font-size: clamp(18px, 2.2vw, 23px);
}

.hero-actions,
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand);
  font-weight: 800;
  text-decoration: none;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
  background: var(--brand-dark);
}

.button.secondary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.button.light {
  color: var(--brand-dark);
  border-color: var(--line);
  background: #fff;
}

.button.warning {
  background: var(--accent);
}

.section {
  padding: 74px 0;
}

.section.compact {
  padding: 46px 0;
}

.section-head {
  display: grid;
  gap: 12px;
  max-width: 790px;
  margin-bottom: 28px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  min-height: 100%;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(18, 32, 29, 0.06);
}

.card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 18px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.check-item {
  position: relative;
  padding-left: 32px;
}

.check-item::before {
  content: "";
  position: absolute;
  top: 4px;
  left: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--brand);
  border-radius: 50%;
}

.check-item::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 6px;
  width: 7px;
  height: 4px;
  border-bottom: 2px solid var(--brand);
  border-left: 2px solid var(--brand);
  transform: rotate(-45deg);
}

.band {
  color: #fff;
  background: #17221f;
}

.band .section-head p,
.band .card p {
  color: #c9d8d3;
}

.band .card {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.band .card strong {
  color: #fff;
}

.trust {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: start;
}

.trust-panel {
  padding: 30px;
  border-radius: var(--radius);
  color: #fff;
  background: var(--brand-dark);
}

.trust-panel p {
  color: #d7ebe5;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.metric {
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
}

.metric b {
  display: block;
  font-size: 25px;
}

.metric span {
  color: #cde1dc;
  font-size: 13px;
}

.quiz-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quiz-top {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #d7e2df;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand);
  transition: width 0.24s ease;
}

.quiz-body {
  padding: 28px;
}

.quiz-question {
  display: grid;
  gap: 18px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option {
  position: relative;
  display: flex;
  min-height: 58px;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
}

.option:has(input:checked) {
  border-color: var(--brand);
  background: #edf8f4;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea,
.field select,
.filter input,
.filter select {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.privacy {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
}

.privacy input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.error {
  color: var(--danger);
  font-size: 14px;
  font-weight: 700;
}

.success {
  color: var(--brand-dark);
  font-weight: 800;
}

.breadcrumbs {
  margin-bottom: 18px;
  color: #cde1dc;
  font-size: 14px;
}

.breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.thank-you {
  min-height: calc(100vh - 68px);
  padding: 64px 0;
}

.thank-you-panel {
  max-width: 860px;
  padding: 34px;
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.admin {
  padding: 28px 0 60px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.admin-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
}

.admin-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  background: #fbfcfc;
}

tr[data-lead-id] {
  cursor: pointer;
}

tr[data-lead-id]:hover {
  background: #f1f6f4;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #e7efed;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.hot {
  background: #ffe9c7;
  color: #79490c;
}

.badge.warm {
  background: #e1f2ff;
  color: #164e78;
}

.badge.cold {
  background: #edf1f0;
  color: #4b5b56;
}

.lead-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.lead-card dl {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 12px;
  margin: 0;
}

.lead-card dt {
  color: var(--muted);
  font-size: 13px;
}

.lead-card dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.bulk-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
}

.bulk-row select,
.bulk-row input {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

footer {
  padding: 28px 0;
  color: #c8d8d3;
  background: #101917;
}

footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: space-between;
}

@media (max-width: 980px) {
  .grid.three,
  .grid.four,
  .trust,
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 12px 0;
  }

  .nav {
    width: 100%;
    gap: 11px;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero {
    min-height: 760px;
    padding: 38px 0 86px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(12, 25, 22, 0.96) 0%, rgba(12, 25, 22, 0.8) 58%, rgba(12, 25, 22, 0.34) 100%),
      url("/assets/seo-analytics-hero.png") center bottom / cover no-repeat;
  }

  .section {
    padding: 52px 0;
  }

  .grid.two,
  .option-grid,
  .field-grid,
  .metrics-row,
  .filters {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .actions,
  .quiz-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .quiz-body {
    padding: 20px;
  }

  .lead-card dl {
    grid-template-columns: 1fr;
  }

  .admin-panel-head {
    align-items: stretch;
    flex-direction: column;
  }
}
