/**
 * Funnel design system — SEO Audit Pack / AEO check / checkout surfaces.
 */
@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Sora:wght@400;600;700&display=swap');

:root {
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #94a3b8;
  --ink-100: #f1f5f9;
  --ink-50: #f8fafc;
  --brand-700: #0f766e;
  --brand-600: #0d9488;
  --accent: #7c3aed;
  --success: #059669;
  --warn: #d97706;
  --danger: #dc2626;
  --bg: #ffffff;
  --bg-elev: #f8fafc;
  --border: #e2e8f0;
  --ring: 0 0 0 3px rgba(13, 148, 136, 0.35);
  --font-display: 'Sora', system-ui, sans-serif;
  --font-mono: 'DM Mono', ui-monospace, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.5rem;
  --text-4xl: 3.5rem;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --r-md: 12px;
  --r-lg: 20px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur: 240ms;
}

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

body.funnel-page {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.funnel-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-8);
}

.funnel-wrap--wide {
  max-width: 960px;
}

/* Nav */
.funnel-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.funnel-nav__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  color: var(--ink-900);
  font-weight: 600;
  font-size: var(--text-sm);
}

.funnel-nav__brand img {
  width: 28px;
  height: 28px;
}

.funnel-nav__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* Footer */
.funnel-footer {
  padding: var(--space-6) var(--space-5);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--ink-500);
}

.funnel-footer a {
  color: var(--brand-600);
  text-decoration: none;
}

/* Buttons */
.fbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
}

.fbtn:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.fbtn--primary {
  background: var(--brand-600);
  color: #fff;
}

.fbtn--primary:hover {
  background: var(--brand-700);
}

.fbtn--ghost {
  background: var(--bg-elev);
  color: var(--ink-700);
  border-color: var(--border);
}

.fbtn--ghost:hover {
  background: var(--ink-100);
}

.fbtn--lg {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-base);
  border-radius: var(--r-lg);
}

.fbtn--ic {
  padding: var(--space-2);
  min-width: 40px;
  min-height: 40px;
}

.fbtn:disabled {
  opacity: 0.65;
  cursor: wait;
}

/* Cards */
.fcard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-4);
}

.fcard--elev {
  background: var(--bg-elev);
}

.fcard--warn {
  border-color: #fed7aa;
  background: #fffbeb;
}

/* AEO landing form (seo-audit-pack inline styles may extend) */
.aeo-form-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.aeo-form-fields {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.aeo-submit-btn {
  width: 100%;
  justify-content: center;
}

.aeo-step-note {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: 1.5;
  text-align: center;
}

.aeo-rate {
  margin: 0;
  font-size: var(--text-xs);
  color: var(--ink-500);
  font-family: var(--font-mono);
  text-align: center;
}

.fcard__title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-lg);
  font-weight: 600;
}

.fcard__lead {
  margin: 0 0 var(--space-4);
  color: var(--ink-500);
  font-size: var(--text-sm);
}

/* Verdict pills */
.fpill {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.fpill--cited {
  background: #d1fae5;
  color: #065f46;
}

.fpill--mentioned {
  background: #fef3c7;
  color: #92400e;
}

.fpill--absent {
  background: var(--ink-100);
  color: var(--ink-500);
}

.fpill--unknown {
  background: var(--ink-100);
  color: var(--ink-300);
}

/* Hero */
.funnel-hero h1 {
  font-size: clamp(var(--text-2xl), 5vw, var(--text-3xl));
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  letter-spacing: -0.02em;
}

.funnel-hero .lead {
  font-size: var(--text-lg);
  color: var(--ink-500);
  margin: 0 0 var(--space-5);
}

/* Form */
.funnel-input-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .funnel-input-row--inline {
    flex-direction: row;
    align-items: stretch;
  }
  .funnel-input-row--inline .funnel-input {
    flex: 1;
  }
}

.funnel-input {
  width: 100%;
  padding: var(--space-4);
  font-size: var(--text-base);
  font-family: var(--font-display);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
}

.funnel-input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--ring);
}

/* Ticker */
.funnel-ticker {
  overflow: hidden;
  margin-bottom: var(--space-5);
  padding: var(--space-2) 0;
  min-height: 36px;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.funnel-ticker__track {
  display: flex;
  gap: var(--space-2);
  animation: funnel-ticker-scroll 40s linear infinite;
  width: max-content;
}

.funnel-ticker:hover .funnel-ticker__track {
  animation-play-state: paused;
}

@keyframes funnel-ticker-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.funnel-ticker__pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: var(--text-xs);
  color: var(--ink-700);
  white-space: nowrap;
}

