/* SERPent marketing site. Colours and type follow BRAND.md. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Metric-matched fallback so the swap to Inter doesn't shift layout. */
@font-face {
  font-family: 'Inter Fallback';
  src: local('Arial');
  size-adjust: 107.12%;
  ascent-override: 90.44%;
  descent-override: 22.52%;
  line-gap-override: 0%;
}

/* ---- Tokens ---------------------------------------------------------- */

:root {
  --purple: #7c3aed;
  --purple-light: #a78bfa;
  --purple-tint: #ede9fe;
  --tongue: #ed3631;

  --bg: #ffffff;
  --panel: #f7f7f8;
  --card: #ffffff;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --muted: #71717a;
  --link: #6d28d9;
  --accent-text: #6d28d9;
  --soft: #ede9fe;
  --soft-text: #5b21b6;
  --bar: #c4b5fd;
  --bar-you: #7c3aed;
  --row-you: #f5f3ff;
  --shadow: 0 1px 2px rgb(24 24 27 / 0.04), 0 8px 24px rgb(24 24 27 / 0.06);

  --radius: 12px;
  --radius-sm: 8px;
  --font: 'Inter', 'Inter Fallback', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --container: 1160px;
  --gutter: 16px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #1f1f23;
    --panel: #26262b;
    --card: #2a2a30;
    --border: #34343b;
    --border-strong: #44444c;
    --text: #fafafa;
    --muted: #a1a1aa;
    --link: #a78bfa;
    --accent-text: #a78bfa;
    --soft: #2e2547;
    --soft-text: #ddd6fe;
    --bar: #4c3a8a;
    --bar-you: #8b5cf6;
    --row-you: #2f2a40;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #1f1f23;
  --panel: #26262b;
  --card: #2a2a30;
  --border: #34343b;
  --border-strong: #44444c;
  --text: #fafafa;
  --muted: #a1a1aa;
  --link: #a78bfa;
  --accent-text: #a78bfa;
  --soft: #2e2547;
  --soft-text: #ddd6fe;
  --bar: #4c3a8a;
  --bar-you: #8b5cf6;
  --row-you: #2f2a40;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px rgb(0 0 0 / 0.25);
  color-scheme: dark;
}

/* ---- Base ------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  letter-spacing: -0.035em;
  line-height: 1.08;
}
h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
  letter-spacing: -0.03em;
}
h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--link);
  text-underline-offset: 0.18em;
}
a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 2px;
  border-radius: 4px;
}

ul,
ol {
  padding-left: 1.25em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  background: var(--purple);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
}
.skip-link:focus {
  top: 12px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow {
  max-width: calc(760px + var(--gutter) * 2);
}

@media (min-width: 768px) {
  :root {
    --gutter: 24px;
  }
}

/* ---- Buttons --------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 40px;
  padding: 0.55em 1.1em;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn--primary {
  background: var(--purple);
  color: #fff;
}
.btn--primary:hover {
  background: #6d28d9;
}
.btn--ghost {
  color: var(--text);
  border-color: var(--border);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--panel);
}
.btn--lg {
  min-height: 48px;
  padding: 0.75em 1.4em;
  font-size: 1rem;
}

/* ---- Lockup / wordmark ----------------------------------------------- */

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.lockup__mark svg {
  width: 32px;
  height: auto;
  aspect-ratio: 61 / 58;
}
.wordmark {
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1;
}
.wordmark__serp {
  color: var(--purple);
}
.wordmark__ent {
  color: var(--text);
}

/* ---- Header ---------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 64px;
}
.site-header__brand {
  text-decoration: none;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
.site-nav nav {
  flex: 1;
}
.site-nav__links {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav__links a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav__links a:hover,
.site-nav__links a[aria-current='page'] {
  color: var(--text);
  background: var(--panel);
}
.site-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  position: absolute;
  left: 50%;
  width: 18px;
  height: 2px;
  margin-left: -9px;
  background: currentColor;
  border-radius: 1px;
  content: '';
}
.nav-toggle__bars {
  top: 50%;
  margin-top: -1px;
}
.nav-toggle__bars::before {
  top: -6px;
}
.nav-toggle__bars::after {
  top: 6px;
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars {
  background: transparent;
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before {
  top: 0;
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after {
  top: 0;
  transform: rotate(-45deg);
}

@media (max-width: 959px) {
  .js .nav-toggle {
    display: block;
  }
  .site-header__inner {
    flex-wrap: wrap;
  }
  .site-nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 8px 0 16px;
  }
  .js .site-nav {
    display: none;
  }
  .js .site-nav.is-open {
    display: flex;
  }
  .site-nav__links {
    flex-direction: column;
  }
  .site-nav__links a {
    padding: 12px;
    font-size: 1rem;
  }
  .site-nav__actions {
    flex-wrap: wrap;
  }
  .site-nav__actions .btn {
    flex: 1;
  }
  .site-nav__actions .theme-switch {
    flex-basis: 100%;
    justify-content: center;
  }
}

/* ---- Theme switch (mirrors the app's Light / Dark / System control) --- */

