/*
 * /compare hub and "Properkey vs" pages. Loaded after service_pages.css and
 * scoped under .compare-page, so it reuses the service-page tokens (--svc-*),
 * hero, cards and buttons, and listing_pages.css, so the feature table, the
 * FAQ block and the closing band wear the sell page's .lp-* pieces. Adds only
 * the comparison pieces: the verdict cards over the hero, the savings
 * slider, the table's cells, the win cards, the hub's search and cards, and
 * the fine print.
 *
 * Brand rules (.claude/skills/brand): flat orange CTAs, orange as text only in
 * #C23A00, navy #14306e surfaces, body #475569, never #94a3b8 on light.
 */

.compare-page {
  /* How far the verdict cards ride up over the bottom of the hero. */
  --compare-overlap: 84px;
  --compare-navy: #14306e;
  --compare-yes: #15803d;
  --compare-no: #b42318;
  --compare-partial: #a15c07;
}

/* Flat navy with the triangular hairline lattice, the same band as the agent
   directory's .agents-hero (see .claude/skills/brand), in place of the
   service-page blue gradient. The views drop the .svc-hero-mesh and
   .svc-hero-grain layers: the lattice runs unmasked here, and flat navy has
   no gradient banding for the grain to hide. */
.compare-page .compare-hero {
  min-height: 0;
  background-color: var(--compare-navy);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 30px);
}

/* navbar_home is fixed and about 80px tall, so the shared 76px top padding
   left the breadcrumb tucked under it. 132px clears it with a smaller gap than
   the 156px .escrow-hero and .find-hero use (owner 2026-09-29). 1120px, the
   width of every section below, so the headline and the verdict cards under
   it share a left edge. */
.compare-hero .svc-hero-inner {
  max-width: 1120px;
  padding-top: 132px;
}

/* Only a comparison page has verdict cards riding up over the hero; the hub
   keeps the shared bottom padding. */
.compare-hero--verdict .svc-hero-inner {
  padding-bottom: calc(var(--compare-overlap) + 52px);
}

.compare-page .compare-hero .svc-hero-sub {
  max-width: 640px;
}

.compare-vs {
  color: #ffb899;
}

.compare-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.78);
}

.compare-crumbs a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------- sections ----------------------------- */

.compare-section {
  padding: 64px 0;
  background: #ffffff;
}

.compare-section--tint {
  background: var(--svc-tint);
}

.compare-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding-inline: 16px;
}

.compare-h2 {
  margin: 0 0 10px;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--svc-ink-soft);
  text-wrap: balance;
}

.compare-h3 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--svc-ink-soft);
  text-wrap: balance;
}

/* --------------------------- verdict cards ---------------------------
   Pulled up over the bottom of the hero, as in the original design. The band
   is transparent for the overlap and white below it, and sits one layer above
   .svc-hero-inner (z-index 20). All three cards are white: a navy card would
   sink into the hero's navy corner. */

.compare-verdict-band {
  position: relative;
  z-index: 21;
  margin-top: calc(var(--compare-overlap) * -1);
  padding-bottom: 64px;
  background: linear-gradient(to bottom, transparent var(--compare-overlap), #ffffff var(--compare-overlap));
}

/* A white calculator carries straight on from the band's white. */
.compare-verdict-band + .compare-section:not(.compare-section--tint) {
  padding-top: 0;
}

.compare-verdict {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.compare-verdict-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--svc-border);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(8, 20, 60, 0.14);
}

.compare-verdict-card--keep {
  border-color: var(--svc-orange);
  box-shadow: 0 0 0 1px var(--svc-orange) inset, 0 18px 40px rgba(8, 20, 60, 0.14);
}

.compare-verdict-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--svc-muted);
}

.compare-verdict-big {
  font-size: 44px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--svc-ink-soft);
}

.compare-verdict-big--long {
  font-size: 26px;
  line-height: 1.2;
}

.compare-verdict-card--properkey .compare-verdict-big {
  color: var(--compare-navy);
}

.compare-verdict-card--keep .compare-verdict-big {
  color: var(--svc-orange-deep);
}

.compare-verdict-note {
  font-size: 14px;
  line-height: 1.5;
  color: var(--svc-body);
}