.funnel-ticker__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.funnel-ticker__dot--cited {
  background: var(--success);
}
.funnel-ticker__dot--mentioned {
  background: var(--warn);
}
.funnel-ticker__dot--absent {
  background: var(--ink-300);
}

.funnel-ticker__pill--sample {
  opacity: 0.75;
  font-style: italic;
}

.aeo-ticker-caption {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin: 0 0 var(--space-2);
  text-align: center;
}

.funnel-ticker--static {
  overflow: visible;
  border: none;
  background: transparent;
  padding: 0;
  mask-image: none;
}

.funnel-ticker--static .funnel-ticker__track {
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  animation: none;
  width: auto;
}

/* AEO result cards */
.aeo-result {
  margin-top: var(--space-6);
}

.aeo-result--premium {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.aeo-cards {
  margin-top: 0;
}

.aeo-cards .fcard {
  margin-bottom: var(--space-5);
}

.aeo-cards .fcard:last-child {
  margin-bottom: 0;
}

.aeo-cards .aeo-cta-row {
  margin: var(--space-4) 0 0;
}

.aeo-cards .fbtn--primary.fbtn--lg,
.aeo-cards .aeo-cta-primary {
  display: flex;
  width: 100%;
  justify-content: center;
}

.aeo-verdict-host {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 0 0 var(--space-2);
}

.aeo-heatmap-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.aeo-heatmap-row:last-child {
  border-bottom: none;
}

.aeo-competitors {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.aeo-competitor {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
}

.aeo-competitor img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

/* AEO score-led report */
.aeo-score-layout {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.aeo-score-ring {
  --aeo-score-deg: 0;
  width: 7.5rem;
  height: 7.5rem;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(
    #0d9488 0deg,
    #0d9488 calc(var(--aeo-score-deg) * 1deg),
    var(--ink-100, #e2e8f0) calc(var(--aeo-score-deg) * 1deg),
    var(--ink-100, #e2e8f0) 360deg
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.aeo-score-ring__inner {
  width: 6.25rem;
  height: 6.25rem;
  border-radius: 50%;
  background: var(--bg, #fff);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.aeo-score-num {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink-900, #0f172a);
}

.aeo-score-of {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin-top: 0.15rem;
}

.aeo-score-copy {
  flex: 1;
  min-width: 12rem;
}

.aeo-score-label {
  margin: 0 0 var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: #0d9488;
}

.aeo-stat-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-5);
  padding: var(--space-3);
  background: var(--bg-elev, #f8fafc);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
}

@media (min-width: 640px) {
  .aeo-stat-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}

.aeo-stat {
  text-align: center;
  padding: var(--space-2) var(--space-1);
}

.aeo-stat__n {
  display: block;
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-900, #0f172a);
}

.aeo-stat__l {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-500);
  margin-top: 0.2rem;
}

.aeo-engines {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.aeo-engine {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-elev, #f8fafc);
  border-radius: var(--r-md, 10px);
  font-size: var(--text-sm);
}

.aeo-engine__name {
  font-weight: 600;
}

.aeo-leaderboard {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.aeo-lb-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.aeo-lb-row--you {
  padding: var(--space-2);
  margin: calc(-1 * var(--space-2));
  background: #f0fdfa;
  border-radius: var(--r-md, 10px);
}

.aeo-lb-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.aeo-lb-main {
  flex: 1;
  min-width: 0;
}

.aeo-lb-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
}

.aeo-lb-host {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aeo-lb-host em {
  font-style: normal;
  font-weight: 500;
  color: #0d9488;
  font-size: var(--text-xs);
}

.aeo-lb-count {
  font-size: var(--text-xs);
  color: var(--ink-500);
  flex-shrink: 0;
}

.aeo-sov-bar {
  height: 6px;
  background: var(--ink-100, #e2e8f0);
  border-radius: 999px;
  overflow: hidden;
}

.aeo-sov-bar__fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
  border-radius: 999px;
  min-width: 4px;
}

.aeo-lb-row--you .aeo-sov-bar__fill {
  background: linear-gradient(90deg, #059669, #34d399);
}

.aeo-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: 0 0 var(--space-3);
}

.aeo-sentiment,
.aeo-position-chip {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: 999px;
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: capitalize;
}

.aeo-sentiment--positive {
  background: #d1fae5;
  color: #065f46;
}

.aeo-sentiment--neutral {
  background: var(--ink-100);
  color: var(--ink-500);
}

.aeo-sentiment--mixed {
  background: #fef3c7;
  color: #92400e;
}

.aeo-sentiment--negative {
  background: #fee2e2;
  color: #991b1b;
}

.aeo-position-chip {
  background: #e0f2fe;
  color: #0369a1;
}

.aeo-mental-list {
  margin: 0;
  padding-left: 1.15rem;
  line-height: 1.55;
  font-size: var(--text-sm);
}

.aeo-mental-list li {
  margin-bottom: var(--space-2);
}

.aeo-heatmap-q {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.aeo-sources {
  list-style: none;
  margin: 0;
  padding: 0;
}

.aeo-source {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.aeo-source:last-child {
  border-bottom: none;
}

.aeo-source--you {
  background: #f0fdfa;
  margin: 0 calc(-1 * var(--space-3));
  padding-left: var(--space-3);
  padding-right: var(--space-3);
  border-radius: var(--r-md, 10px);
  border-bottom: none;
}

.aeo-source__icon {
  border-radius: 4px;
  flex-shrink: 0;
}

.aeo-source__text {
  min-width: 0;
}

.aeo-source__title {
  display: block;
  font-weight: 600;
  line-height: 1.35;
}

.aeo-source__host {
  display: block;
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin-top: 0.15rem;
}

.aeo-opps {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.aeo-opp strong {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
}

.aeo-opp p {
  margin: 0;
  font-size: var(--text-sm);
  color: var(--ink-500);
  line-height: 1.5;
}

.aeo-methodology-summary {
  cursor: pointer;
  font-weight: 600;
}

.aeo-share-row {
  margin-top: var(--space-4);
  text-align: center;
}

.aeo-sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.aeo-sources-table th,
.aeo-sources-table td {
  padding: var(--space-3);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.aeo-your-site {
  display: inline-block;
  padding: 2px var(--space-2);
  background: #d1fae5;
  color: #065f46;
  border-radius: 6px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.aeo-methodology pre {
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  background: var(--bg-elev);
  padding: var(--space-4);
  border-radius: var(--r-md);
}

.aeo-cursor {
  animation: aeo-blink 1s step-end infinite;
}

@keyframes aeo-blink {
  50% {
    opacity: 0;
  }
}

/* Trial report card */
.trial-card-score {
  text-align: center;
  margin-bottom: var(--space-5);
}

.trial-card-score svg {
  display: block;
  margin: 0 auto;
}

.trial-projected {
  font-size: var(--text-sm);
  color: var(--ink-500);
  margin-top: var(--space-2);
}

.trial-projected strong {
  color: var(--success);
}

.trial-projected-delta {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--brand-600);
}

.trial-lead {
  max-width: 42rem;
}

.trial-issues-line {
  font-size: var(--text-sm);
  color: var(--ink-600);
  margin: 0 0 var(--space-4);
}

.trial-cat-strip {
  margin-bottom: var(--space-5);
}

.trial-wins-panel {
  margin-bottom: var(--space-5);
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border-color: #a7f3d0;
}

.trial-wins {
  list-style: none;
  margin: 0;
  padding: 0;
}

.trial-win {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: var(--text-sm);
  color: var(--ink-700);
}

.trial-win__icon {
  color: #059669;
  font-weight: 700;
  flex-shrink: 0;
}

.trial-aeo-mini {
  margin-bottom: var(--space-5);
}

.trial-aeo-mini__score {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin: var(--space-3) 0;
}

.trial-aeo-mini__n {
  font-size: 2rem;
  font-weight: 700;
  color: var(--brand-600);
}

.trial-aeo-mini__label {
  font-size: var(--text-sm);
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.trial-aeo-mini__rivals {
  font-size: var(--text-sm);
  color: var(--ink-600);
  margin-top: var(--space-3);
}

.trial-screenshot-wrap {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: var(--space-5);
}

.trial-screenshot-wrap img {
  width: 100%;
  display: block;
}

.trial-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%);
}

.trial-fix-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}

.trial-fix-card summary {
  padding: var(--space-4);
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}

.trial-fix-card summary::-webkit-details-marker {
  display: none;
}

.trial-fix-body {
  padding: 0 var(--space-4) var(--space-4);
  font-size: var(--text-sm);
}

.trial-code-diff {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

@media (min-width: 640px) {
  .trial-code-diff {
    grid-template-columns: 1fr 1fr;
  }
}

.trial-code-before,
.trial-code-after {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  padding: var(--space-3);
  border-radius: var(--r-md);
  overflow-x: auto;
}

.trial-code-before {
  background: #fef2f2;
  text-decoration: line-through;
  color: #991b1b;
}

.trial-code-after {
  background: #ecfdf5;
  color: #065f46;
}

.trial-locked-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
}

.trial-locked-blur {
  filter: blur(4px);
  user-select: none;
  color: var(--ink-500);
  flex: 1;
}

.trial-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--border);
  backdrop-filter: blur(8px);
  z-index: 40;
}

@media (min-width: 768px) {
  .trial-sticky-cta {
    display: none;
  }
}

/* Live feed */
.run-feed {
  margin: var(--space-5) 0;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--bg-elev);
}

.run-feed__row {
  display: flex;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  font-size: var(--text-sm);
  animation: feed-in var(--dur) var(--ease-out);
}

.run-feed__status {
  flex-shrink: 0;
  width: 1.25rem;
  text-align: center;
  font-weight: 700;
  line-height: 1.4;
}

.run-feed__status--pass {
  color: #059669;
}

.run-feed__status--issue {
  color: #d97706;
}

.run-feed__status--info {
  color: var(--ink-400);
}

@keyframes feed-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.run-feed__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #fff;
  background: var(--ink-300);
}

.run-feed__avatar[data-sp='seo-mapper'],
.run-feed__avatar[data-sp='seo-atlas'] {
  background: #0d9488;
}

.run-feed__avatar[data-sp='seo-forge'],
.run-feed__avatar[data-sp='seo-shield'] {
  background: #7c3aed;
}

.run-feed__avatar[data-sp='seo-quill'] {
  background: #d97706;
}

.trial-lock-wrap {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--ink-400);
}

.trial-lock-icon {
  display: block;
}

.run-feed__meta {
  font-size: var(--text-xs);
  color: var(--ink-300);
  white-space: nowrap;
}

/* Checkout */
.checkout-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .checkout-grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
}

.checkout-timeline {
  margin: var(--space-4) 0;
}

.checkout-you-saw {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  border: 1px solid #99f6e4;
  border-radius: var(--r-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-5);
  box-shadow: 0 8px 32px rgba(13, 148, 136, 0.08);
}

#payment-element {
  margin: var(--space-4) 0;
}

.first-finding-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-radius: var(--r-lg);
  padding: var(--space-4) var(--space-5);
  margin-bottom: var(--space-4);
  font-size: var(--text-sm);
}

.first-finding-banner strong {
  display: block;
  font-size: var(--text-base);
  margin-bottom: var(--space-1);
}

/* Specialist grid */
.specialist-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  margin: var(--space-5) 0;
}

.specialist-card {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--space-4);
  background: var(--bg);
}