.theme-switch {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.no-js .theme-switch {
  display: none;
}
.theme-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-switch button:hover {
  color: var(--text);
}
.theme-switch button[aria-pressed='true'] {
  background: var(--card);
  color: var(--text);
  box-shadow: 0 0 0 1px var(--border);
}
.theme-switch svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Sections -------------------------------------------------------- */

.section {
  padding-block: clamp(56px, 8vw, 96px);
}
.section--panel {
  background: var(--panel);
  border-block: 1px solid var(--border);
}
.section__head {
  max-width: 680px;
  margin-bottom: 40px;
}
.section__head--center {
  margin-inline: auto;
  text-align: center;
}
.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent-text);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--muted);
  line-height: 1.55;
}

/* ---- Hero ------------------------------------------------------------ */

.hero {
  padding-block: clamp(48px, 8vw, 96px) clamp(56px, 8vw, 96px);
}
.hero__grid {
  display: grid;
  gap: 48px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 56px;
  }
}
.hero h1 .hl {
  color: var(--accent-text);
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}
.hero__note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}
.platform-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.82rem;
  font-weight: 500;
}
.pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--purple);
}

.page-hero {
  padding-block: clamp(48px, 7vw, 80px) clamp(32px, 5vw, 48px);
}
.page-hero .lead {
  max-width: 680px;
}

/* ---- Product mock (illustrative, built in HTML so nothing shifts) ------- */

.mock {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  font-size: 0.85rem;
}
.mock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.mock__title {
  font-weight: 600;
}
.mock__meta {
  color: var(--muted);
  font-size: 0.78rem;
}
.mock__chart {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-items: end;
  gap: 10px;
  height: 150px;
  padding: 20px 16px 0;
  border-bottom: 1px solid var(--border);
}
.mock__col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}
.mock__barfill {
  width: 70%;
  max-width: 40px;
  border-radius: 4px 4px 0 0;
  background: var(--bar);
}
.mock__col--you .mock__barfill {
  background: var(--bar-you);
}
.mock__table {
  width: 100%;
  border-collapse: collapse;
}
.mock__table th,
.mock__table td {
  padding: 9px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.mock__table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}
.mock__table tr:last-child td {
  border-bottom: 0;
}
.mock__table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.mock__table .n {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
}
.mock__table tr.you td {
  background: var(--row-you);
}
.you-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--purple);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: 1px;
}
.mock__caption {
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  color: var(--muted);
  font-size: 0.75rem;
}

/* ---- Cards & grids --------------------------------------------------- */

.grid {
  display: grid;
  gap: 20px;
}
@media (min-width: 700px) {
  .grid--2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .grid--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (min-width: 1100px) {
  .grid--4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

.card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.card h3 {
  margin-bottom: 8px;
}
.card p:last-child {
  margin-bottom: 0;
}
.card p {
  color: var(--muted);
}
.card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--soft-text);
}
.card__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
a.card {
  display: block;
  color: inherit;
  text-decoration: none;
}
a.card:hover {
  border-color: var(--purple-light);
}
.card__more {
  display: inline-block;
  margin-top: 12px;
  color: var(--link);
  font-weight: 600;
  font-size: 0.92rem;
}

/* Steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 960px) {
  .steps {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 700px) and (max-width: 959px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.steps li::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-bottom: 14px;
  border-radius: 8px;
  background: var(--purple);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
}
.steps h3 {
  margin-bottom: 6px;
}
.steps p {
  margin: 0;
  color: var(--muted);
}

/* Split feature rows */
.split {
  display: grid;
  gap: 32px;
  align-items: center;
}
@media (min-width: 960px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  .split--reverse > :first-child {
    order: 2;
  }
}
.split + .split {
  margin-top: clamp(56px, 8vw, 96px);
}

.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 10px;
}
.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.3em;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  background: var(--soft)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