/* The $0 card's disclosure follows that card in the markup. Here it takes the
   grid's second row at full width, so the three cards keep the first; on a
   phone (below) it drops back into reading order, straight after the $0 card. */
.compare-verdict-disclosure {
  grid-column: 1 / -1;
  grid-row: 2;
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--svc-muted);
}

/* ---------------------------- calculator ---------------------------- */

.compare-calc {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 32px;
  margin-top: 24px;
  padding: 28px;
  background: var(--svc-tint);
  border: 1px solid var(--svc-border);
  border-radius: 16px;
}

.compare-calc-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--svc-ink-soft);
}

.compare-calc-price {
  display: block;
  margin: 6px 0 14px;
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--svc-ink-soft);
}

.compare-range {
  --fill: 24%;
  width: 100%;
  height: 8px;
  appearance: none;
  background: linear-gradient(to right, var(--svc-orange) var(--fill), var(--svc-hairline) var(--fill));
  border-radius: 999px;
  cursor: pointer;
}

.compare-range::-webkit-slider-thumb {
  width: 26px;
  height: 26px;
  appearance: none;
  background: #ffffff;
  border: 3px solid var(--svc-orange);
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.2);
}

.compare-range::-moz-range-thumb {
  width: 22px;
  height: 22px;
  background: #ffffff;
  border: 3px solid var(--svc-orange);
  border-radius: 50%;
}

.compare-range:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 6px;
}

.compare-range-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-size: 12px;
  color: var(--svc-muted);
}

.compare-calc-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid var(--svc-border);
  border-radius: 14px;
}

.compare-calc-result-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--svc-muted);
}

.compare-calc-savings {
  font-size: 40px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--svc-orange-deep);
}

.compare-calc-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  font-size: 14px;
  color: var(--svc-body);
  border-top: 1px solid var(--svc-border-soft);
}

.compare-calc-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--svc-muted);
}

/* --------------------------- feature table ---------------------------
   The sell page's "Everything under one roof" table (.lp-compare in
   listing_pages.css) as a real <table>: white card with the soft shadow, grey
   header strip, Properkey's column under the navy pill, the competitor's under
   a small uppercase label, hairline rows, and the fee row in the orange
   summary tint. The cells hold sentences rather than a tick, so the columns
   are wider than the sell table's and the text stays left-aligned. */

/* position: relative keeps the cells' absolutely positioned sr-only labels
   inside this scroll box; without it they escape it and widen the page on
   phones. */
.compare-table-wrap {
  position: relative;
  margin-top: 28px;
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid #e8eef7;
  border-radius: 16px;
  box-shadow: 0 10px 34px rgba(15, 23, 42, 0.05);
}

.compare-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
}

.compare-table th,
.compare-table td {
  padding: 14px 22px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f1f5f9;
}

.compare-table thead th {
  vertical-align: middle;
  background: #f8fafc;
  border-bottom-color: #e8eef7;
}

/* flat navy per ruling C: 12px text never sits on orange */
.compare-table-us {
  display: inline-block;
  padding: 5px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: var(--compare-navy);
  border-radius: 999px;
}

.compare-table thead .compare-table-them {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #64748b;
}

.compare-table tbody th {
  width: 28%;
  font-size: 15px;
  font-weight: 600;
  color: #334155;
}

.compare-table td {
  color: var(--svc-body);
}

.compare-table td.compare-table-pk {
  color: var(--svc-ink-soft);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: 0;
}

/* On the row, not the cells, so the phone layout's block rows keep it. */
.compare-table .compare-table-row--summary {
  background: rgba(255, 79, 0, 0.06);
}

.compare-table .compare-table-row--summary th {
  font-weight: 700;
  color: #0f172a;
}

.compare-table .compare-table-row--summary td.compare-table-pk strong {
  color: var(--svc-orange-deep);
}

.compare-mark {
  margin-right: 4px;
}

/* The savings table's "You keep" figures, in the keep card's orange. */
.compare-savings-keep {
  color: var(--svc-orange-deep);
}

.compare-mark--included {
  color: var(--compare-yes);
}

.compare-mark--not_included {
  color: var(--compare-no);
}

.compare-mark--partial {
  color: var(--compare-partial);
}

/* ------------------------ wins, fair look, verdict ------------------------ */

