@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=DM+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #faf8f5;
  --paper: rgba(255, 255, 255, 0.92);
  --paper-solid: #ffffff;
  --paper-soft: #f5f2ed;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #e5e1d8;
  --primary: #7c3aed;
  --primary-soft: #ede9fe;
  --accent: #10b981;
  --accent-soft: #d1fae5;
  --shadow: 0 20px 50px rgba(26, 26, 46, 0.06);
  --soft-shadow: 0 8px 24px rgba(124, 58, 237, 0.08);
  --radius: 24px;
  --radius-sm: 14px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --max: 1400px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body.comparison-page {
  margin: 0;
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
}

body.comparison-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60vh;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.04) 0%, rgba(16, 185, 129, 0.03) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

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

p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
}

h1, h2, h3, h4, .display {
  font-family: "Outfit", sans-serif;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 1rem;
  font-weight: 700;
}

strong { color: var(--ink); font-weight: 600; }
ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
li + li { margin-top: 0.5rem; }

.grid-guide {
  display: none;
}

.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 20px 60px;
  position: relative;
  z-index: 1;
}

.page-divider {
  display: none;
}

.signal-bar {
  position: sticky;
  top: 12px;
  z-index: 50;
  margin-bottom: 28px;
}

.signal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.shell-brand,
.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-copy,
.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.1;
}

.brand-copy strong,
.footer-copy strong {
  font-family: "Outfit", sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-copy small,
.footer-copy small,
.footer-meta,
.signal-nav a {
  color: var(--muted);
  font-size: 13px;
}

.shell-mark,
.footer-mark {
  position: relative;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), #a855f7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shell-mark::before,
.footer-mark::before {
  content: "⚡";
  font-size: 20px;
  filter: grayscale(1) brightness(10);
}

.footer-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.footer-mark::before {
  font-size: 16px;
}

.signal-nav,
.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.nav-link,
.footer-links a {
  font-size: 14px;
  font-weight: 500;
}

.nav-link {
  padding: 8px 14px;
  border-radius: 10px;
  transition: all 0.2s var(--ease);
  color: var(--muted);
}

.nav-link:hover {
  color: var(--ink);
  background: var(--paper-soft);
}

.nav-cta,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.25s var(--ease);
}

.nav-cta,
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #a855f7);
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.25);
}

.signal-nav .nav-cta,
.signal-nav .nav-cta:hover,
.signal-nav .nav-cta:focus {
  color: #ffffff;
}

.nav-cta:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35);
}

.btn-secondary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.1);
}

.panel,
.route-card,
.source-card,
.legal-panel,
.policy-note,
.form-shell,
.final-strip {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.panel,
.legal-panel,
.policy-note,
.form-shell,
.final-strip,
.route-card,
.source-card {
  padding: 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  align-items: stretch;
}

.winner-panel {
  min-height: 680px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.06) 0%, rgba(16, 185, 129, 0.04) 40%, var(--paper) 100%);
  border: 1px solid rgba(124, 58, 237, 0.12);
}

.winner-panel::before {
  content: "";
  position: absolute;
  top: -100px;
  right: -60px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.1), transparent 70%);
  pointer-events: none;
}

.winner-panel::after {
  content: "";
  position: absolute;
  bottom: -60px;
  left: -30px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.1), transparent 70%);
  pointer-events: none;
}

.loser-column {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
}

.loser-top,
.score-card,
.editorial-note,
.compare-table,
.cta-main,
.cta-side,
.policy-note,
.legal-panel,
.form-shell,
.route-card,
.source-card,
.final-strip {
  animation: fadeSlideUp 0.6s var(--ease) both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.loser-top {
  padding: 24px;
  background: var(--paper);
}

.score-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--ink);
}

.badge-win {
  border-color: rgba(124, 58, 237, 0.2);
  background: var(--primary-soft);
  color: var(--primary);
}

.headline {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.05;
  margin: 12px 0 20px;
  max-width: 14ch;
  font-weight: 800;
}

.headline .winner-word {
  color: var(--primary);
  position: relative;
  display: inline;
}

