/* ============================================================
   Compare Pages — minimal editorial (2026)
   Loaded only on slugs containing "-vs-" (see functions.php).
   Palette: terracotta accent #C87253, greige borders #E5DDD4,
   charcoal text — aligned with child theme tokens where useful.
   ============================================================ */

/* ── Score hero: calm hierarchy, no billboard numerals ─────── */
.fr-compare-scores {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto minmax(0, 1fr);
  align-items: end;
  column-gap: 20px;
  padding: 24px 0 28px;
  border-top: 1px solid var(--fr-slate-200, #E5DDD4);
  border-bottom: 1px solid var(--fr-slate-200, #E5DDD4);
  margin: 28px 0 36px;
  position: relative;
}

.fr-compare-scores::before {
  content: "";
  grid-column: 2;
  grid-row: 1;
  width: 1px;
  background: var(--fr-slate-200, #E5DDD4);
  justify-self: center;
  align-self: stretch;
  opacity: 0.85;
}

/* Delta: outline chip, no drop shadow */
.fr-compare-scores::after {
  content: attr(data-delta);
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  align-self: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9a5c45;
  background: rgba(200, 114, 83, 0.06);
  border: 1px solid rgba(200, 114, 83, 0.28);
  padding: 5px 10px;
  border-radius: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  z-index: 2;
  box-shadow: none;
}

.fr-compare-score-card {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-row: 1;
  position: relative;
}

.fr-compare-score-card--winner {
  grid-column: 1;
  padding: 14px 16px 14px 18px;
  background: rgba(200, 114, 83, 0.03);
  border-radius: 8px;
}

.fr-compare-score-card--winner::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: #c87253;
  border-radius: 2px;
}

.fr-compare-score-card:not(.fr-compare-score-card--winner) {
  grid-column: 3;
  padding: 12px 0;
}

.fr-compare-score-card:not(.fr-compare-score-card--winner)::after {
  content: "Runner-up";
  order: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fr-slate-400, #b0a494);
  margin-bottom: -2px;
}

.fr-compare-score-card__name {
  order: 3;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fr-slate-800, #3d2e22);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.fr-compare-score-card:not(.fr-compare-score-card--winner) .fr-compare-score-card__name {
  color: var(--fr-slate-500, #8a7f73);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.fr-compare-score-card__score {
  order: 4;
  display: flex;
  align-items: baseline;
  line-height: 0.92;
}

.fr-compare-score-card__score .fr-score {
  font-size: clamp(2.5rem, 6vw, 3.25rem);
  font-weight: 700;
  color: var(--fr-slate-800, #3d2e22);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
  line-height: 0.92;
}

.fr-compare-score-card:not(.fr-compare-score-card--winner) .fr-compare-score-card__score .fr-score {
  color: var(--fr-slate-500, #9a8c78);
}

.fr-compare-score-card--winner .fr-compare-score-card__score .fr-score {
  font-size: clamp(3rem, 8vw, 4rem);
  letter-spacing: -0.045em;
  color: var(--fr-slate-800, #1e1a16);
}

.fr-compare-score-card__score::after {
  content: "/ 10";
  font-size: 13px;
  font-weight: 500;
  color: var(--fr-slate-400, #b0a494);
  margin-left: 6px;
  align-self: flex-end;
  padding-bottom: 6px;
  letter-spacing: 0.01em;
}

.fr-compare-score-card--winner .fr-compare-score-card__score::after {
  padding-bottom: 8px;
}

.fr-compare-score-card__label {
  display: none;
}

.fr-compare-winner-badge {
  order: 1;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  color: #c87253;
  border: 1px solid rgba(200, 114, 83, 0.45);
  padding: 4px 10px 3px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  border-radius: 6px;
  box-shadow: none;
}

.fr-compare-winner-badge::before {
  content: "";
  display: none;
}

@media (max-width: 640px) {
  .fr-compare-scores {
    grid-template-columns: 1fr;
    padding: 20px 0;
    row-gap: 20px;
    margin: 22px 0 28px;
  }

  .fr-compare-scores::before {
    display: none;
  }

  .fr-compare-scores::after {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
    align-self: center;
    content: attr(data-delta);
  }

  .fr-compare-score-card--winner {
    grid-column: 1;
    grid-row: 1;
  }

  .fr-compare-score-card:not(.fr-compare-score-card--winner) {
    grid-column: 1;
    grid-row: 3;
    padding-left: 2px;
  }

  .fr-compare-score-card--winner .fr-compare-score-card__score .fr-score {
    font-size: clamp(2.75rem, 12vw, 3.25rem);
  }

  .fr-compare-score-card__score .fr-score {
    font-size: clamp(2.25rem, 10vw, 2.75rem);
  }
}

/* ── Typography: airy section rhythm ──────────────────────── */
.fr-review-article h2.wp-block-heading,
.fr-review-article h2.fr-animate {
  font-size: clamp(1.35rem, 2.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--fr-plum, #1e1a16);
  margin-top: 2.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--fr-slate-200, #e5ddd4);
  border-top: 0 !important;
  padding-top: 0 !important;
  position: relative;
}

.fr-review-article h3.wp-block-heading,
.fr-review-article h3.fr-animate {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--fr-plum, #1e1a16);
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

@media (max-width: 640px) {
  .fr-review-article h2.wp-block-heading,
  .fr-review-article h2.fr-animate {
    font-size: 1.25rem;
    margin-top: 2.25rem;
  }
}

/* ── Callouts: hairline frame + accent strip only ──────────── */
.fr-review-article .fr-callout {
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-left: 2px solid #c87253;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 1.25rem 0;
  box-shadow: none;
}

.fr-review-article .fr-callout p:last-child {
  margin-bottom: 0;
}

.fr-review-article .fr-callout--info {
  border-left-color: #7a9fb8;
  background: rgba(122, 159, 184, 0.04);
}

.fr-review-article .fr-callout--quick-answer {
  border-left-color: #c87253;
  background: rgba(200, 114, 83, 0.04);
}

.fr-review-article .fr-callout--warning {
  border-left-color: #d4a14c;
  background: rgba(212, 161, 76, 0.04);
}

.fr-review-article .fr-callout--success {
  border-left-color: #7c9a6e;
  background: rgba(124, 154, 110, 0.05);
}

.fr-review-article .fr-callout--danger {
  border-left-color: var(--fr-danger, #b85c5c);
  background: rgba(184, 92, 92, 0.04);
}

/* Table winner cells — text emphasis only */
.fr-review-article td.fr-table-winner {
  color: #9a5c45 !important;
  font-weight: 600 !important;
  letter-spacing: 0;
}

.fr-review-article td.fr-table-winner::before {
  display: none;
}

/* Pull quotes */
.fr-review-article blockquote {
  border-left: 2px solid rgba(200, 114, 83, 0.55);
  padding: 4px 0 4px 18px;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.012em;
  color: var(--fr-slate-700, #2a2521);
  font-style: normal;
  margin: 1.5rem 0;
  line-height: 1.45;
  background: transparent;
}

/* Author box */
.fr-review-article .fr-author-box,
.fr-page-card .fr-author-box {
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: none;
  background: rgba(248, 243, 238, 0.35);
}

/* Header kicker on compare pages */
.fr-review-article .review-header-meta {
  margin-bottom: 14px;
}

.fr-review-article .review-header-meta p {
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--fr-slate-400, #b0a494);
  line-height: 1.5;
}

/* Research block: lighter shell */
.fr-review-article .fr-sources {
  background: transparent;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 2rem 0;
  box-shadow: none;
}

.fr-review-article .fr-sources h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--fr-slate-500, #8a7f73);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.fr-review-article .fr-sources li {
  font-size: 13px;
  line-height: 1.6;
}

/* Compared-with: flat chips, no card lift */
.fr-review-article .fr-featured-in {
  background: transparent;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-radius: 10px;
  padding: 18px 20px;
  margin: 2rem 0;
  box-shadow: none;
}

.fr-review-article .fr-featured-in h3 {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fr-slate-500, #8a7f73);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.fr-review-article .fr-featured-in__chips .fr-tag {
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  background: rgba(255, 255, 255, 0.7);
}

.fr-review-article .fr-featured-in__chips .fr-tag:hover {
  border-color: rgba(200, 114, 83, 0.45);
  color: #9a5c45;
  box-shadow: none;
  opacity: 1;
}

/* Review deep-links */
.fr-compare-review-links {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin: 16px 0 8px;
  padding: 0;
  background: transparent;
  border: 0;
}

.fr-review-article .fr-compare-review-links a,
.fr-compare-review-links a {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--fr-slate-200, #e5ddd4);
  border-radius: 0;
  padding: 4px 0 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fr-slate-800, #3d2e22) !important;
  text-decoration: none;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.fr-review-article .fr-compare-review-links a:hover,
.fr-compare-review-links a:hover {
  border-bottom-color: rgba(200, 114, 83, 0.55);
  color: #9a5c45 !important;
}

.fr-compare-review-links a::after {
  content: "\2192";
  margin-left: 4px;
  font-weight: 500;
  opacity: 0.45;
  letter-spacing: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.fr-compare-review-links a:hover::after {
  transform: translateX(2px);
  opacity: 0.85;
}

/* Tables marked .fr-compare-table — flatter, less “dashboard” */
.fr-review-article.prose table.fr-compare-table {
  box-shadow: none;
  border-radius: 10px;
}

.fr-review-article.prose .fr-compare-table tbody tr:nth-child(even) td {
  background: rgba(248, 243, 238, 0.35);
}

.fr-review-article.prose .fr-compare-table tbody tr:hover td {
  background: rgba(200, 114, 83, 0.035);
}

.fr-review-article.prose .fr-compare-total td {
  border-top: 1px solid var(--fr-slate-200, #e5ddd4);
  background: rgba(248, 243, 238, 0.45) !important;
  font-weight: 600;
}

.fr-review-article.prose .fr-compare-total td:last-child {
  color: #9a5c45;
}

/* FAQ pairs under #faq — one continuous panel */
.fr-review-article.prose h2#faq ~ h3 {
  background: rgba(255, 255, 255, 0.75);
  padding: 14px 18px 0;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  font-weight: 600;
  font-size: 0.95rem;
}

.fr-review-article.prose h2#faq ~ h3 + p {
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 18px 16px;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-top: none;
  border-radius: 0 0 8px 8px;
  margin-bottom: 14px !important;
  color: var(--fr-slate-600, #625a50);
  line-height: 1.65;
}

/* ============================================================
   Responsive tables (50/50 mobile · desktop)
   Horizontal scroll + optional sticky first column. Only inside
   compare articles; compare-pages.css loads on -vs- pages only.
   ============================================================ */

.fr-review-article.prose figure.wp-block-table {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 1.25rem 0;
  padding: 0;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-sizing: border-box;
}

/* Hint: more columns to the right (class toggled by compare-pages.js) */
.fr-review-article.prose figure.wp-block-table.fr-compare-table-wrap--overflow:not(.fr-compare-table-wrap--at-end) {
  box-shadow: inset -10px 0 14px -8px rgba(30, 26, 22, 0.07);
}

.fr-review-article.prose figure.wp-block-table:focus-visible {
  outline: 2px solid rgba(200, 114, 83, 0.45);
  outline-offset: 2px;
}

.fr-review-article.prose figure.wp-block-table table {
  width: max(100%, max-content);
  max-width: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  overflow: visible;
}

.fr-review-article.prose figure.wp-block-table figcaption {
  padding: 8px 12px 10px;
  font-size: 12px;
  color: var(--fr-slate-500, #8a7f73);
  border-top: 1px solid var(--fr-slate-200, #e5ddd4);
  background: rgba(248, 243, 238, 0.35);
}

/* Slightly tighter cells inside scrollable figures on narrow screens */
@media (max-width: 640px) {
  .fr-review-article.prose figure.wp-block-table th,
  .fr-review-article.prose figure.wp-block-table td {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
  }
}

/* Sticky first column: keep “Feature / category” visible while scrolling */
@media (max-width: 900px) {
  .fr-review-article.prose figure.wp-block-table thead th:first-child,
  .fr-review-article.prose figure.wp-block-table tbody td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
    background-clip: padding-box;
    box-shadow: 6px 0 10px -6px rgba(30, 26, 22, 0.12);
  }

  .fr-review-article.prose figure.wp-block-table thead th:first-child {
    z-index: 3;
    background: var(--fr-slate-50, #f8f3ee);
  }

  .fr-review-article.prose figure.wp-block-table tbody tr:nth-child(even) td:first-child {
    background: var(--fr-slate-50, #f8f3ee);
  }

  .fr-review-article.prose figure.wp-block-table tbody td:first-child {
    font-weight: 600;
  }
}

/* ── Program screenshot gallery (bulk compare import) ───────── */
.fr-compare-program-gallery-wrap {
  margin: 2.25rem 0 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--fr-slate-200, #e5ddd4);
}

.fr-compare-program-gallery-wrap > h2#program-screenshots {
  font-size: 1.35rem;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.fr-compare-program-gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 1.25rem;
  align-items: start;
}

@media (max-width: 700px) {
  .fr-compare-program-gallery-grid {
    grid-template-columns: 1fr;
  }
}

.fr-compare-program-gallery-col h3 {
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.fr-compare-program-gallery-intro {
  font-size: 0.9rem;
  color: var(--fr-slate-500, #8a7f73);
  margin: 0 0 1rem;
  line-height: 1.45;
}

.fr-compare-program-gallery-col figure.wp-block-image {
  margin: 0 0 1rem;
}

.fr-compare-program-gallery-col figure.wp-block-image:last-child {
  margin-bottom: 0;
}

.fr-compare-program-gallery-col img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--fr-slate-200, #e5ddd4);
  box-sizing: border-box;
}