.compare-wins {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

/* The icon sits inline with the title, the sell page's tool-card layout
   (.lp-tool-head), never stacked above it. .svc-card already lifts 3px and
   turns its border orange on hover; the icon tile fills orange with it. */
.compare-win-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.compare-win-head .svc-card-title {
  margin-bottom: 0;
}

.compare-win-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  font-size: 16px;
  color: var(--svc-orange-deep);
  background: rgba(255, 79, 0, 0.08);
  border-radius: 10px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.compare-win:hover .compare-win-icon {
  color: #ffffff;
  background: var(--svc-orange);
}

.compare-fair {
  padding: 28px;
  background: #ffffff;
  border: 1px solid var(--svc-border);
  border-radius: 16px;
}

.compare-fair ul {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  padding-left: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--svc-body);
}

.compare-fair-kicker {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--svc-ink-soft);
}

.compare-bottom-line {
  max-width: 72ch;
  margin: 12px 0 0;
  font-size: 17px;
  line-height: 1.7;
  color: var(--svc-body);
}

/* -------------------------------- FAQ --------------------------------
   The sell page's photo-and-accordion block (.lp-handle, .lp-accordion-* in
   listing_pages.css). On the tint band the rows need a hairline a step darker
   than the sell page's white-section one. */

.compare-faq-section .lp-accordion-item {
  border-bottom-color: #e2e8f0;
}

.compare-faq-answer p {
  margin: 0 0 10px;
}

.compare-faq-answer p:last-child {
  margin-bottom: 0;
}

/* A cited source inside a verdict note or an FAQ answer
   (CompareHelper#compare_source_links). The site's link blue, underlined
   because it sits in running text, where colour alone doesn't set it apart. */
.compare-source-link {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.compare-source-link:hover {
  color: #1d4ed8;
}

/* ---------------------------- closing band ----------------------------
   The sell page's closing band and sign scene (.lp-closing in
   listing_pages.css), narrowed to the 1120px column's content width and
   gutters and pulled closer to the section above, which already ends in 64px
   of white. */

.compare-page .compare-closing {
  padding: 8px 16px 56px;
}

.compare-closing .lp-closing-band {
  max-width: 1088px;
}

/* The CTA here is longer than the sell page's "List for Free", so the copy
   gives up width instead of pushing the sign onto a row of its own. */
@media (min-width: 768px) {
  .compare-closing .lp-closing-copy {
    flex: 1 1 0;
    min-width: 300px;
  }
}

.compare-closing-title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #ffffff;
  text-wrap: balance;
}

.compare-closing-copy {
  margin: 0;
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.82);
  text-wrap: pretty;
}

/* ------------------------- hub: pillars, search, cards ------------------------- */

.compare-pillars {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.compare-pillars li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--svc-body);
}

.compare-pillars strong {
  font-size: 16px;
  color: var(--svc-ink-soft);
}

.compare-search {
  position: relative;
  max-width: 560px;
  margin: 0 0 40px;
}

.compare-search i {
  position: absolute;
  top: 50%;
  left: 18px;
  color: var(--svc-muted);
  transform: translateY(-50%);
  pointer-events: none;
}

.compare-search-input {
  width: 100%;
  min-height: 52px;
  padding: 12px 18px 12px 46px;
  font-size: 16px;
  color: var(--svc-ink-soft);
  background: #ffffff;
  border: 1px solid var(--svc-hairline);
  border-radius: 999px;
}

.compare-search-input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
  border-color: #2563eb;
}

.compare-category + .compare-category {
  margin-top: 48px;
}

.compare-category-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.compare-count {
  font-size: 13px;
  color: var(--svc-muted);
}

.compare-category-desc {
  max-width: 72ch;
}

.compare-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}

.compare-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  color: inherit;
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--svc-border);
  border-radius: 14px;
  transition: border-color 0.2s ease, transform 0.2s var(--svc-ease), box-shadow 0.2s ease;
}

.compare-card:hover {
  border-color: #bfd0ee;
  box-shadow: 0 8px 22px rgba(20, 48, 110, 0.08);
  transform: translateY(-3px);
}

.compare-card:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.compare-card-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--svc-ink-soft);
}

.compare-card-fee {
  font-size: 14px;
  font-weight: 600;
  color: var(--svc-orange-deep);
}