/* Callout: the "every rate shows its n" example */
.n-demo {
  display: grid;
  gap: 16px;
}
@media (min-width: 700px) {
  .n-demo {
    grid-template-columns: 1fr 1fr;
  }
}
.n-demo__item {
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}
.n-demo__item--good {
  border-color: var(--purple-light);
}
.n-demo__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.n-demo__value {
  margin: 8px 0 4px;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.n-demo__value small {
  font-size: 1rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0;
}
.n-demo__item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---- Tables (comparison) --------------------------------------------- */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.93rem;
}
.table th,
.table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.table thead th {
  background: var(--panel);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.table tbody th {
  font-weight: 600;
  width: 26%;
}
.table tr:last-child > * {
  border-bottom: 0;
}
.table .src {
  display: block;
  margin-top: 4px;
  font-size: 0.78rem;
}
.checked {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--soft-text);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ---- Pricing --------------------------------------------------------- */

.notice {
  padding: 14px 18px;
  border: 1px dashed var(--purple-light);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--soft-text);
  font-size: 0.93rem;
}
.notice strong {
  color: inherit;
}
.price-card {
  display: flex;
  flex-direction: column;
}
.price-card--featured {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px var(--purple);
}
.price-card__name {
  font-size: 1.1rem;
}
.price-card__price {
  margin: 8px 0 4px;
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.price-card__period {
  margin-left: 2px;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.price-card__annual {
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--muted);
}
.price-card__for {
  color: var(--muted);
  min-height: 3.2em;
}
.price-note {
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
  text-align: center;
}
.addons__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.addons__head h2 {
  margin: 0;
}
.price-card .checklist {
  margin: 16px 0 24px;
  flex: 1;
}
.price-card .checklist li {
  color: var(--text);
  font-size: 0.93rem;
}

/* ---- FAQ ------------------------------------------------------------- */

.faq {
  border-top: 1px solid var(--border);
}
.faq details {
  border-bottom: 1px solid var(--border);
}
.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: '+';
  color: var(--muted);
  font-size: 1.3rem;
  line-height: 1;
}
.faq details[open] summary::after {
  content: '\2212';
}
.faq details > div {
  padding-bottom: 18px;
  color: var(--muted);
}
.faq details > div p:last-child {
  margin-bottom: 0;
}

/* ---- CTA band -------------------------------------------------------- */

.cta-band {
  padding: clamp(40px, 6vw, 64px);
  border-radius: 20px;
  background: #1f1f23;
  color: #fafafa;
  text-align: center;
  position: relative;
  overflow: hidden;
  border: 1px solid #34343b;
}
.cta-band h2 {
  color: #fafafa;
}
.cta-band p {
  color: #a1a1aa;
  max-width: 560px;
  margin-inline: auto;
}
.cta-band .btn {
  margin-top: 12px;
}
.cta-band .btn--ghost {
  color: #fafafa;
  border-color: #44444c;
}
.cta-band .btn--ghost:hover {
  background: #2a2a30;
}
.cta-band__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---- Prose (legal, long-form) ---------------------------------------- */

.prose {
  max-width: 720px;
}
.prose h2 {
  font-size: 1.4rem;
  margin-top: 2em;
}
.prose h3 {
  margin-top: 1.6em;
}
.prose li {
  margin-bottom: 0.4em;
}
.legal-flag {
  margin-bottom: 32px;
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--tongue);
  background: color-mix(in srgb, var(--tongue) 8%, var(--bg));
  font-weight: 600;
}

/* ---- Forms (waitlist) ------------------------------------------------ */

.form-card {
  max-width: 560px;
}

/* ---- Footer ---------------------------------------------------------- */

.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding-block: 56px 32px;
  border-top: 1px solid var(--border);
  background: var(--panel);
  font-size: 0.92rem;
}
.site-footer__grid {
  display: grid;
  gap: 32px;
  grid-template-columns: repeat(2, 1fr);
}
.site-footer__about {
  grid-column: 1 / -1;
}
@media (min-width: 960px) {
  .site-footer__grid {
    grid-template-columns: 1.6fr repeat(3, 1fr);
  }
  .site-footer__about {
    grid-column: auto;
  }
}
.site-footer__brand {
  display: inline-block;
  margin-bottom: 14px;
  text-decoration: none;
}
.site-footer__about p {
  color: var(--muted);
  max-width: 300px;
}
.site-footer__platforms {
  font-size: 0.82rem;
}
.site-footer__col h2 {
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer__col li {
  margin-bottom: 8px;
}
.site-footer__col a,
.site-footer__base a {
  color: var(--text);
  text-decoration: none;
}
.site-footer__col a:hover,
.site-footer__base a:hover {
  color: var(--link);
  text-decoration: underline;
}
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}
.site-footer__base p {
  margin: 0;
  max-width: 720px;
}

