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

:root {
  --ink: #312e81;
  --deep: #1e1b4b;
  --accent: #6366f1;
  --accent-soft: #e0e7ff;
  --muted: #6b7280;
  --line: #e2e5ec;
  --paper: #f8fafc;
  --white: #ffffff;
  --shadow: 0 14px 38px rgba(30, 27, 75, 0.07);
  --shadow-hover: 0 20px 48px rgba(30, 27, 75, 0.10);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1380px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.comparison-page {
  margin: 0;
  font-family: "DM Sans", sans-serif;
  color: var(--deep);
  background: linear-gradient(175deg, #ffffff 0%, var(--paper) 60%, #eef2ff 100%);
  overflow-x: hidden;
}
body.comparison-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% 20%, rgba(99, 102, 241, 0.04), transparent),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(99, 102, 241, 0.03), transparent);
}
a { color: inherit; text-decoration: none; }
p {
  margin: 0 0 1rem;
  color: var(--muted);
  line-height: 1.72;
}
h1, h2, h3, h4 {
  margin: 0 0 1rem;
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
  color: var(--deep);
  line-height: 1.15;
}
strong { color: var(--deep); }

.page-shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 22px 72px;
  position: relative;
  z-index: 1;
}

.mastbar {
  position: sticky;
  top: 10px;
  z-index: 40;
  margin-bottom: 24px;
}
.mastrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 22px rgba(30, 27, 75, 0.04);
}

.brand-lockup,
.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.brand-copy,
.foot-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.brand-copy strong,
.foot-copy strong {
  font-size: 17px;
  font-family: "Poppins", sans-serif;
  letter-spacing: -0.01em;
}
.brand-copy small,
.foot-copy small {
  color: var(--muted);
  font-size: 13px;
}

.brand-mark,
.foot-mark {
  position: relative;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,0.96), rgba(224,231,255,0.72));
  overflow: hidden;
}
.foot-mark {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
}
.brand-mark::before,
.foot-mark::before {
  content: "";
  position: absolute;
  inset: 11px 23px 11px 11px;
  background: var(--accent);
  border-radius: 3px;
  box-shadow:
    10px 4px 0 rgba(99, 102, 241, 0.7),
    20px -4px 0 rgba(99, 102, 241, 0.45);
}
.brand-mark::after,
.foot-mark::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(49, 46, 129, 0.18);
  background: #ffffff;
}

.report-nav,
.foot-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.report-link,
.foot-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}
.report-link {
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.report-link:hover,
.foot-links a:hover {
  color: var(--deep);
}
.report-link:hover {
  transform: translateY(-2px);
  background: rgba(224, 231, 255, 0.5);
}

.report-cta,
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 14px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.report-cta,
.action-btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(99, 102, 241, 0.2);
}
.report-nav .report-cta,
.report-nav .report-cta:hover,
.report-nav .report-cta:focus {
  color: #ffffff;
}
.report-cta:hover,
.action-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(99, 102, 241, 0.25);
}
.action-btn-secondary {
  background: #ffffff;
  color: var(--ink);
  border-color: var(--line);
}
.action-btn-secondary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(30, 27, 75, 0.07);
}

.doc-sheet,
.route-panel,
.source-sheet,
.closing-band,
.contact-note,
.legal-sheet {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}
.doc-sheet,
.route-panel,
.source-sheet,
.closing-band,
.contact-note,
.legal-sheet {
  padding: 32px;
}
.doc-sheet:hover,
.route-panel:hover,
.source-sheet:hover {
  box-shadow: var(--shadow-hover);
}

.cover-grid,
.finding-grid,
.source-grid,
.legal-grid,
.intake-grid {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}
.cover-grid {
  grid-template-columns: 1.14fr 0.86fr;
  align-items: start;
}
.finding-grid,
.legal-grid,
.intake-grid {
  grid-template-columns: 1.08fr 0.92fr;
}
.source-grid {
  grid-template-columns: 1fr 1fr;
}

.cover-sheet {
  background: linear-gradient(170deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
}
.verdict-sheet {
  background: linear-gradient(170deg, rgba(224,231,255,0.6), rgba(255,255,255,0.98));
}
.baseline-sheet,
.contact-note {
  background: linear-gradient(170deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #ffffff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.chip-accent {
  background: var(--accent);
  color: #ffffff;
  border-color: var(--accent);
}

.kicker {
  display: inline-flex;
  margin-bottom: 14px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.display-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  line-height: 1.22;
  max-width: 38ch;
  margin-bottom: 18px;
}
.display-title .accent-word,
.accent-word {
  color: var(--accent);
}
.lead-copy {
  max-width: 680px;
  font-size: 17px;
  line-height: 1.78;
}
.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 0;
}
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}
.evidence-card,
.mini-note {
  padding: 20px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.92);
}
.evidence-card strong,
.mini-note strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}
.mini-note p:last-child,
.evidence-card p:last-child {
  margin-bottom: 0;
}

