:root {
  color-scheme: light;
  --paper: #f6f7f2;
  --ink: #17171d;
  --muted: #5d6470;
  --card: #ffffff;
  --line: #dce0d8;
  --dark: #171820;
  --teal: #12816d;
  --coral: #c84f3b;
  --amber: #b6801c;
  --violet: #6650b6;
  --blue: #2c64a6;
  --green-soft: #dff4eb;
  --coral-soft: #fde8df;
  --violet-soft: #eee9ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(18, 129, 109, 0.1), rgba(246, 247, 242, 0) 340px),
    radial-gradient(circle at top right, rgba(200, 79, 59, 0.12), transparent 360px),
    var(--paper);
  color: var(--ink);
  font-family: Inter, Avenir, "Avenir Next", "Segoe UI", Arial, sans-serif;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.topbar a {
  color: var(--ink);
  font-weight: 900;
  text-decoration: none;
}

main {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 10px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  gap: 28px;
  align-items: stretch;
  min-height: 620px;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.78)),
    repeating-linear-gradient(90deg, rgba(23, 23, 29, 0.03) 0, rgba(23, 23, 29, 0.03) 1px, transparent 1px, transparent 34px);
  box-shadow: 0 22px 52px rgba(23, 23, 29, 0.08);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 20px;
  font-size: 3.65rem;
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 12px;
  font-size: 1.74rem;
  line-height: 1.14;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

p,
li,
.event-row span,
.check-row span,
small {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.58;
}

.lead {
  max-width: 690px;
  font-size: 1.16rem;
}

.proof-note {
  width: fit-content;
  max-width: 100%;
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(18, 129, 109, 0.24);
  border-radius: 8px;
  background: var(--green-soft);
  color: #0f6a59;
  font-weight: 900;
}

.tracking-console {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.console-head,
.console-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.console-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
}

.console-head div {
  display: flex;
  gap: 8px;
}

.dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red {
  background: #fa7360;
}

.dot-amber {
  background: #f0b94c;
}

.dot-green {
  background: #49d393;
}

.console-head strong,
.console-footer strong {
  color: #fff;
  font-size: 0.9rem;
}

.console-footer span {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.channel-card {
  min-height: 144px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: #222431;
}

.channel-card span {
  display: block;
  margin-bottom: 28px;
  color: rgba(255, 255, 255, 0.68);
  font-weight: 900;
}

.channel-card strong {
  display: block;
  color: #fff;
  font-size: 1.02rem;
}

.channel-card small {
  color: rgba(255, 255, 255, 0.66);
}

.channel-card.meta {
  border-top: 6px solid var(--blue);
}

.channel-card.google {
  border-top: 6px solid var(--amber);
}

.channel-card.tiktok {
  border-top: 6px solid var(--coral);
}

.journey-strip {
  display: grid;
  gap: 12px;
  padding: 0 18px 18px;
}

.journey-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left-width: 8px;
  border-radius: 8px;
  background: #20222e;
}

.journey-step b {
  color: #fff;
  font-size: 1.12rem;
}

.journey-step span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.9rem;
  font-weight: 800;
}

.journey-step.good {
  border-left-color: var(--teal);
}

.journey-step.warn {
  border-left-color: var(--amber);
}

.journey-step.alert {
  border-left-color: var(--coral);
}

.summary-grid,
.payload-grid,
.systems-grid,
.intake-limits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.summary-grid article,
.validation-card,
.system-card,
.intake-card,
.limit-card {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  box-shadow: 0 12px 34px rgba(23, 23, 29, 0.06);
}

.tag {
  display: inline-block;
  margin-bottom: 14px;
  padding: 7px 9px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tag.teal {
  background: var(--green-soft);
  color: var(--teal);
}

.tag.coral {
  background: var(--coral-soft);
  color: var(--coral);
}

.tag.violet {
  background: var(--violet-soft);
  color: var(--violet);
}

.event-section,
.lab-section,
.systems-section,
.acceptance {
  margin-top: 18px;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
}

.section-heading {
  max-width: 760px;
}

.event-table,
.check-table {
  display: grid;
  margin-top: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.event-row,
.check-row {
  display: grid;
  grid-template-columns: 0.78fr 1fr 1.1fr 1.12fr;
  min-width: 0;
  border-top: 1px solid var(--line);
}

.check-row {
  grid-template-columns: 0.78fr 1.22fr 1.16fr;
}

.event-row:first-child,
.check-row:first-child {
  border-top: 0;
}

.event-row span,
.check-row span {
  min-width: 0;
  padding: 15px;
  border-left: 1px solid var(--line);
  overflow-wrap: anywhere;
}

.event-row span:first-child,
.check-row span:first-child {
  border-left: 0;
}

.event-row.head,
.check-row.head {
  background: #eff2eb;
}

.event-row.head span,
.check-row.head span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.payload-grid {
  grid-template-columns: 1.2fr repeat(3, minmax(0, 0.9fr));
}

.payload-card {
  min-width: 0;
  padding: 24px;
  border-radius: 8px;
  background: var(--dark);
  color: #fff;
  box-shadow: 0 12px 34px rgba(23, 23, 29, 0.08);
}

.payload-card .card-kicker {
  color: #8fe4d5;
}

pre {
  margin: 0;
  overflow: auto;
  white-space: pre-wrap;
}

code {
  color: #f8f6ec;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.92rem;
  line-height: 1.56;
}

.validation-card span {
  display: block;
  margin-bottom: 18px;
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.validation-card strong {
  display: block;
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 1.18rem;
  line-height: 1.18;
}

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

.system-visual {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  padding: 18px;
  border-radius: 8px;
  background: #f1f3ec;
}

.system-visual span,
.system-visual strong {
  min-width: 0;
  padding: 12px;
  border-radius: 8px;
  text-align: center;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.system-visual span {
  background: #fff;
  color: var(--muted);
}

.system-visual strong {
  background: var(--dark);
  color: #fff;
}

.dedupe {
  border-left: 8px solid var(--teal);
}

.audience {
  border-left: 8px solid var(--coral);
}

.intake-limits {
  align-items: stretch;
  margin-top: 18px;
}

.intake-card ul {
  margin: 0;
  padding-left: 20px;
}

.limit-card {
  background:
    linear-gradient(135deg, rgba(102, 80, 182, 0.12), rgba(255, 255, 255, 0.9)),
    #fff;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 34px;
  }

  h1 {
    font-size: 3rem;
  }

  .summary-grid,
  .payload-grid {
    grid-template-columns: 1fr;
  }

  .systems-grid,
  .intake-limits {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    flex-direction: column;
    gap: 6px;
  }

  main {
    width: min(100% - 24px, 1180px);
    padding-bottom: 42px;
  }

  .hero,
  .event-section,
  .lab-section,
  .systems-section,
  .acceptance {
    padding: 22px;
  }

  h1 {
    font-size: 2.32rem;
    line-height: 1.04;
  }

  h2 {
    font-size: 1.46rem;
  }

  .channel-grid {
    grid-template-columns: 1fr;
  }

  .channel-card {
    min-height: auto;
  }

  .channel-card span {
    margin-bottom: 10px;
  }

  .journey-step,
  .system-visual {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .event-row,
  .check-row {
    grid-template-columns: 1fr;
  }

  .event-row span,
  .check-row span {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .event-row span:first-child,
  .check-row span:first-child {
    border-top: 0;
  }
}
