:root {
  --paper: #FFFFFF;
  --ink: #172033;
  --graphite: #5B6475;
  --rule: #E3E6EC;
  --marker: #FFE14D;
  --error: #B42318;
  --font-heading: "Bricolage Grotesque", sans-serif;
  --font-body: "Public Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
}

a {
  color: var(--ink);
}
a:hover {
  color: var(--graphite);
}

a:focus-visible,
input:focus-visible,
button:focus-visible {
  outline: 3px solid var(--marker);
  outline-offset: 0;
  box-shadow: 0 0 0 5px var(--ink);
}

h1, h2 {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 700;
}
h1 {
  font-size: 42px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
h1.display {
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.lead {
  margin: 0;
  font-size: 20px;
  line-height: 1.45;
  color: var(--graphite);
  max-width: 640px;
}
.body {
  margin: 0;
  font-size: 18px;
  line-height: 1.55;
}
.small {
  font-size: 15px;
  line-height: 1.5;
}
.muted {
  color: var(--graphite);
}

/* Layout */
.page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.site-header {
  height: 72px;
  box-sizing: border-box;
  padding: 0 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}
.site-main {
  flex: 1 1 auto;
  box-sizing: border-box;
  padding: 88px 120px 72px;
  display: flex;
  flex-direction: column;
  gap: 48px;
}
.site-footer {
  box-sizing: border-box;
  padding: 32px 120px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
  line-height: 1.5;
  color: var(--graphite);
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.wordmark {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 760px;
}
.hero-row {
  display: flex;
  gap: 72px;
  align-items: flex-start;
  flex-wrap: wrap;
}
/* Landing: headline beside the form, then the source map */
.hero-row .hero {
  flex: 1 1 480px;
}

/* Landing: the source map */
.source-map {
  margin: 64px 0 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1040px;
}
.source-map-scroll {
  overflow-x: auto;
}
#source-map {
  display: block;
  width: 100%;
  min-width: 680px;
  height: auto;
}
#source-map text {
  font-family: var(--font-body);
  font-size: 15px;
  fill: var(--ink);
}
#source-map .t-sub {
  font-size: 13px;
  fill: var(--graphite);
}
#source-map .t-head {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
}
#source-map .node {
  fill: var(--paper);
  stroke: var(--rule);
  stroke-width: 1.5;
}
#source-map .node-strong {
  stroke: var(--ink);
  stroke-width: 2;
}
#source-map .edge {
  fill: none;
  stroke: var(--graphite);
  stroke-width: 1.5;
  stroke-dasharray: var(--len, 0);
  transition: stroke-dashoffset 700ms ease-in-out, opacity 400ms ease-out;
}
#source-map .edge.feed {
  stroke: var(--ink);
  stroke-width: 2;
}
#source-map .edge.glow {
  stroke: var(--marker);
  stroke-width: 8;
  stroke-linecap: round;
}
#source-map .chip rect,
#source-map .hl {
  fill: var(--marker);
}
#source-map .chip text {
  font-weight: 600;
  font-size: 13px;
}
#source-map .chip,
#source-map .named {
  transition: opacity 400ms ease-out;
}
#source-map.instant,
#source-map.instant * {
  transition: none;
}
.source-map figcaption .text-btn {
  margin-left: 8px;
}

/* Header nav */
a.wordmark {
  color: var(--ink);
  text-decoration: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.btn.btn-sm {
  height: 44px;
  padding: 0 18px;
  font-size: 16px;
}

/* Product and pricing pages */
.doc {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: 1040px;
}
.doc-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.doc h3 {
  margin: 0 0 6px;
  font-family: var(--font-heading);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.step-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  max-width: 720px;
}
.step-list li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
}
.step-num {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
}
.tour {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px 56px;
}
.tour-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tour-visual {
  margin-top: 8px;
  padding: 20px;
  border: 1px solid var(--rule);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tour-number {
  margin: 0;
  font-size: 18px;
}
.tour-gap {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.tour-gap + .tour-gap,
.tour-page + .tour-page {
  padding-top: 12px;
  border-top: 1px solid var(--rule);
}
.tour-gap-n {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
}
.tour-bars {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 12px;
}
.tour-page {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
}
.plain-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 680px;
}
.faq {
  margin: 0;
  max-width: 680px;
}
.faq dt {
  font-weight: 600;
  font-size: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}
.faq dd {
  margin: 6px 0 20px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--graphite);
}
.plan {
  max-width: 560px;
  padding: 32px;
  border: 2px solid var(--ink);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.plan-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.plan-price {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
}

/* Report: per-engine results */
.report-figure .dot-grid.dense {
  grid-template-columns: repeat(20, 10px);
  gap: 5px;
}
.report-figure .dot-grid.dense .dot {
  width: 10px;
  height: 10px;
  border-width: 1.5px;
}
.engine-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  font-size: 17px;
}
.engine-rows li {
  display: flex;
  gap: 8px;
}
.engine-tag {
  display: inline-block;
  margin: 2px 6px 2px 0;
  padding: 2px 8px;
  border: 1px solid var(--graphite);
  border-radius: 2px;
  font-size: 14px;
  white-space: nowrap;
}