.specialist-card__emoji {
  font-size: 1.5rem;
}

.specialist-card__name {
  font-weight: 600;
  margin: var(--space-2) 0 var(--space-1);
}

.specialist-card__tagline {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin: 0 0 var(--space-2);
}

.specialist-card__voice {
  font-size: var(--text-xs);
  color: var(--ink-700);
  font-style: italic;
  margin: 0;
}

.trial-agency-minis__grid {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  margin-top: var(--space-3);
}

.trial-agency-mini {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--space-3);
  background: var(--bg-subtle, #f8fafc);
}

.trial-agency-mini__title {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-500);
  margin: 0 0 var(--space-1);
}

.trial-agency-mini__body {
  font-size: var(--text-sm);
  font-weight: 600;
  margin: 0;
  color: var(--ink-900);
}

.trial-agency-mini__detail {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin: var(--space-1) 0 0;
}

.trial-agency-minis__unlock {
  font-size: var(--text-xs);
  color: var(--ink-500);
  margin-top: var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
  .funnel-ticker__track,
  .run-feed__row,
  .fbtn {
    animation: none;
    transition: none;
  }
}

/* Mobile — AEO results, checkout, tool pages */
@media (max-width: 767px) {
  .funnel-wrap,
  .funnel-wrap--wide {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .aeo-score-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .aeo-score-copy {
    min-width: 0;
    width: 100%;
  }

  .aeo-stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-1);
    padding: var(--space-2);
  }

  .aeo-stat__l {
    font-size: 0.6rem;
  }

  .aeo-lb-head {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .aeo-lb-host {
    word-break: break-word;
    min-width: 0;
  }

  .aeo-meta-chips {
    flex-wrap: wrap;
  }

  .aeo-sources-table,
  .aeo-table-wrap {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .aeo-cards .fcard,
  .aeo-result--premium {
    padding: 1rem;
    border-radius: var(--r-md);
  }

  .aeo-cards .fbtn--primary.fbtn--lg,
  .aeo-cards .aeo-cta-primary {
    width: 100%;
    white-space: normal;
    line-height: 1.35;
    text-align: center;
  }

  .aeo-share-row {
    flex-direction: column;
    align-items: stretch;
  }

  .aeo-engine {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .aeo-form-card {
    padding: 1rem;
  }

  .aeo-submit-btn {
    width: 100%;
    white-space: normal;
    line-height: 1.35;
  }
}

.aeo-wrap #result.aeo-result--premium {
  max-width: 100%;
}

.aeo-wrap .aeo-cards .fcard {
  margin-bottom: var(--space-3);
}
