/* Product pages: "Free or Pro?" (templates/partials/product/compare.twig). Owner-approved redesign, 2026-10-07,
   from the mockup at _mockups/compare.html. Free left, Pro right as a soft card that runs the full height; labels in
   a left column on wide screens; on phones each label becomes a small heading above its pair and the two app
   headers pin under the local nav. The card is white on a grey band and grey on a white one. */
@layer pages {
  .cmp-band { --cmp-card: var(--c-band); overflow: visible; }   /* overflow: visible lets the phone headers stick */
  .band--grey.cmp-band { --cmp-card: var(--c-bg); }
  .cmp-wrap { max-width: 1040px; margin: var(--gap-cta-media) auto 0; }
  .cmp { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; text-align: center; }
  .cmp col.cmp__labels { width: 24%; }
  .cmp th, .cmp td { padding: 18px 20px; vertical-align: middle; }

  /* the Pro card */
  .cmp .is-pro { background: var(--cmp-card); }
  .cmp thead .is-pro { border-radius: 22px 22px 0 0; }
  .cmp tbody:last-of-type tr:last-child .is-pro { border-radius: 0 0 22px 22px; }

  /* app headers */
  .cmp thead th { padding-top: 28px; padding-bottom: 26px; font-weight: 400; vertical-align: top; }
  .cmp__icon { display: block; width: 84px; margin: 0 auto 14px; }
  .cmp__icon img { display: block; width: 84px; height: auto; border-radius: 22.37%;
    box-shadow: 0 1px 0 rgb(0 0 0 / .04), 0 10px 22px -12px rgb(0 0 0 / .35); }
  .cmp__name { display: block; font-family: var(--f-display); font-weight: 700; font-size: 26px; line-height: 1.05; color: var(--c-ink); }
  .cmp__name span { display: block; font-weight: 600; font-size: 22px; color: var(--c-muted); }
  .cmp__price { display: block; margin-top: 12px; font-family: var(--f-display); font-weight: 600; font-size: 22px; color: var(--c-ink); }
  .cmp__badge { display: inline-block; margin-top: 14px; }
  .cmp__badge img { display: block; height: 40px; width: auto; }
  .cmp__sub { display: block; margin-top: 10px; font-size: 14px; color: var(--c-muted); }
  .cmp__sub .cta { font-size: 13px; }

  /* section headings */
  .cmp__section > * { padding: 30px 20px 10px; border-bottom: 1px solid var(--c-hairline); }
  .cmp__section th { text-align: left; font-family: var(--f-display); font-weight: 700; font-size: 13px;
    letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-muted); }

  /* rows */
  .cmp tbody th[scope="row"] { text-align: left; font-weight: 500; font-size: 15px; color: var(--c-muted); }
  .cmp tbody td { font-size: 17px; line-height: 1.35; color: var(--c-ink); }
  .cmp tbody tr + tr > * { border-top: 1px solid var(--c-hairline); }
  .cmp__val { display: inline-flex; align-items: center; gap: 8px; }
  .cmp__tick { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--c-positive); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
  .cmp__dash { color: var(--c-muted); }
  .cmp__both { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 8px; margin: 0; padding: 0; list-style: none; text-align: left; }
  .cmp__both li { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; }

  /* ratings: five stars filled to the score (mask), the score, the count with its footnote */
  .cmp__rating { display: inline-flex; flex-direction: column; align-items: center; gap: 4px; }
  .cmp__stars { display: block; width: 92px; height: 16px;
    background: linear-gradient(90deg, var(--c-ink) var(--fill, 0%), var(--c-sep) var(--fill, 0%));
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.4 16'%3E%3Cpath d='M8 0l2.4 5 5.4.6-4 3.7 1.1 5.3L8 12l-4.9 2.6 1.1-5.3-4-3.7L5.6 5z'/%3E%3C/svg%3E") 0 0 / 18.4px 16px repeat-x;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18.4 16'%3E%3Cpath d='M8 0l2.4 5 5.4.6-4 3.7 1.1 5.3L8 12l-4.9 2.6 1.1-5.3-4-3.7L5.6 5z'/%3E%3C/svg%3E") 0 0 / 18.4px 16px repeat-x; }
  .cmp__score { font-family: var(--f-display); font-weight: 700; font-size: 22px; line-height: 1; color: var(--c-ink); }
  .cmp__count { font-size: 14px; color: var(--c-muted); }

  /* phones */
  @media (max-width: 767px) {
    .cmp-wrap { margin-top: 28px; margin-inline: calc(var(--gutter) * -1 + 12px); }
    .cmp, .cmp thead, .cmp tbody, .cmp tr { display: block; }
    .cmp colgroup { display: none; }
    .cmp tr { display: grid; grid-template-columns: 1fr 1fr; }
    .cmp th, .cmp td { padding: 14px 10px; }
    .cmp thead tr > :first-child { display: none; }
    .cmp thead { position: sticky; top: var(--localnav-h, 52px); z-index: 3; background: var(--c-band); box-shadow: 0 8px 12px -12px rgb(0 0 0 / .35); }
    .band:not(.band--grey).cmp-band .cmp thead { background: var(--c-bg); }
    .cmp thead th { padding: 10px 6px; }
    .cmp thead .is-pro { border-radius: 18px 18px 0 0; }
    .cmp__icon, .cmp__icon img { width: 40px; } .cmp__icon { margin-bottom: 6px; }
    .cmp__name { font-size: 16px; } .cmp__name span { font-size: 14px; }
    .cmp__price { margin-top: 4px; font-size: 16px; }
    .cmp__badge { margin-top: 8px; } .cmp__badge img { height: 30px; }
    .cmp__sub { display: none; }   /* phones: "Learn more" is in the local nav and the closing block */
    .cmp__section > :first-child { grid-column: 1 / -1; padding: 22px 10px 8px; }
    .cmp__section .is-pro { display: none; }
    .cmp tbody th[scope="row"] { grid-column: 1 / -1; text-align: center; padding: 14px 10px 0; font-size: 13px;
      background: linear-gradient(90deg, transparent 50%, var(--cmp-card) 50%); }
    .cmp tbody th.cmp__hidden-label { padding: 0; }
    .cmp tbody tr + tr > * { border-top: 0; }
    .cmp tbody tr + tr > th[scope="row"] { border-top: 1px solid var(--c-hairline); }
    .cmp tbody td { font-size: 15px; padding-top: 6px; }
    .cmp__both { gap: 6px; } .cmp__both li { font-size: 14px; }
    .cmp__score { font-size: 18px; } .cmp__stars { width: 78px; height: 14px; -webkit-mask-size: 15.6px 14px; mask-size: 15.6px 14px; }
  }
}