/* Admin */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}
.admin-nav a {
  font-weight: 500;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.admin-nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration-thickness: 3px;
}
.admin-nav form {
  margin-left: auto;
}
.admin {
  display: flex;
  flex-direction: column;
  gap: 56px;
}
.admin section {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.admin .stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px 32px;
}
.stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat .bar-track {
  flex: none;
  display: block;
  height: 8px;
  max-width: 200px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.stat .bar {
  height: 100%;
}
.stat-n {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.admin .admin-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
}
.table-scroll {
  overflow-x: auto;
}
.outreach-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.outreach-form input,
.outreach-form select,
.outreach-add select {
  height: 40px;
  padding: 0 10px;
  font: 15px var(--font-body);
  border: 1px solid var(--graphite);
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
}
.outreach-form input {
  width: 150px;
}
.outreach-add {
  display: grid;
  grid-template-columns: 200px minmax(0, 420px);
  gap: 12px 16px;
  align-items: center;
}
.outreach-add .btn {
  grid-column: 2;
  justify-self: start;
}

/* Buttons */
.btn {
  height: 56px;
  min-height: 44px;
  padding: 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}
.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--ink);
}

/* Form fields */
.scan-form {
  width: 400px;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 4px;
}
label {
  font-size: 18px;
  font-weight: 600;
}
.field {
  height: 56px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 16px;
  font-size: 18px;
  font-family: var(--font-body);
  border: 2px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
}

.error-summary,
.error-inline {
  margin: 0;
  color: var(--error);
}
.field-error {
  border-color: var(--error);
}

/* Dots */
.dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  box-sizing: border-box;
  border: 2px solid var(--graphite);
}
.dot.sm {
  width: 12px;
  height: 12px;
}
.dot.on {
  background: var(--ink);
  border-color: var(--ink);
}
.dot.on.animate {
  animation: dot-fill 420ms ease-out both;
}
.dot-row {
  display: inline-flex;
  gap: 6px;
}
.dot-grid {
  display: grid;
  grid-template-columns: repeat(10, 14px);
  gap: 10px 12px;
}
@keyframes dot-fill {
  from { background: var(--paper); border-color: var(--graphite); transform: scale(.6); }
  to { background: var(--ink); border-color: var(--ink); transform: scale(1); }
}

/* Brand-name highlight */
.mark {
  background: var(--marker);
  padding: 0 3px;
  border-radius: 2px;
  font-weight: 600;
}

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  font-size: 16px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}
th {
  text-align: left;
  font-weight: 600;
  font-size: 15px;
  color: var(--graphite);
  padding: 0 16px 12px 0;
  border-bottom: 1px solid var(--ink);
}
td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}

/* Tabs */
.tablist {
  display: flex;
  border-bottom: 1px solid var(--rule);
}
.tab {
  height: 48px;
  padding: 0 4px;
  margin-right: 28px;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--graphite);
  cursor: pointer;
}
.tab.on {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

/* Gap rows: <details class="gap"> with the row in <summary> */
.gap {
  border-top: 1px solid var(--rule);
}
.gap > summary {
  list-style: none;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  min-height: 44px;
  font-size: inherit;
  font-weight: inherit;
  text-decoration: none;
  color: var(--ink);
  cursor: pointer;
}
.gap > summary::-webkit-details-marker {
  display: none;
}
.gap > summary:focus-visible {
  outline: 3px solid var(--marker);
  outline-offset: 0;
  box-shadow: 0 0 0 5px var(--ink);
}
.gap > summary:hover .gap-title {
  text-decoration: underline;
}
.gap-number {
  font-family: var(--font-heading);
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.gap-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.gap-title {
  font-size: 21px;
  font-weight: 600;
}
.gap-won {
  font-size: 16px;
}
.chev {
  transition: transform 180ms ease-out;
}
.gap[open] .chev {
  transform: rotate(180deg);
}
.gap-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  padding: 0 0 32px 144px;
}
.gap-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gap-label {
  font-size: 15px;
  font-weight: 600;
}
.gap-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 16px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
}
.dot-row {
  flex-shrink: 0;
}
.list-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  padding: 4px 0;
  overflow-wrap: anywhere;
}

/* Bars */
.bar {
  display: block;
  height: 12px;
  background: var(--ink);
  border-radius: 2px;
}