/* ---- 404 ------------------------------------------------------------- */

.not-found {
  text-align: center;
  padding-block: clamp(64px, 10vw, 120px);
}
.not-found__code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--accent-text);
}

/* ---- Utilities ------------------------------------------------------- */

.muted {
  color: var(--muted);
}
.center {
  text-align: center;
}
.mt-0 {
  margin-top: 0;
}
.stack > * + * {
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.section__more {
  margin-top: 32px;
}

/* Let grid children shrink below their content width (the mock table would
   otherwise push the page wider than a phone screen). */
.hero__grid > *,
.split > *,
.grid > * {
  min-width: 0;
}
.mock__table th.num {
  white-space: normal;
}
@media (max-width: 480px) {
  .mock__table th,
  .mock__table td {
    padding: 8px 12px;
  }
  .mock__bar {
    flex-wrap: wrap;
    gap: 2px 12px;
  }
}

/* ---- Alternatives listicles ------------------------------------------ */

.table tr.row-you > * {
  background: var(--row-you);
}
.table tr.row-baseline > * {
  color: var(--muted);
  font-style: italic;
}
.facts {
  display: grid;
  gap: 0;
  margin: 20px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.facts > div {
  display: grid;
  gap: 4px 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.facts > div:last-child {
  border-bottom: 0;
}
@media (min-width: 700px) {
  .facts > div {
    grid-template-columns: 160px 1fr;
  }
}
.facts dt {
  font-weight: 600;
}
.facts dd {
  margin: 0;
  color: var(--muted);
}

/* A section heading inside a prose block keeps the normal section size. */
.section .prose > h2:first-child {
  margin-top: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.25rem);
}

/* ---- Rank tracker mock ------------------------------------------------ */

.rank-mock__tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 16px 0;
}
.rank-mock__tab {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
.rank-mock__tab strong {
  color: var(--text);
}
.rank-mock__tab.is-active {
  border-color: var(--purple);
  background: var(--soft);
  color: var(--soft-text);
}
.rank-mock__query {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.rank-mock__label {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rank-mock__text {
  font-weight: 600;
  font-size: 0.95rem;
}
.delta {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.delta--up {
  color: #15803d;
}
.delta--down {
  color: #dc2626;
}
.delta--new {
  color: var(--accent-text);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .delta--up {
    color: #4ade80;
  }
  :root:not([data-theme='light']) .delta--down {
    color: #f87171;
  }
}
:root[data-theme='dark'] .delta--up {
  color: #4ade80;
}
:root[data-theme='dark'] .delta--down {
  color: #f87171;
}

/* ---- Video ------------------------------------------------------------ */

.video {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #1f1f23;
  box-shadow: var(--shadow);
}
.video--16x9 {
  aspect-ratio: 16 / 9;
}
.video--4x5 {
  aspect-ratio: 4 / 5;
  max-width: 440px;
  margin-inline: auto;
}
.vsl {
  max-width: 960px;
  margin-inline: auto;
}
.section--tight {
  padding-block: clamp(24px, 4vw, 40px);
}

/* ---- Movers, keyword flow --------------------------------------------- */

.movers h3 {
  margin-bottom: 16px;
}
.movers__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.movers__list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
}
.movers__list li > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.movers__pos {
  color: var(--muted);
  white-space: nowrap;
}
.movers__pos strong {
  color: var(--text);
}
.movers__note {
  margin: 12px 0 0;
  font-size: 0.8rem;
}

.keyword-flow {
  display: grid;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.keyword-flow__row {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.keyword-flow__row--hl {
  border-color: var(--purple);
  background: var(--soft);
}
.keyword-flow__label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.keyword-flow__row--hl .keyword-flow__label,
.keyword-flow__row--hl .keyword-flow__value {
  color: var(--soft-text);
}
.keyword-flow__value {
  font-weight: 600;
}
.keyword-flow__tag {
  justify-self: start;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--purple);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
}
.keyword-flow__arrow {
  text-align: center;
  color: var(--muted);
}

/* ---- Beta box and Actions mock ----------------------------------------- */

.beta-box {
  position: relative;
  padding: clamp(24px, 4vw, 40px);
  border: 2px dashed var(--purple-light);
  border-radius: 20px;
  background: color-mix(in srgb, var(--soft) 45%, var(--bg));
}
.beta-box__head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.beta-box__head .eyebrow {
  margin: 0;
}
.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.actions-mock {
  padding: 8px 20px;
}
.actions-mock__row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.actions-mock__row > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}
.actions-mock__url {
  overflow-wrap: anywhere;
  font-weight: 600;
  font-size: 0.9rem;
}
.actions-mock__type {
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
}
.card .actions-mock__row p {
  margin: 6px 0 0;
  font-size: 0.85rem;
}
.card .actions-mock__do {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text);
}
.actions-mock__note {
  margin: 12px 0 8px;
  font-size: 0.8rem;
}
.status {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.status--todo {
  background: var(--soft);
  color: var(--soft-text);
}
.status--doing {
  background: color-mix(in srgb, #f59e0b 18%, var(--bg));
  color: #b45309;
}
.status--done {
  background: color-mix(in srgb, #22c55e 16%, var(--bg));
  color: #15803d;
}

/* ---- Agency CTA (LYNX SEO) ------------------------------------------- */

.agency-cta {
  display: grid;
  gap: 24px;
  align-items: center;
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}
@media (min-width: 900px) {
  .agency-cta {
    grid-template-columns: 1fr auto;
  }
}
.agency-cta .lead {
  margin-bottom: 0;
}
.agency-cta__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.agency-cta--stacked {
  grid-template-columns: 1fr !important;
  align-items: start;
}
.agency-cta--stacked p {
  color: var(--muted);
}

/* ---- About ------------------------------------------------------------ */

@media (min-width: 960px) {
  .about-hero {
    grid-template-columns: 1.2fr 0.8fr;
  }
}
.facts--wide {
  margin: 0;
}
.facts--wide > div {
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .facts--wide > div {
    grid-template-columns: 200px 1fr;
  }
}

/* ---- Blog ------------------------------------------------------------- */

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
  color: var(--muted);
}
.breadcrumbs li + li::before {
  content: '/';
  margin-right: 8px;
  color: var(--border-strong);
}
.breadcrumbs a {
  color: var(--muted);
}
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.post-card {
  display: flex;
  flex-direction: column;
}
.post-card .eyebrow {
  margin-bottom: 8px;
}
.post-card__title {
  font-size: 1.15rem;
}
.post-card__meta {
  margin-top: auto;
  padding-top: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.post-body {
  font-size: 1.05rem;
}
.post-body img {
  height: auto;
  border-radius: var(--radius-sm);
}

.site-footer__by a {
  color: var(--text);
}

/* ---- Header dropdown (Tracking) -------------------------------------- */

.nav-menu details {
  position: relative;
}
.nav-menu summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.nav-menu summary::-webkit-details-marker {
  display: none;
}
.nav-menu summary::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.nav-menu details[open] summary::after {
  margin-top: 3px;
  transform: rotate(-135deg);
}
.nav-menu summary:hover,
.nav-menu summary.is-current,
.nav-menu details[open] summary {
  color: var(--text);
  background: var(--panel);
}
.nav-menu__list {
  margin: 0;
  padding: 6px;
  list-style: none;
}
.site-nav__links .nav-menu__list a {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  color: var(--text);
}
.nav-menu__label {
  font-weight: 600;
}
.nav-menu__note {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 400;
}
@media (min-width: 960px) {
  .nav-menu__list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 60;
    width: 300px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
  }
}
@media (max-width: 959px) {
  .nav-menu summary {
    padding: 12px;
    font-size: 1rem;
  }
  .nav-menu__list {
    padding: 0 0 0 12px;
  }
}
.post-cover {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  image-rendering: pixelated;
}

/* ---- Alternatives: screenshot, fit boxes, ratings --------------------- */

.tool-shot {
  margin: 0 0 20px;
}
.tool-shot img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tool-shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}
.fit {
  display: grid;
  gap: 16px;
  margin: 20px 0;
}
@media (min-width: 700px) {
  .fit {
    grid-template-columns: 1fr 1fr;
  }
}
.fit__box {
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
}
.fit__box h3 {
  margin-bottom: 6px;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.fit__box--yes h3 {
  color: #15803d;
}
.fit__box--no h3 {
  color: #b45309;
}
.fit__box p,
.fit__box ul {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}
.fit__box ul {
  padding-left: 1.1em;
}
.ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: 0.85rem;
}
.ratings li {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}
.ratings span {
  color: var(--muted);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .fit__box--yes h3 {
    color: #4ade80;
  }
  :root:not([data-theme='light']) .fit__box--no h3 {
    color: #fbbf24;
  }
}
:root[data-theme='dark'] .fit__box--yes h3 {
  color: #4ade80;
}
:root[data-theme='dark'] .fit__box--no h3 {
  color: #fbbf24;
}

/* ---- Pricing: Enterprise panel and custom package ----------------------- */

.enterprise-card {
  display: grid;
  gap: 20px 40px;
  align-items: center;
  margin-top: 20px;
}
@media (min-width: 900px) {
  .enterprise-card {
    grid-template-columns: 1.1fr 1fr auto;
  }
}
.enterprise-card .price-card__for {
  min-height: 0;
  margin-bottom: 0;
}
.enterprise-card__features {
  margin: 0;
}
.custom-package {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  margin-top: 20px;
  padding: 20px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.custom-package h3 {
  margin-bottom: 4px;
}
.custom-package p {
  margin: 0;
  max-width: 640px;
  color: var(--muted);
}
.who .card h3 {
  font-size: 1.05rem;
}
.post-card {
  overflow: hidden;
}
.post-card__img {
  display: block;
  width: calc(100% + 48px);
  max-width: none;
  height: auto;
  margin: -24px -24px 18px;
  border-bottom: 1px solid var(--border);
  image-rendering: pixelated;
}

/* ---- Blog post extras (callouts, run grid) ---------------------------- */

.post-body .beta-box,
.post-body .notice,
.post-body .table-wrap,
.post-body .mock,
.post-body .run-grid {
  margin: 1.6em 0;
}
.post-callout ol,
.post-callout p:last-child {
  margin-bottom: 0;
}
.post-body .table {
  font-size: 0.92rem;
}
.run-grid__runs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
@media (max-width: 560px) {
  .run-grid__runs {
    grid-template-columns: repeat(2, 1fr);
  }
}
.run-grid__runs li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 0.85rem;
}
.run-grid__runs li.is-seen {
  border: 1px solid var(--purple-light);
  background: var(--soft);
  color: var(--soft-text);
}
.run-grid__runs strong {
  font-size: 1.05rem;
}
.run-grid figcaption {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ---- Comparison posts ("A vs B (vs SERPent)") ------------------------- */

.h1-aside {
  color: var(--muted);
  font-weight: 600;
}
.verdict {
  margin: 0;
  padding-left: 1.2em;
}
.verdict li {
  margin-bottom: 0.6em;
}
.verdict li:last-child {
  margin-bottom: 0;
}
.table--compare th[scope='row'] {
  white-space: nowrap;
}
/* In the narrow prose column, give all four columns equal room and let the
   row labels wrap, so the SERPent column never gets pushed off the edge. */
.prose .table--compare {
  table-layout: fixed;
  min-width: 600px;
}
.prose .table--compare th[scope='row'] {
  white-space: normal;
}
.table--compare .col-you {
  background: var(--row-you);
}
.related a + a::before {
  content: '·';
  display: inline-block;
  margin: 0 0.5em;
  color: var(--muted);
  text-decoration: none;
}

/* Blog: "where it lands" flow map */
.flow-map__source {
  max-width: 420px;
  margin: 0 auto 8px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--purple);
  color: #fff;
  font-weight: 600;
  text-align: center;
}
.flow-map__source::after {
  content: '';
  display: block;
  width: 2px;
  height: 18px;
  margin: 12px auto -30px;
  background: var(--purple-light);
}
.flow-map__targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0 12px;
  padding: 18px 0 0;
  border-top: 2px solid var(--purple-light);
  list-style: none;
}
@media (max-width: 640px) {
  .flow-map__targets {
    grid-template-columns: 1fr;
  }
}
.flow-map__targets li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 14px;
  border: 1px dashed var(--purple-light);
  border-radius: var(--radius-sm);
  background: var(--soft);
  color: var(--soft-text);
  font-size: 0.9rem;
}
.flow-map figcaption {
  color: var(--muted);
  font-size: 0.92rem;
}
.post-body .flow-map,
.post-body pre {
  margin: 1.6em 0;
}
.post-body pre {
  overflow-x: auto;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 0.95rem;
}