.compare-card-desc {
  flex: 1;
  font-size: 13px;
  line-height: 1.55;
  color: var(--svc-muted);
}

.compare-card-go {
  font-size: 13px;
  font-weight: 600;
  color: #2563eb;
}

.compare-all-link {
  margin: 20px 0 0;
  font-size: 14px;
}

.compare-all-link a {
  font-weight: 600;
  color: #2563eb;
}

.compare-empty {
  margin: 0;
  font-size: 15px;
  color: var(--svc-muted);
}

/* ------------------------------ roundups ------------------------------
   /compare/best-...: the price table reuses the feature table; these are the
   few pieces it adds. Links are the site's link blue (#2563eb). */
.compare-table--roundup tbody th a,
.compare-roundup-link,
.compare-also a {
  font-weight: 600;
  color: #2563eb;
}

.compare-table--roundup tbody th a:hover,
.compare-roundup-link:hover,
.compare-also a:hover {
  color: #1d4ed8;
}

.compare-roundup-aside {
  font-size: 13px;
  font-weight: 500;
  color: var(--svc-muted);
}

.compare-roundup-note {
  margin: 12px 0 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--svc-muted);
}

.compare-roundup-cost {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--compare-navy);
}

.compare-roundup-link {
  display: inline-block;
  margin-top: 4px;
}

/* The hub's pointer to a category's roundup, under the category blurb. */
.compare-also {
  margin: 8px 0 0;
  font-size: 15px;
  color: var(--svc-body);
}

/* ----------------------------- fine print ----------------------------- */

.compare-fine-print-band {
  background: #ffffff;
}

.compare-fine-print {
  padding: 8px 0 48px;
  font-size: 12px;
  line-height: 1.6;
  color: var(--svc-muted);
}

.compare-fine-print p {
  margin: 0;
}

/* ------------------------------- mobile ------------------------------- */

@media (max-width: 900px) {
  .compare-cards,
  .compare-pillars {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compare-calc {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767px) {
  .compare-page {
    --compare-overlap: 56px;
  }

  /* The same tighter clearance against the shorter mobile navbar. */
  .compare-hero .svc-hero-inner {
    padding-top: 96px;
  }

  .compare-hero--verdict .svc-hero-inner {
    padding-bottom: calc(var(--compare-overlap) + 40px);
  }

  /* Three cards stack rather than leaving the third alone on a second row. */
  .compare-verdict {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  .compare-verdict-disclosure {
    grid-row: auto;
  }

  .compare-verdict-band {
    padding-bottom: 44px;
  }

  /* The sell page's phone band carries a 48px top margin for its own
     spacing; here the padding above already does that job. */
  .compare-closing .lp-closing-band {
    margin-top: 0;
  }

  .compare-closing-title {
    font-size: 22px;
  }

  .compare-closing-copy {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .compare-section {
    padding: 44px 0;
  }

  /* Each table row becomes a card: the feature, then a labeled line for each
     side, so the competitor's column is never off-screen. */
  .compare-table {
    min-width: 0;
  }

  .compare-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .compare-table tbody,
  .compare-table tr,
  .compare-table th,
  .compare-table td {
    display: block;
    width: 100%;
  }

  .compare-table tbody tr {
    padding: 14px 16px;
    border-bottom: 1px solid var(--svc-border-soft);
  }

  .compare-table tbody tr:last-child {
    border-bottom: 0;
  }

  .compare-table tbody th,
  .compare-table td {
    padding: 0;
    border: 0;
  }

  .compare-table tbody th {
    width: 100%;
    margin-bottom: 8px;
    font-size: 15px;
  }

  .compare-table td + td {
    margin-top: 8px;
  }

  .compare-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--svc-muted);
  }

  .compare-table td.compare-table-pk::before {
    color: var(--compare-navy);
  }

  .compare-h2 {
    font-size: 26px;
  }

  .compare-cards,
  .compare-pillars,
  .compare-wins {
    grid-template-columns: minmax(0, 1fr);
  }

  .compare-calc {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .compare-card,
  .compare-win,
  .compare-win-icon {
    transition: none;
  }

  .compare-card:hover,
  .compare-win:hover {
    transform: none;
  }
}