/* Progress bar */
.progress-track {
  display: block;
  width: 320px;
  max-width: 100%;
  height: 10px;
  background: var(--rule);
  border-radius: 5px;
  overflow: hidden;
}
.progress-fill {
  display: block;
  height: 100%;
  background: var(--ink);
}

/* Running screen steps */
.progress-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.steps {
  display: flex;
  flex-direction: column;
}
.early-look {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 56px;
  max-width: 680px;
}
.look-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.look-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}
.look-q {
  font-weight: 600;
}
.step {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  min-height: 64px;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
}
.step-label {
  font-weight: 600;
}
.step-progress {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Setup screen */
.setup {
  display: flex;
  flex-direction: column;
  gap: 40px;
  max-width: 760px;
}
.q-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
h2.group {
  font-size: 18px;
  font-weight: 600;
  padding-top: 8px;
  letter-spacing: normal;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 56px;
  border-bottom: 1px solid var(--rule);
  font-size: 17px;
  flex-wrap: wrap;
}
.text-btn {
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  background: none;
  border: none;
  text-decoration: underline;
  min-height: 44px;
  padding: 0 4px;
  cursor: pointer;
}
summary {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: underline;
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 12px 0;
}
.add-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.inline-form {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.inline-form .field {
  flex-grow: 1;
  min-width: 200px;
}
.start-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 480px;
}
.start-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.start-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

/* Report screen */
.header-link {
  font-size: 16px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.report {
  display: flex;
  flex-direction: column;
  gap: 72px;
  max-width: 1040px;
}
.report-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 56px;
  align-items: center;
}
.report-hero-text {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.report-meta {
  font-size: 16px;
}
.report-lead {
  margin: 0;
  font-size: 21px;
  line-height: 1.45;
}
.report-note {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
}
.report-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.report-figure figcaption {
  margin: 0;
}
.gaps {
  display: flex;
  flex-direction: column;
}
.gaps h2 {
  padding-bottom: 8px;
}
.gaps-intro {
  margin: 0 0 16px;
  font-size: 17px;
}
.report-tabs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.tab-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tab-panel[hidden] {
  display: none;
}
.table-narrow {
  max-width: 760px;
}
.table-checks {
  max-width: 900px;
}
.col-name {
  width: 240px;
}
.col-dots {
  width: 140px;
}
.col-count {
  width: 120px;
}
.col-comp {
  width: 220px;
}
.col-check {
  width: 420px;
}
.strong {
  font-weight: 600;
}
.bar-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}
.bar-track {
  flex: 0 1 320px;
}
.cell-url {
  overflow-wrap: anywhere;
}
.cell-url a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.pitch {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 760px;
  padding-top: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .dot.on.animate {
    animation: none;
  }
  .chev {
    transition: none;
  }
}

@media (max-width: 760px) {
  .site-header,
  .site-main,
  .site-footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  .hero-row {
    flex-direction: column;
    gap: 32px;
  }
  .site-header {
    height: auto;
    min-height: 64px;
    padding-top: 10px;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 4px 16px;
  }
  .site-nav {
    gap: 4px 14px;
    flex-wrap: wrap;
  }
  .btn.btn-sm {
    padding: 0 12px;
    font-size: 15px;
  }
  .site-nav .header-link {
    font-size: 15px;
  }
  .tour {
    grid-template-columns: 1fr;
  }
  h1.display {
    font-size: 40px;
  }
  .plan {
    padding: 24px 20px;
  }
  .outreach-add {
    grid-template-columns: 1fr;
  }
  .outreach-add .btn {
    grid-column: 1;
  }
  .scan-form {
    width: 100%;
  }
  .dot {
    width: 12px;
    height: 12px;
  }
  .dot-grid {
    grid-template-columns: repeat(6, 12px);
  }
  .inline-form {
    flex-direction: column;
    align-items: stretch;
  }
  .step {
    grid-template-columns: 1fr;
    gap: 4px;
    min-height: 0;
    padding: 12px 0;
  }
  .report-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .report-hero h1.display {
    font-size: 40px;
  }
  .report-figure .dot-grid {
    grid-template-columns: repeat(10, 12px);
  }
  .gap > summary {
    grid-template-columns: minmax(0, 1fr) 24px;
    gap: 8px 16px;
  }
  .gap-number {
    grid-column: 1 / -1;
    font-size: 32px;
  }
  .gap-body {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 0 0 32px;
  }
  .tablist {
    overflow-x: auto;
  }
  .tab {
    flex-shrink: 0;
    margin-right: 20px;
  }
  .col-name,
  .col-comp,
  .col-check {
    width: auto;
  }
  .table-checks td,
  .table-checks tr {
    display: block;
  }
  .table-checks td:first-child {
    border-bottom: none;
    padding-bottom: 4px;
  }
}