.headline .winner-word::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 4px;
  height: 8px;
  background: rgba(16, 185, 129, 0.25);
  z-index: -1;
  border-radius: 4px;
}

.subcopy {
  max-width: 580px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--muted);
}

.metric-ribbon {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  position: relative;
  z-index: 2;
}

.metric {
  padding: 20px;
  border-radius: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: all 0.3s var(--ease);
}

.metric:hover {
  transform: translateY(-4px);
  box-shadow: var(--soft-shadow);
  border-color: rgba(124, 58, 237, 0.2);
}

.metric strong {
  display: block;
  font-family: "Outfit", sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.winner-showcase {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
  align-items: end;
  position: relative;
  z-index: 2;
}

.diagram {
  min-height: 260px;
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.08), var(--paper) 60%, rgba(16, 185, 129, 0.06));
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.diagram-terms {
  min-height: auto;
  padding-bottom: 32px;
}

.diagram-terms .bars {
  position: static;
  left: auto;
  right: auto;
  bottom: auto;
  margin-top: 20px;
}

.diagram-terms .bar {
  min-height: 90px;
}

.diagram::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 2px dashed rgba(124, 58, 237, 0.1);
  border-radius: 14px;
  pointer-events: none;
}

.diagram-title {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.15;
  max-width: 12ch;
  margin-top: 6px;
}

.bars {
  position: static;
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-top: auto;
}

.bar {
  flex: 1;
  border-radius: 12px 12px 6px 6px;
  position: relative;
  overflow: hidden;
  min-height: 80px;
  transition: transform 0.3s var(--ease);
}

.bar:hover { transform: translateY(-6px); }

