/* ==========================================================================
   Comparison page styles
   Used by: /landing/compare/*.html
   ========================================================================== */

/* --------- Utility replacements for inline styles --------- */
.cmp-body { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.cmp-card { padding: 32px; margin-bottom: 32px; }
.cmp-card-compact { padding: 28px; margin-bottom: 16px; }
.cmp-section { margin-top: 48px; }
.cmp-cta-card { padding: 40px; margin-top: 48px; text-align: center; }
.cmp-cta-row { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --------- Breadcrumb --------- */
.cmp-breadcrumb { margin-bottom: 24px; font-size: 0.9375rem; }
.cmp-breadcrumb a { color: var(--accent); text-decoration: none; font-weight: 500; }
.cmp-breadcrumb a:hover { color: var(--accent-dark); text-decoration: underline; }
.cmp-breadcrumb a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.cmp-breadcrumb .sep { color: var(--text-muted); margin: 0 8px; }
.cmp-breadcrumb .current { color: var(--text-body); font-weight: 500; }

/* --------- Sticky jump nav (TOC) --------- */
.cmp-toc {
  position: sticky;
  top: 80px;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 16px;
  margin: 0 0 32px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  overflow-x: auto;
  scrollbar-width: thin;
}
.cmp-toc a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: background-color 150ms ease, color 150ms ease;
}
.cmp-toc a:hover { background: var(--accent-light); color: var(--accent-dark); }
.cmp-toc a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --------- Comparison table: highlight PolicySuite column --------- */
.cmp-table-wrap { overflow-x: auto; border-radius: 12px; }
.cmp-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.9375rem;
}
.cmp-table caption {
  text-align: left;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--text-heading);
  background: var(--bg-secondary);
  caption-side: top;
}
.cmp-table thead th {
  background: var(--bg-secondary);
  color: var(--text-heading);
  padding: 16px 20px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border-color);
  font-size: 0.9375rem;
}
.cmp-table thead th.cmp-own {
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-dark);
  border-bottom-color: var(--accent);
}
.cmp-table tbody td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-body);
  vertical-align: top;
  line-height: 1.5;
}
.cmp-table tbody td.cmp-own {
  background: rgba(37, 99, 235, 0.04);
  color: var(--text-heading);
  font-weight: 500;
}
.cmp-table tbody tr:last-child td { border-bottom: none; }
.cmp-table .cap-cell {
  font-weight: 600;
  color: var(--text-heading);
  width: 28%;
}

/* ✓ / ✗ / — indicators */
.cmp-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.cmp-mark svg { flex-shrink: 0; }
.cmp-mark-yes { color: #047857; }
.cmp-mark-no  { color: #64748B; }
.cmp-mark-partial { color: #B45309; }

/* --------- Mobile responsive: stack table into cards --------- */
@media (max-width: 768px) {
  .cmp-table { border: none; background: transparent; }
  .cmp-table thead { display: none; }
  .cmp-table tbody, .cmp-table tr, .cmp-table td { display: block; width: 100%; }
  .cmp-table tbody tr {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 16px;
  }
  .cmp-table tbody td {
    border: none;
    padding: 10px 12px;
    position: relative;
    padding-left: 140px;
    min-height: 44px;
  }
  .cmp-table tbody td::before {
    content: attr(data-label);
    position: absolute;
    left: 12px;
    top: 10px;
    font-weight: 600;
    color: var(--text-heading);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
  }
  .cmp-table .cap-cell {
    width: 100%;
    background: var(--bg-secondary);
    padding: 12px;
    margin: -12px -12px 8px;
    border-radius: 12px 12px 0 0;
    font-size: 1rem;
  }
  .cmp-table .cap-cell::before { display: none; }
  .cmp-table tbody td.cmp-own {
    border-left: 3px solid var(--accent);
    background: rgba(37, 99, 235, 0.04);
  }
}

/* --------- FAQ accordion --------- */
.cmp-faq {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  margin-bottom: 12px;
  transition: border-color 150ms ease;
}
.cmp-faq[open] { border-color: var(--accent); }
.cmp-faq summary {
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 600;
  color: var(--text-heading);
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 12px;
  min-height: 44px;
}
.cmp-faq summary::-webkit-details-marker { display: none; }
.cmp-faq summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmp-faq summary::after {
  content: "";
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(45deg);
  transition: transform 200ms ease;
  flex-shrink: 0;
  margin-right: 4px;
}
.cmp-faq[open] summary::after {
  transform: rotate(-135deg);
  border-color: var(--accent);
}
.cmp-faq summary:hover { color: var(--accent-dark); }
.cmp-faq .cmp-faq-body {
  padding: 0 24px 24px;
  color: var(--text-body);
  line-height: 1.7;
}

/* --------- Social proof strip --------- */
.cmp-proof {
  display: flex;
  gap: 24px;
  align-items: center;
  padding: 24px 28px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(37, 99, 235, 0.02) 100%);
  border: 1px solid rgba(37, 99, 235, 0.15);
  border-radius: 12px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.cmp-proof-quote { flex: 1; min-width: 280px; }
.cmp-proof-quote p {
  color: var(--text-heading);
  font-size: 1.0625rem;
  font-style: italic;
  margin: 0 0 12px;
  line-height: 1.55;
}
.cmp-proof-quote cite {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-style: normal;
  font-weight: 500;
}
.cmp-proof-stars { color: #F59E0B; font-size: 1.125rem; letter-spacing: 2px; }

/* --------- Related comparisons grid --------- */
.cmp-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.cmp-related-card {
  display: block;
  padding: 20px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  text-decoration: none;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
  cursor: pointer;
}
.cmp-related-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
}
.cmp-related-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmp-related-card h3 {
  color: var(--text-heading);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 6px;
}
.cmp-related-card p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
  line-height: 1.5;
}

/* Hub/index category tags */
.cmp-tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
}

/* --------- Section headings with anchor offset --------- */
.cmp-anchor {
  scroll-margin-top: 100px;
}

/* --------- Reduced motion --------- */
@media (prefers-reduced-motion: reduce) {
  .cmp-faq summary::after,
  .cmp-related-card,
  .cmp-toc a { transition: none; }
  .cmp-related-card:hover { transform: none; }
}

/* --------- E-E-A-T author byline --------- */
.cmp-byline {
  margin-top: 12px;
  margin-bottom: 8px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.cmp-byline time { font-variant-numeric: tabular-nums; }
.cmp-byline-sep { opacity: 0.6; }

/* --------- Guide TL;DR / "short answer" summary card --------- */
.cmp-tldr {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 16px 0 32px;
}
.cmp-tldr h2 {
  font-size: var(--text-lg);
  margin: 0 0 12px;
  color: var(--text-heading);
}
.cmp-tldr p {
  margin: 0 0 12px;
  color: var(--text-body);
}
.cmp-tldr p:last-child { margin-bottom: 0; }
.cmp-tldr ol,
.cmp-tldr ul {
  columns: 2;
  column-gap: 32px;
  padding-left: 20px;
  margin: 0 0 16px;
}
.cmp-tldr li {
  margin-bottom: 4px;
  break-inside: avoid;
}
.cmp-tldr-note {
  font-size: var(--text-sm);
  color: var(--text-secondary) !important;
}
.cmp-tldr-note strong { color: var(--text-heading); }
.cmp-tldr sup {
  font-size: 0.8em;
  color: var(--text-secondary);
}
@media (max-width: 640px) {
  .cmp-tldr { padding: 20px; }
  .cmp-tldr ol,
  .cmp-tldr ul { columns: 1; }
}