.stamp {
  display: inline-block;
  margin-bottom: 16px;
  padding: 10px 16px;
  border: 1px solid rgba(99, 102, 241, 0.28);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.verdict-sheet h2,
.section-title,
.legal-sheet h2,
.contact-form-box h3 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.18;
}
.score-list,
.note-list,
.source-list,
.legal-stack {
  display: grid;
  gap: 14px;
}
.score-list {
  margin-top: 20px;
}
.score-item {
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, 0.14);
  background: rgba(255,255,255,0.92);
}
.score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.score-head strong {
  font-size: 15px;
}
.score-head span {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.score-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
  margin-bottom: 10px;
}
.score-fill {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--score);
  border-radius: 999px;
}
.fill-pressable {
  background: linear-gradient(90deg, #6366f1, #818cf8);
}
.fill-wpe {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}
.score-item p,
.note-item p,
.source-list li {
  margin: 0;
}

.table-shell {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.table-row {
  display: grid;
  grid-template-columns: 0.9fr 1fr 1fr;
}
.table-row + .table-row {
  border-top: 1px solid var(--line);
}
.table-row.header {
  background: rgba(49, 46, 129, 0.04);
}
.cell {
  padding: 18px 20px;
  border-right: 1px solid var(--line);
  color: var(--muted);
}
.cell:last-child {
  border-right: none;
}
.cell strong,
.winner-cell {
  color: var(--deep);
}
.winner-cell {
  background: rgba(99, 102, 241, 0.05);
}

.route-matrix {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}
.route-panel {
  display: grid;
  align-content: space-between;
  gap: 18px;
  min-height: 220px;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.route-panel:hover,
.route-panel.is-current {
  transform: translateY(-4px);
  border-color: rgba(99, 102, 241, 0.26);
}
.route-panel small,
.source-sheet small,
.closing-band small {
  display: inline-flex;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}
.route-panel h3,
.source-sheet h3 {
  font-size: 22px;
  margin: 0;
}

.source-list {
  margin: 18px 0 0;
  padding-left: 18px;
}
.source-list a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.closing-band {
  margin-top: 22px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
  background: linear-gradient(135deg, rgba(224,231,255,0.7), rgba(255,255,255,0.98));
}

.report-foot {
  margin-top: 22px;
  padding: 26px 32px;
}
.report-foot-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(226, 229, 236, 0.9);
}
.foot-meta {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  font-size: 13px;
  color: var(--muted);
}

.contact-form-box {
  padding: 0;
}
.comparison-contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}
.comparison-contact-form input,
.comparison-contact-form select,
.comparison-contact-form textarea {
  width: 100%;
  padding: 14px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.95);
  color: var(--deep);
  font: inherit;
}
.comparison-contact-form textarea {
  min-height: 170px;
  resize: vertical;
}
.field-span {
  grid-column: 1 / -1;
}
.comparison-contact-actions {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
}
.comparison-contact-feedback {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
}
.comparison-contact-feedback.is-success {
  border: 1px solid rgba(22, 163, 74, 0.16);
  background: rgba(22, 163, 74, 0.1);
  color: #166534;
}
.comparison-contact-feedback.is-error {
  border: 1px solid rgba(220, 38, 38, 0.16);
  background: rgba(220, 38, 38, 0.08);
  color: #991b1b;
}
.comparison-contact-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.legal-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) 1.3fr;
  gap: 18px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.legal-row:first-child {
  border-top: none;
}

.soft-note {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 1240px) {
  .cover-grid,
  .finding-grid,
  .source-grid,
  .legal-grid,
  .intake-grid,
  .closing-band {
    grid-template-columns: 1fr;
  }
  .route-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .evidence-grid,
  .comparison-contact-form {
    grid-template-columns: 1fr;
  }
  .table-row,
  .report-foot-top,
  .comparison-contact-actions,
  .legal-row {
    grid-template-columns: 1fr;
  }
  .cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 760px) {
  .page-shell {
    padding: 18px 14px 56px;
  }
  .mastbar {
    position: static;
    top: auto;
  }
  .mastrow,
  .doc-sheet,
  .route-panel,
  .source-sheet,
  .closing-band,
  .contact-note,
  .legal-sheet,
  .report-foot {
    padding: 22px;
    border-radius: 12px;
  }
  .display-title {
    font-size: clamp(1.4rem, 5vw, 2rem);
  }
  .report-nav,
  .foot-links,
  .action-row {
    width: 100%;
  }
  .route-matrix {
    grid-template-columns: 1fr;
  }
}