.bar.wpe {
  height: 100px;
  background: linear-gradient(180deg, #9ca3af, #d1d5db);
}

.bar.wpx {
  height: 160px;
  background: linear-gradient(180deg, var(--primary), #a855f7);
  box-shadow: 0 12px 28px rgba(124, 58, 237, 0.25);
}

.bar small {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: white;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.02em;
}

.feature-stack,
.summary-stack,
.side-stack,
.route-grid,
.source-grid,
.legal-stack {
  display: grid;
  gap: 12px;
}

.feature-chip,
.summary-item {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  transition: all 0.25s var(--ease);
}

.feature-chip:hover,
.summary-item:hover {
  transform: translateX(6px);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: var(--soft-shadow);
}

.feature-chip strong,
.summary-item strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-chip span,
.summary-item span,
.summary-item p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.small-title {
  font-size: clamp(1.5rem, 2.5vw, 2.4rem);
  line-height: 1.1;
  margin: 8px 0 12px;
  max-width: 12ch;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.score-grid {
  display: grid;
  gap: 0;
  margin-top: 16px;
}

.score-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

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

.score-row h4 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.score-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-width: 28ch;
}

.score-pill {
  min-width: 64px;
  text-align: center;
  padding: 10px 12px;
  border-radius: 12px;
  font-family: "Outfit", sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  background: var(--paper-soft);
  border: 1px solid var(--line);
}

.score-pill.winner {
  background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
  border-color: rgba(124, 58, 237, 0.2);
  color: var(--primary);
}

.footer-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.comparison-grid,
.cta-band,
.contact-grid,
.policy-grid {
  display: grid;
  gap: 24px;
  margin-top: 28px;
  align-items: start;
}

.comparison-grid { grid-template-columns: 0.85fr 1.15fr; }
.cta-band { grid-template-columns: 1.15fr 0.85fr; }
.contact-grid,
.policy-grid { grid-template-columns: 1.1fr 0.9fr; }

.editorial-note,
.compare-table,
.cta-main,
.cta-side {
  padding: 28px;
}

.table-shell {
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
}

.table-row {
  display: grid;
  grid-template-columns: 1fr 0.9fr 1.2fr;
  gap: 0;
  align-items: stretch;
  border-bottom: 1px solid var(--line);
}

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

.table-row.header {
  background: var(--paper-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.cell {
  padding: 16px;
  min-height: 80px;
  display: flex;
  align-items: center;
  border-right: 1px solid var(--line);
  line-height: 1.55;
  font-size: 14px;
}

.cell:last-child { border-right: none; }

.cell.winner {
  background: linear-gradient(90deg, rgba(124, 58, 237, 0.04), transparent);
  position: relative;
  font-weight: 500;
}

.cell.winner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.route-grid,
.source-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 28px;
}

.route-card,
.source-card {
  display: block;
  transition: all 0.25s var(--ease);
}

.route-card small,
.source-card small,
.final-strip small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 8px;
}

.route-card h3,
.source-card h3,
.final-strip h3 {
  margin-bottom: 8px;
  font-size: 1.4rem;
}

.route-card p,
.source-card p,
.final-strip p,
.policy-note p,
.legal-panel p {
  font-size: 14px;
  line-height: 1.65;
}

.route-card:hover,
.source-card:hover {
  transform: translateY(-4px);
  border-color: rgba(124, 58, 237, 0.2);
  box-shadow: var(--soft-shadow);
}

.final-strip {
  margin-top: 28px;
  text-align: center;
  padding: 36px;
  background: linear-gradient(145deg, rgba(124, 58, 237, 0.04), var(--paper));
}

.signal-foot {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}

.signal-foot-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-meta {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  font-size: 13px;
}

.footer-meta p { margin: 0; }

.policy-grid { margin-top: 24px; }
.legal-stack { margin-top: 16px; }

.legal-row {
  display: grid;
  grid-template-columns: 0.4fr 0.6fr;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.legal-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.contact-grid .feature-stack,
.policy-note .feature-stack { margin-top: 14px; }

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

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

.comparison-contact-form input,
.comparison-contact-form textarea,
.comparison-contact-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  color: var(--ink);
  padding: 14px 16px;
  font: inherit;
  font-size: 14px;
  transition: all 0.2s var(--ease);
}

.comparison-contact-form textarea {
  min-height: 160px;
  resize: vertical;
}

.comparison-contact-form input:focus,
.comparison-contact-form textarea:focus,
.comparison-contact-form select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.comparison-contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.comparison-contact-feedback {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-weight: 600;
  display: none;
}

.comparison-contact-feedback.is-visible {
  display: block;
  animation: fadeSlideUp 0.4s var(--ease);
}

.comparison-contact-feedback.is-success {
  background: var(--accent-soft);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
}

.comparison-contact-feedback.is-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.comparison-contact-hp { position: absolute; left: -9999px; }

.soft-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
}

@media (max-width: 1100px) {
  .hero-grid,
  .comparison-grid,
  .cta-band,
  .winner-showcase,
  .contact-grid,
  .policy-grid {
    grid-template-columns: 1fr;
  }
  
  .winner-panel { min-height: auto; }
  
  .metric-ribbon,
  .route-grid,
  .source-grid,
  .field-grid {
    grid-template-columns: 1fr;
  }
  
  .table-row,
  .legal-row,
  .comparison-contact-actions,
  .signal-foot-top,
  .signal-row {
    grid-template-columns: 1fr;
    display: grid;
  }
  
  .cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  
  .table-row .cell:last-child { border-bottom: none; }
}

@media (max-width: 680px) {
  .page-shell { padding: 16px 12px 48px; }
  
  .winner-panel,
  .loser-top,
  .score-card,
  .editorial-note,
  .compare-table,
  .cta-main,
  .cta-side,
  .policy-note,
  .legal-panel,
  .form-shell,
  .route-card,
  .source-card,
  .final-strip,
  .signal-foot {
    padding: 20px;
    border-radius: 18px;
  }
  
  .headline { font-size: clamp(1.8rem, 10vw, 3rem); }
  .small-title { font-size: clamp(1.3rem, 8vw, 2rem); }
  
  .bars {
    gap: 10px;
    left: 18px;
    right: 18px;
  }
  
  .actions,
  .signal-nav,
  .footer-links {
    width: 100%;
  }
  
  .signal-nav {
    justify-content: center;
  }
  
  .nav-link {
    padding: 6px 10px;
    font-size: 13px;
  }
}
